Dramatic performance effect of enabling the Block Cache Alter module on Drupal 6 websites

I have my websites hosted on Dreamhost VPS's and the other day decided to consolidate some of my sites onto one server. Using the Munin monitoring I've installed (see Use Munin to monitor a Dreamhost MySQL VPS) I could see the CPU utilization on the server was very low - below 15% - indicating that the server had CPU capacity. But a different performance issue showed up after consolidating the sites on one server. Namely the memory allocation had to be increased to 3GB when that server previously ran well at 1.2GB of memory.

I have put together several websites, and this consolidation involved moving 3 sites onto a server that already had 4 sites. All 7 are Drupal 6.

Last week I'd installed Block Cache Alter on another site (not one of those 7 and not run on the server in question), and seen performance improvement. The observation on that other site was to slightly improve CPU utilization, and somewhat decrease the memory requirement.

Last night I decided to install Block Cache Alter into all the sites now consolidated on the server. I finished that just before midnight last night, and just now looked at the Munin graphs and saw this dramatic result on MySQL. Additionally the memory allocation could be reduced back down to 1.5GB and CPU utilization is approximately the same as it was before.

localhost.localdomain-mysql_queries-day.png

What we see is a sharp decline in "update" and "insert" operations occurring just as I finished installing Block Cache Alter last night. Hence I feel safe in concluding this result came from installing Block Cache Alter.

Installing Block Cache Alter is straight-forward and doesn't involve anything strange like adding entries to settings.php (unlike Cache Router). However to have it give any affect you must edit all of your enabled blocks, and change the cache settings. It appears you don't have to alter cache settings on the non-enabled blocks.

There are a range of choices .. no caching, cache globally, cache per user, cache per role. It helps to understand the content of each block to know which setting to choose. Many blocks are static non-changing content and they would be fine to cache globally. Other blocks change their content depending on the logged-in user, or on the role of the user, or they change on every page view. Obviously if a specific block needs to change on every page view, it won't make sense to cache globally because it would only show the one cached value rather than the constantly changing value.

Here's how I configured the blocks:

  • On one site I had several text-only blocks (hence, not changing) and decided to consolidate them all into one block, and set global caching on that consolidated block
  • I found that most blocks could be set for global caching
  • The "Navigation" menu is one that needs per-user caching, because its content changes based on the user ID.
  • Some blocks have static text which contains javascript, and the javascript dynamically runs on page view in an AJAX fashion to display some data. Because the text Drupal stores doesn't change, it's okay to use global caching on those blocks.
  • One of my blocks is a view that randomly selects on every page view 10 taxonomy terms from a large taxonomy. Obviously this one cannot be cached.
  • The "Who's Online" block is another example of a block which cannot be cached.

Comments

, Open Toe, hollow, empty and bandage after the former package high heels, wearing the shoes in virtually increase the exposed area of ??the feet, shoes and more and more decorative effect Small pair of good shoes of the day, a woman became a nightmare, especially when the beautiful shoes and the price higher and higher, puma shoes on sale and the purse and taste the tug of war, and the more formidable shape; However, the above situation appears in the brand Puma significant improvements, fine a pair of shoes , equal to the number of ordinary shoes double, Puma started from the manufacturer, the quality for all to see, do not worry about biting feet Small pair of good shoes of the day, a woman became a nightmare, especially when the beautiful shoes and the price higher and higher, and the purse and taste the tug of war, and the more formidable shape; However, the above situation appears in the brand Puma significant improvements, fine a pair of shoes , equal to the number of ordinary shoes double, Puma started from the manufacturer, the quality for all to see, do not worry about biting Puma Ferrari Shoes feet Small pair of good shoes of the day, a woman became a nightmare, especially when the beautiful shoes and the price higher and higher, and the purse and PUMA Online Shop taste the tug of war, and the more formidable shape; However, the above situation appears in the brand Puma significant improvements, fine a pair of shoes , equal to the number of ordinary shoes double, Puma started from the manufacturer, the quality for all to see, do not Puma Pace Cat Shoes worry about biting feet Puma shoes or less can be divided into round last spring and summer, cutting head and sharp retro party last, candy pink color and pink, lemon yellow, brilliant blue and green color tone acid plays an important player in changing the upper material, in addition to leather, also appeared in velvet, silk, or Ti lizard embossed cloth, with three-dimensional flowers, crystal, diamond pieces, sequins  Significant proportion of this year, with the increase of the thick crust and high-heeled wedge, possession of a newly developed soft soles, cork and rubber tips are one piece, decorate it all pretty interesting upper three-dimensional or a collage design, comfort and cheap puma shoes fun time place, never ever do with the lack of shoes at La dealing with biting foot  Small pair of good shoes of the day, a woman became a nightmare, especially when the beautiful shoes and the price higher and higher, and the purse and taste the tug of war, and the more formidable shape; However, the above situation appears in the brand Puma significant improvements, fine a pair of shoes , equal to the number of ordinary shoes double, Puma started from the manufacturer, the quality for all to see, do not worry about biting feet Puma sexy look to wear to the party: like simulation to the tropical island vacation mood, put on three-dimensional flowers, tropical flowers printed or decorated sandals, style and mood immediately carried away, the pace has a lot of light Puma has some big news this spring and summer, with Italy and Spain announced the official cutting-edge design studios, fashion drawing lines in Europe, emphasizing the leather and details of the lines, the price has not gone up in price does not change existing policies bought shoesMen used to chase girls with flowers, the success rate is limited to shoes men fed generation beauty, heart chance to win significant increase in the shoes of the woman more and more important, the former is the shoes with clothing, is, in turn, did not double the appropriate mood and the day the shape of good shoes, go out much loss of time, emotions are greatly affected Small pair of good shoes of the day, a woman became a nightmare, especially when the beautiful shoes and the price higher and higher, and the purse and taste the tug of war, and the more formidable shape; However, the above situation appears in the brand Puma significant improvements, fine a pair of shoes , equal to the number of ordinary shoes double, Puma started from the manufacturer, the quality for all to see, do not worry about Puma Baylee Future Cat biting feetMen used to chase girls with flowers, the success rate is limited to shoes men fed generation beauty, heart chance to win significant increase in the shoes of the woman more and more Puma speed Cat Shoes important, the former is the shoes with clothing, is, in turn, did not double the appropriate mood and the day the shape of good shoes, go out much loss of time, emotions are greatly affected