Drupal Performance Problem Solved

My local Drupal instance was getting slower and slower over time, to the point where any click would take at least 10 seconds to process. I enabled Drupal's DB tracing but nothing obvious showed up in the logs. I couldn't find anything wrong with MySql either. The performance of the hosted version of Drupal seemed to be ok so I chalked it up to some weird environment issue.

While scanning the php.ini file for a different issue, I happened on the realpath cache variables. I found a few articles explaining what they did and figured it was worth a shot. After I increased these values, the local server finally became responsive again. What joy! I have a feeling that all Drupal installations should use larger values. Here's what I used:

; Determines the size of the realpath cache to be used by PHP. This value should
; be increased on systems where PHP opens many files to reflect the quantity of
; the file operations performed.
; realpath_cache_size=16k

; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
; realpath_cache_ttl=120