- PeterMoulding.com
- Author
- Trainer
- Speaker
- Business Coach
- How to write a How To book
- PHP Courses
- Speaking
- Web Architect
- Australia
- Books
- Authors
- Akkana Peck
- Alex Berenson
- Andrew Nugent
- Ben Sanders
- Brock Clarke
- Chris Simms
- David Mercer
- Dianna Mullet
- Don Winslow
- Dori Smith
- Harlan Coben
- Jack McDevitt
- James Wines
- Jerry Yudelson
- John Grisham
- Kevin Mullet
- L. E. Modesitt Jr.
- Laurell K. Hamilton
- Marshall Karp
- Martina Cole
- Michael Marshall Smith
- Michel Roux Jr
- Nadia Sawalha
- Philip Pullman
- Raymond Khoury
- Richard North Patterson
- Robert Masello
- Sally Roth
- Sarah Langan
- Stella Rimington
- Stephen Booth
- Stephen King
- Stephen Leather
- T.C. Boyle
- Tom Negrino
- Tony Hillerman
- Urban Waite
- Val McDermid
- Valerio Massimo Manfredi
- Beginning GIMP
- Beginning Visual C++
- Culturalism
- Fiction
- A Drink Before The War
- A Talent for War
- Bag of Bones
- Blood and Ice
- Burn
- Dark Lady
- Dead Line
- Eclipse
- Empress of Eternity
- Exley
- Flipping Out
- Just One Look
- Nightfall
- Pet Sematary
- Savage Moon
- Skinwalkers
- Starvation Lake
- The Fallen
- The Gardens of the Dead
- The Jump
- The Last Templar
- The Mermaids Singing
- The Midnight Mayor
- The Secret Soldier
- The Summons
- The Terror of Living
- The Testament
- The Tower
- Under the Dome
- Virus
- AJAX and PHP
- Aging with Grace
- Food books
- Green Architecture
- Life Is So Good
- SQL: The Complete Reference
- The Backyard Bird Lover's Ultimate How-to Guide
- The Garden Gurus
- Authors
- Sustainability
- -18 hours left to decide the future of Australia
- Campbells vegetable stock or Massel vegetable stock?
- Carbon Sequestration
- Carbon tax for Australia is a fraud
- Copenhagen will fail
- Cost of living in Australia
- Dick Smith jumps on the population bandwagon
- Dry Run: Preventing the Next Urban Water Crisis
- Energy Saving Lights
- Garlic
- How many people can live in Australia?
- Its obsolete, throw it out!
- Julia Gillard offers 9.9 billion dollars bribe to Rob Oakeshott
- Laundry detergent
- Petrol or Diesel?
- Reflective foil batts kill
- RoHS
- Sea level to rise 3mm due to climate change
- Solar power
- Spring again in Sydney
- Sustainable fuels
- The CRUD Tax is back
- The people who make building regulations do not own houses
- Water efficiency
- Which insulation is safer, foil or wool?
- Will Australia reduce greenhouse gas emissions?
- Technology
- Android or Blackberry or iPhone or a flip phone?
- Apple versus Google 2011
- Cameras
- Cars
- Colour
- Burgundy
- Colour Blindness
- Colour Names
- Dulux colours
- Pantone colours
- Safe Colours
- Seculine ProDisk Mini colour balance card
- What Causes Colour Blindness?
- Hardware
- Batteries for the Digital Age
- Cables
- Cases
- Computer reliability
- Computrace
- Disks
- Astone ISO Gear 481E
- Best SSD for your notebook computer
- Disk block size
- Hitachi disk HDS722020ALA330
- LaCie USB 2.0 250 GB mobile hard drive design by F.A. Porsche
- SMART disk
- Samsung 2 TB HD204UI quiet low power disk for mass storage
- Seagate and Samsung merge disk business
- Select the right disk for your RAID array
- USB disk speed
- Western Digital WD20EARX 2 GB SATA 3 disk
- How long should computer hardware last?
- Keyboards
- Mainframe
- Memory cards
- Monitors
- Netbooks, notebooks, tablets, and xPads
- Network Attached Storage
- OLED Displays
- PC's are a thing of the past
- Printers
- Quiet
- Samsung Galaxy S
- Speed
- Television
- Tools
- USB
- Worst computer movies
- Xserve is dead. What next?
- Your backup will not work
- Z68 motherboards
- iPad or Acer Aspire One?
- IQ
- LG Intello Washing Machine
- Lack of a challenge
- Networks
- 802.11n wireless networking
- D-Link DIR-655 wireless router
- D-Link DWA-160 Xtreme N dual band USB adapter
- D-Link DWA-556 Xtreme N PCI Express desktop adapter
- MIMO
- NBN spends another $12 billion of our tax money on nothing
- National Broadband Network
- Netgear wireless modem router DGND3300 with 300 Mbps 802.11n
- Refrigerator kills wireless broadband
- Small Wireless Network
- TP-LINK TL-SG10005D 5 port gigabit switch
- TP-Link TL-WR1043N wireless N gigabit router
- Telstra Pre-paid Mobile Wi-Fi
- Where are the router plus proxy server combinations?
- Open Source documentation
- Software
- 7-zip
- Accounting
- Asterisk
- Audacity
- Backup software
- Bloat only in Windows
- CAD
- CDex
- Disk imaging software for copying and backup
- Exact Audio Copy
- Filezilla
- Firefox
- Java
- LibreOffice or OpenOffice?
- Linux
- 1 in 5 servers will ship with Linux
- Android phones outsell iPhone
- Another Move to Linux
- CentOS 5.5 installation on SSD and RAID 5
- Debian
- Debian 5.0.5 AMD64 installation
- Debian 5.06 installation
- Fedora
- Fedora or Ubuntu?
- Gnome or KDE?
- K9copy
- Linux 2.6.38
- Linux Gnome login settings lost
- Linux Mint
- Linux RAID, a rant
- Linux Speed
- Linux Time
- Linux reliability as demonstrated by Ubuntu 10.10
- Linux reliability as demonstrated by Ubuntu 11.4
- Linux still a struggle in 2011
- Linux workstation disk RAID 1
- Linux, NT, Windows, and SETI
- Linux, three years of progress
- London Stock Exchange switches to Linux
- Mandrake Linux 9.2
- The partition is misaligned by 48128 bytes - warning from Linux RAID
- Ubuntu
- How to fix the scroll bars in Ubuntu 11.4 Gnome
- Kubuntu 10.10 alternate installation on desktop with RAID 1
- POWbuntu
- Ubuntu 10.10 after 6 months use
- Ubuntu 10.10 alternate installation
- Ubuntu 10.10 desktop RAID 1
- Ubuntu 10.10 desktop RAID 5
- Ubuntu 10.10 desktop install on a netbook
- Ubuntu 10.10 desktop installation
- Ubuntu 10.10 netbook install on a netbook
- Ubuntu 10.10 server AMD64
- Ubuntu 10.10 upgrade to version 11.4 beta 2
- Ubuntu 10.4
- Ubuntu 11.10
- Ubuntu 11.10 first upgrade
- Ubuntu 11.4 after one month use
- Ubuntu 12.04 beta1 desktop amd64
- Ubuntu One
- Ubuntu by Microsoft?
- Ubuntu desktop upgrade 10.4 to 10.10 failed because I did not check the media
- Ubuntu strikes again
- Upgrade Ubuntu to Linux Mint 12 LDXE for extra speed
- Yes, use Linux but not that distribution!
- Nero
- OpenOffice
- OpenOffice is now Apache Office
- Project management
- Scribus
- Software for Windows and Linux
- Text editors
- Time
- Todo applications
- Tomboy notes
- Top text editors
- Version control
- VideoLAN VLC media player
- Visio
- Webmin
- Webmin installation on CentOS for Web development
- Webmin installation on Ubuntu
- What is the most popular open source software today?
- Windows
- Another Windows person goes Linux
- BAD_POOL_CALLER
- Cygwin
- Microsoft Malicious Software Removal Tool cannot find a common virus
- One of the developers of Windows XP is criminally insane
- There are unused icons on your desktop
- W32time
- Which Windows version?
- Windows 7 Home Premium
- Windows XP Stop 0x0000007B during installation
- Windows XP is a disaster
- Windows processes
- XML
- Zip, bzip, gzip, or 7zip?
- configFree
- Technology Succession Planning
- VoIP
- Web Sites
- Drupal
- Do Drupal themes have to use the GPL?
- Drupal 7
- A better search facility for Drupal
- Drupal - performance or flexibility
- Drupal 7 Fields are hard to fix
- Drupal 7 new features
- Drupal 7 ships on January 5
- Drupal 7.14
- Drupal 7.4 hits PeterMoulding.com
- Drupal function sequence
- The evolution of a module
- Undefined index: headers in DefaultMailSystem->mail() (line 54 of /modules/system/system.mail.inc).
- Undefined index: to in DefaultMailSystem->mail() (line 83 of /modules/system/system.mail.inc).
- implode(): Invalid arguments passed in DefaultMailSystem->format() (line 23 of /modules/system/system.mail.inc).
- Drupal 8
- Drupal Code Load Cut
- Drupal How To
- Drupal Modules
- Backup and Migrate
- Browscap
- CKEditor with Drupal WYSIWYG
- Captcha
- Cel
- Colorbox
- Content Construction Kit
- Content type
- Devel module for Drupal
- Drupal Rules as an automation language
- Drupal Spam add-on module
- Form alter to node
- IMCE
- IMCE Wysiwyg bridge
- ImageAPI
- Jdog
- Lightbox2
- Module variable
- Node Gallery Access
- Node_Gallery
- Path
- Path redirect
- Pathauto
- Pet
- Search
- Service links
- Session Variable
- Statistics
- Taxonomy
- Token
- Token ex
- Transliteration
- Trigger
- Watch
- Other modules
- Drupal Training
- Drupal access controls need a major rewrite
- Drupal coding tricks
- Drupal performance
- Drupal themes for the future
- Drupal.org colours
- Import existing data into Drupal
- Multiple Web sites made easy using Drupal multisite and the right start
- drupal_lookup_path()
- Adobe PDF
- Apache
- Apache Mahout
- Audi.com
- Bleet
- CSS Strikes Again
- CSS or xCSS
- Can you believe Facebook or email?
- Content Management Systems
- Databases
- Facebook scam
- Font
- Fonts
- HTML
- Install Apache, MySQL, and PHP 5 in Ubuntu 11.4 using the Ubuntu Software Centre
- Language Codes
- Marketing
- Memcache
- Nginx
- Open source development hits another roadblock
- Oscars
- PHP
- SPDY
- Search software
- Techoni.com.au
- Theme themes
- Things to hate on Web sites
- U.S. Patent No. 6,985,875
- Virtual Private Server
- Visible Improvement
- Web 4.0
- Web browser usage
- Web browsers
- Web site development
- Bluefish
- Crying over spilt code
- Eclipse and PHP
- Getting a Git client, a story of ancient technology and pain
- HTTrack
- MVC
- Netbeans
- PHP or ..., CakePHP/Symfony/ZF versus ...
- Programming
- Superfish
- Web browser emulators for testing your Web site
- Web development frameworks
- Web site books
- Web site development on your own computer
- Webmin or phpMyAdmin or cPanel for creating databases?
- aiki framework
- jQuery
- Views development - Learn Fields first
- Views development - Learn Actions and Rules
- jQuery .each()
- jQuery .has()
- jQuery .is()
- jQuery and Firefox Firebug
- jQuery children
- jQuery for people not using Drupal - Installation and getting started
- jQuery hover
- jQuery hover de-duplication example
- jQuery or CSS?
- jQuery performance
- jQuery tests
- Web site hosting
- Westpac Web site still broken after two years and ten months
- Wordpress wins another CMS survey
- Drupal
Drupal performance tips
Submitted by Peter on Tue, 2011-03-22 21:28
What really works to improve Drupal performance? Here are the inside tips based on real world experience and presented with the easiest quick savings first.
- PHP cache
- MySQL settings file
- Drupal cache
- Module selection
- Access time recording
- Boost add-on module
- Proxy server
PHP cache
Killer performance tip number one is to use a PHP cache. This step should be obvious to everyone who uses anything based on PHP but so many people spread so many ridiculous rumours about PHP cache software that a lot of people place PHP caches well down on their list of things to do.
PHP is an interpretive language the same as dozens of other languages including Javascript and Java. Interpretive languages were around 20 years before PHP was invented. I wrote a couple myself. The first thing you realise is, interpretive languages spend a lot of time repeating the same interpretation.
The first thing you do as the developer of an interpretive language is to create caches for interpreted code so you do not repeat the slow interpretation. When I wrote my first interpreter, I included caching of intermediate results. I found a bunch of other interpreters contained similar approaches. PHP was strangely late in developing a cache and several were developed in parallel.
Some PHP cache applications wasted time on code reordering tricks, which are almost always unreliable, and that gave people the impression that PHP cache software creates problems. You get the maximum benefits from basic caching of PHP code. leave all the tricks switched off.
APC is on PHP 6. Use APC for PHP 5. eAccelerator is almost as fast and as reliable and is the default in cPanel for some Web hosting accounts. If eAccelerator is the default for your Web hosting, use it instead of stuffing around trying to switch to APC.
XCache is a new kid on the block and has not proven to be significantly different. If your Web host uses XCache, use XCache. If your Webhost uses APC or eAccelerator, use what they recommend and support.
Nusphere PhpExpress and Zend Optimizer are alternatives that decode specially encoded PHP files. You would only use them for encoded proprietary applications.
MySQL settings file
MySQL settings are in a file named my.ini or my.cnf. MySQL provides a bunch of samples with names including my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf. Choose one. MySQL, by default, almost always chooses one that is too small. Try the next one up in size and measure the difference.
During the typical MySQL Windows install, MySQL asks if you want a development system, a server, or a dedicated MySQL server. The development option always uses a trivial amount of memory and runs slow when you access a lot of data. I have an XP based development machine where there is six or more GigaBytes of memory unused while MySQL grings through millions of rows of data in some trivial memory allocation.
You can change individual memory settings one at a time. The individual settings approach takes a lot of time and many of the settings have no affect unless used together with a lot of other changes. Save time and jump to the next size up .cnf file. measure the result. Is it better or worse? Use the largest .cnf file that does not slow down your Web site.
After you change to the right size .cnf file, you might tune some individual settings. There are about six of importance. You can tell which are important because they have the biggest increase when you step up to a bigger .cnf file. Leave the tuning of the individual settings until after everything else. Wait until you know a lot about your Web server usage, your database, and what the individual settings mean, and until you have a server with more memory.
See more details in MySQL performance tips.
Drupal cache
Drupal has a built in cache system to make some things faster. There are settings in the administration area to control the caches. Start by switching on every cache.
Drupal will warn you about some cache settings that do not work with certain modules. Switch off any settings that conflict with your choice of modules then review your choice of modules. There might be a better choice that lets you use more caching.
When you are developing a theme, temporarily switch off caching of CSS and pages. Do the same when developing modules. Make sure you switch everything back on when you finish development.
Module selection
A lot of Drupal module selections are based on fashion or a desperate grab at the first module to do what you need done. There is often no choice because of the several modules listed as providing the same feature, some are unsupported, some are still in beta or alpha development, and some do not do what they are described as doing. You are left with one choice.
Six months later there could be other choices ready to use and some might be faster. Review your choices on a regular basis, at least once per year.
Review module options. Some options dramatically increase the amount of data processed. If you are not using the data, do not process it. Talk with other users of the same modules. Search for the module name and performance
.
Consider raising performance issues against modules. If you know how databases work and the range of database activity generated by a module, you might be able to suggest an improvement. If you do not know how databases work, or how to tune databases, ask people like me to help. Every module should have a performance issue raised for each major release of Drupal to ensure the module makes maximum use of drupal performance features.
Access time recording
This is something weird that applies to every Linux or unix based computer and should be switched off by default.
Linux and Unix can record the time of last access for a file. The Linux Ext2, Ext3, and Ext4 all have the option and all have the option switched on by default. Switch it off.
The easiest way to switch it off is to set the noatime option for a disk partition when allocating disk partitions. Put this on your list of things to do when building your next server.
If you find an easy way of switching off access time recording for the file system in your version of Linux, switch it off. The disk utility in Ubuntu does not let you switch off access time recording. There might be other ways.
Boost add-on module
The Boost add-on module, from drupal.org/project/boost, might help you deliver some pages faster. Consider all the negatives then consider Boost.
Boost makes copies of pages as HTML files for delivery to anonymous users. Boost does nothing for logged in users and they are often your priority. With a bit of luck, Boost might reduce the anonymous traffic overheads enough to leave more resources for your logged in users.
Boost is replicating what a proxy server does. Fixing your proxy cache settings in your Web pages has far more benefit.
Boost only works for the HTML download. Boost does nothing for other content. Images and other files often create far more network overhead than the HTML traffic. Look at moving large content files to replicated servers for easier content deliver
If a file is delivered from HTML, the access is recorded in your Web server log, not Drupal statistics. Review your statistics recording and reporting before switching on Boost.
As soon as you finish the complicated installation of Boost and alter all your usage recording, someone will recommend varnish and you will have to change everything again. (Varnish is a glorified proxy server).
Proxy server
Varnish is the most fashionable HTTP cache among Drupal evangelists. Varnish does exactly the same thing as a proxy server. There are minor technical differences. You have to step through the hype to find the reality. If your web hosting provider provides a proxy service, use theirs.
When does Varnish and it's equivalents slow down your Web site? You might be sharing a server by using a VPS, a Virtual Private Server, and be limited to just enough memory to run your Web site. Adding Varnish means adding another application and trying to squeeze more more data into memory. your web site might slow down due to paging or crash due to timeouts. your web hosting company might provide a proxy server on a separate server giving you the benefit of caching in memory without using any of your memory.









Comments
Boost really works well !!
Iam mostly using Boost module for drupal alongwith gzip compressions and css/js compression techniques. You can see the effect on my website. Iam using Boost module for most of my websites.
Thanks & Regards
-Inder Singh
Yet Another Drupal Dev
http://indersingh.com