Tag Archive for 'database'

WordPress internal object cache killed this site’s performance

As you may have noticed, this blog became very sluggish recently. Fortunately, I’ve narrowed down the cause of the lag to the WordPress internal object cache, which is supposed to increase site performance, but in my case it slowed down page load times by more than 10x, sometimes much more.

My blog’s symptoms:

  • Disabling all plugins and reverting to the default theme and displaying only 1 blog post on the homepage did not really affect my page loadtime.
  • The load delay was not an issue with PHP/MySQL at all. My page was completely executed and outputted by PHP in about 0.5-1 second (according to various plugins that showed the script execution time), but it took 10x that to cache the entire page to disk or load 100% of the page in a browser.
  • The page load lag has nothing to do with the browser on the client side. I tried Firefox, IE, Safari, and even external tools like Pingdom Full Page Tester.
  • The browser loaded 95% of the page and for some reason stalled for a long time on the footer section; making the footer empty didn’t help, and profiling the footer itself showed that PHP executed it in 0.06 seconds.

On a whim, I removed the following line that I inserted in wp-config.php to get back to a vanilla WP setup.

define(ENABLE_CACHE, true);

This line enables WP’s built-in object cache and is supposed to improve performance slightly. Problem solved!

This object cache supposedly caches database queries to disk to reduce CPU and database overhead. This should increase performance in most cases unless your disk I/O performance is very poor, like Dreamhost’s NFS storage system. This feature seems to be undocumented and had security issues in the past, but is commonly recommended as a safe way of increasing performance. I have heard that the object cache hardly improves performance, but I’d never imagined that it would slow my site down by 10x or more.

Disabling the object cache brought my page load times back to normal, with all my plugins enabled. I suppose the feature is disabled by default for a reason. If your blog is suffering from performance issues and your plugins or themes are not the cause, try disabling the object cache (if you enabled it). Comment out

define(ENABLE_CACHE, true);

in wp-config.php if needed.

However, some of the performance improvements in the upcoming WordPress 2.4 apparently have to do with the object cache. /me confused. :( I will try to find out more about what exactly the object cache does and what it did to kill my site’s performance. Thanks again, Jeff from NFSN, for helping me troubleshoot my site’s performance issues.

If you liked this post, please subscribe to my feed. Thanks for visiting!

PasswordMaker: safe, secure, simple, site-specific, smart password management

I ran out of adjectives starting with “S” to describe what I believe is the very best password management solution currently available, PasswordMaker. PasswordMaker is an implementation of the on-the-fly site-specific web password hashing system.

How many accounts/passwords do you have? One for your Email? Bank(s)? Credit card(s)? Phone companies? School? Work? Utilities? Google? Yahoo? Facebook? MySpace? Amazon? Ebay? NYTimes? Torrent trackers? That annoying website that made you register just to use the simplest feature? (Oh wait, every website is like that nowadays.) I think you get the point. Even the average, casual Internet user can easily have dozens of accounts/passwords. In this day and age, computerized password management systems are absolutely necessary for even casual Internet users, and PasswordMaker is the king of password management.
Continue reading ‘PasswordMaker: safe, secure, simple, site-specific, smart password management’

What’s the name of that song playing on TV?

Have you ever wondered about the name of a song you hear on TV? Wonder no more. Here are all the resources you’ll need to find out everything about songs you hear in TV shows, ads, and movie trailers.

As a casual music listener, hearing something new on my favorite TV show is actually a significant part of my music discovery process. In the old days, I’d scour the web, combing through forums and user comments to find out more about the song I heard. Now it takes a few seconds of research using the following websites.

Music from TV Shows

TuneFind.com is a user-maintained database of music from TV shows and movies. Users submit new data to the site, and also verify existing data by flagging entries as accurate or inaccurate. Contributors also gain or lose influence depending on the accuracy of their submissions and corrections. Very social and “web2.0″-ish. I like it. My only complaint is that the layout of the site seems buggy in Firefox.

heardontv.com is another “web 2.0″ TV music database with user-created content. However, the layout and quality of the database are both inferior to TuneFind.com.

If you can’t find what you are looking for on the above sites, you might also try TvShowSongs.com and TV Show Music. Neither of these sites have any particularly interesting features.

And just because I’m a rabid fan of House, I must include play.house, a cleanly designed House fansite which lists all the music from the show.

Music from Movie Trailers and Teasers

It’s surprising how often I stumble across great music in movie trailers. It seems to be common practice to play classics or proven pop hits or soundtrack music in trailers. For trailer music, look no further than SoundtrackNet. The site also has an interesting section, Logo Music, which lists the composers for the few seconds of (sometimes beautiful) music that accompany company logos that we see before and after movies and TV shows.

Music from TV Ads and Commercials

If you’re searching for music from a TV commercial, try What’s That Called and Adtunes.com. Neither site is a proper database as they use a blog-like format, but both sites have a search engine so you don’t have to dig through posts chronologically.