The Blog That Is No More
This Blog has moved to http://www.success.grownupgeek.com
Friday, February 23, 2007
  More ways to make Drupal faster

Now that GrownUpGeek.com is regularly getting over 10,000 unique visitors per day (about 40,000 page views), and quickly closing-in on 15,000 visitors per day, I've noticed that performance isn't as great as I think it should be. Page loads for most pages are fine, but creating new forum threads or posting comments can sometimes take 15-20 seconds, and page loads on pages with many comments can sometimes take several seconds.

I figured I should have a look at the CPU usage to see where the bottlenecks might be. A quick check of CPU Usage in cPanel (I'm still pretty clueless about Unix so I have to rely on cPanel WHM) showed me that on most days the top CPU-sucker was the HTTPD (web server) process chewing on one or two .JPG files that turned out to be member avatars. Most of these avatars were from members that haven't been active at the site in months, but had posts on pages or forum threads that are now getting a lot of traffic. Since these members aren't around anymore, I deleted the particular avatar files that were sucking my CPU. Immediately after removing these files I noticed a huge improvement in page load times, and overall performance of the site. I'm not sure why something as simple as a .JPG avatar would make Drupal run so slow, but I think it has something to do with how Drupal renders the images, which is CPU intensive. In an attempt to help prevent this problem from getting worse, I reduced the allowable avatar size down to 70x70 pixels, and reduced the allowable file size to 35kb.

For the last few days since I've been watching the CPU usage and removing these old CPU-hog avatars the site has been running much better..

*Update: My CPU usage logs was still showing high usage from more avatar files. I have disabled avatars (Drupal admin menu, users, "picture support:Disabled") - after disabling user-picture support site performance increased noticeably. Moral: Drupal user avatars slow down the entire site!

For a few more ways to make Drupal faster, see my post from a few months ago here:
Speed-Up Drupal

Labels: ,

 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

__________________________