- 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
Submitted by Peter on Tue, 2010-07-06 22:45
Drupal:
Drupal performance is dependent on the modules you select and the options within each module. Everything else is cured by the rapid increase in hardware performance.
Costs
Your first small experimental public Web site will be on shared hosting and you will not control the configuration of the Web server used for your Web site. When you step up to a money making web site and want to look at performance, you should be using at least a VPS (Virtual Private Server) when you have the type of control you need to achieve improvements in performance. Your minimum monthly cost will jump from US$8 up to US$20.
(If you use Hostmonster, as advertised at the top right corner of this page, your cost drops to US$6.95 a month and you gain more control, giving you an intermediate step before leaping up to a VPS.)
Processor usage
The most expensive part of Web site hosting is usually processor performance. You can cut processor usage by 95 percent with an op-code cache
. APC and eAccelerator are two op-code caches. You do not have to know the fine details of what they do other than the fact that they use memory to save completed work for reuse without additional processor overhead. cPanel and equivalent Web hosting account control panels have a spot where you can switch on APC or eAccelerator. Other Web hosting services might force you to ask your hosting company to switch on the cache. (Some of the lower priced Web hosting accounts cost you a lot of money in the form of wasted time and work.)
You might need more memory to run the cache. Memory decreases in price faster than processing power. Based on testing across over 200 web sites, you need double the memory for small Web sites and only a trivial increase in memory for a large site. A simple site might use 16 MB per Web page delivery process and might peak at 10 pages delivered in parallel, fitting in 256 MB of memory at the hosting level. The op-code cache adds only 5 MB to 10 MB but that might be enough to bump your site from a 256 MB hosting account up to a 512 MB account. In return the cache might reduce processor usage by 20 or 40 percent.
A complex site might use 60 MB per page process and overlap the delivery of 100 pages at a time, requiring 6 GB of memory. The op-code cache adds only 5 MB to 10 MB and it might reduce each of those 100 page serving processes by 3 MB. 100 time 3 MB is 300 MB saved, far more than the 10 MB used by the cache. You also use less processor time per page.
Two years ago there were a lot of people offering 128 MB VPS accounts. Today they all offer a minimum of 256 MB or greater. The memory for an op-code cache is not an issue.
A typical $20 account gives you 2.5 percent of a medium size processor. A $50 account gives you 10 percent of the same processor. An op-code cache will often drop your usage from a $50 account to a $20 account.
Memory usage
Memory is required for the Web server and the database behind the Web site. If the database is running in the same physical server as the Web server, you need a lot of memory. When the database has a lot of memory and is configured to use it, the database saves query results in memory and common queries are served from memory, not disk. The database also caches indexes and other things in memory. A database starved of memory will constantly reread all that data from disk, slowing your Web site down to a trickle.
One of the first expansions from one server to two servers is to move the database to a separate server. The Web server can then hog all the memory on one server and the database can feast on all the memory in the other server. If you have not updated your server for a couple of years, you can usually double the available memory by just replacing your old server with a current model fitted with the maximum configurable memory, saving you the expansion to two servers.
Good performance depends on lots of memory. Good performance depends on all that memory being used. There are a whole lot of configuration settings in your Web server, usually Apache, and your database server, usually MySQL. Many of those configuration settings increase memory usage. If the settings are not right, you could buy a lot of memory and use only a little bit. You could also over allocate memory and have Apache fighting MySQL for non existent memory. You want someone to check the Apache and MySQL settings before you put a lot of work into changing Drupal.
Drupal memory usage depends on the modules loaded. If you load a module then decide not to use the module, switch the module off and delete the module. You have just made your first memory usage reduction. Are there any other modules you could delete?
Drupal stores a lot of things in the database. Drupal saves some overheads by storing completed results in the database then delivering the saved results. The Drupal caching process saves processing time and the database overheads previously used to repeatedly generate the results. To get maximum benefit from the cache, your database needs lots of memory to quickly retrieve the saved results.
Check the Drupal performance settings in the Administration section to ensure Drupal is making the best use of the Drupal cache facilities.
If the database has enough memory, frequently used data will be retained in memory and reused. When you make changes to Drupal settings or add modules, you may need to review the database memory allocations.
Given the low cost of memory, buy heaps of memory, track memory usage, and buy more when there is the slightest shortage.
Module selection
You select modules for functionality. You often get the choice of several modules to provide similar functionality. The choice can alter performance. Comparing two modules, one might add no database processing overheads while the other might add a couple of extra database tables and at least one access to each table for every Web page delivered. Your existing Web site might use 30 database table accesses to deliver a page and you add an extra two, creating a slight performance decrease. Another site might already use 100 database accesses per page and an extra two might not be noticed.
Not all modules work the same. An add-on module might add an extra 200 database accesses per page, an amount that would kill the performance of a site previously using only 30 accesses per page. You will find a few performance recommendations by me at drupal.org for Drupal 7, 6, 5, and 4. They are not rocket science, just experience coupled with a logical approach to analysis and testing. Lots of people are trained to analyse. Not many people understand testing and few people in the Drupal area have the extensive database experience required for performance improvements. The good thing is the pool of 800,000 people contributing to Drupal. Some of them have the right combination to improve the database performance of the more popular modules. When you are choosing between several modules for the same task, look at the number of people using the modules and their comments about performance.
Are your visitors logged in?
When you first visit a Drupal based Web site, you are an anonymous user and received cached Web pages. A cached Web page might be refreshed only once every 5 minutes or more. You log in then become a user connected to an account. Logged in users get fresh pages all the time. Logged in users use more resources because their Web pages are rebuilt for every page view.
100 logged in users can easily use more resources than 1000 anonymous visitors. A test at one Web site showed 1000 logged in users using more resources than 50,000 anonymous users. You can see how misleading it would be to tune your Web site for anonymous users if most of your visitors log in.
If your Web site is oriented to logged in users, buy more processor power, a lot more memory, and allocate a lot of memory to the database. Perform all your testing and tuning with lots of users logged in.
Some modules are only activated for logged in users. Consider forum modules that highlight unread forum entries. The module has to identify all the forum entries listed on the current page then look up a database table to find if you have read them. None of that overhead is required for anonymous visitors. When you add a new module, test the performance difference for both anonymous visitors and logged in users.
Drupal 5
Drupal 5 had some performance improvements, including SQL enhancements, developed during the lifetime of Drupal 5. Switching on extra options produced the occasional increase in overhead with some options producing awful performance. Several of the bad performing optional modules were greatly improved during the life of Drupal 5.
I contributed some of the SQL and code improvements based on years of experience with databases and making applications go faster. I demonstrated a code file split technique for improving Drupal 5 .module files and a code file splitting technique was made standard in Drupal 6. Some of the other improvements included adding options to exclude expensive features if you did not use them and improved documentation on the effect of using some options.
Drupal 6
Drupal 6 has more enhancements and better performance testing. Measurement of 50 Web site conversions from Drupal 5 to 6 showed that not one site ran slower and some ran faster. Some other Web site conversions included switching on extra options and produced the occasional increase in overhead due to the extra work performed.
Drupal 7
Drupal 7 uses more resources than Drupal 6. There is a lot of performance tuning work in Drupal 7 that gives you a big improvement in functionality from only a small increase in processor overheads. Some of that extra overhead is from modules that were optional in Drupal 6 and are included as standard in Drupal 7. Drupal 7 uses about 30 percent more processing power per page compared to Drupal 6 but most Drupal 6 sites had some of those extra modules turned on and will not see a difference.
In fact some people will see a performance improvement because they used all the previously optional modules and the modules are now more efficient in Drupal 7.
Drupal 7 has more cache options than Drupal 6. You may see a performance improvement because your site now caches something that was not previously cached.
Possible improvements
Drupal creates several tables for temporary information, mostly cached information. The tables do not have to be on disk because they are recreated automatically if the server restarts. MySQL users could change the tables to a type named memory. If your server has spare memory and you have tuned MySQL to use the maximum useful amount of memory, allocate some more to MySQL then change your table types to memory.
A more complicated approach is to use a product named memcache. Memcache effectively does the same as the MySQL memory table but using more code because you have to replace the standard Drupal cache code with code for memcache. I do not recommend adding memcache to your Web site without practicing on a similar Web hosting account. There are too many things to go wrong.








