I've been using my 4 year old Mac Book Pro for a development environment for the past few years, and with memory (8 GB) and hard drive upgrades, speed was pretty decent. I just got a new iMac with a 3.4 GHz quad core processor and 16 GB RAM, and navigating between admin pages is slower than an arthritic snail. It literally takes up to 1 minute to just change pages in the admin section. The same pages with the exact same codebase and db change on my MBP is a matter of seconds. I'm using the same stack setup on both (Mac's Apache, MySQL and PHP via Homebrew). I have both XHProf and Webgrind set up, but both are disabled (in Devel settings for XHProf and xdebug.ini for Webgrind), so I know that's not what's causing the problem.
To troubleshoot, I turned on the query log in Devel, and it looks like at least one problem is the cache_set function. There are multiple calls to it, and every time it takes way more time than any of the other functions. Also, in looking at webgrind, the top function I'm seeing called is php:sleep, which is being called from the lock_wait() function. According to the comments in the function, sleep should only be called when a request failed to get a db lock.
So, with that info, it appears that I need to tweak my db settings. Can anyone give me some suggestions on what to change? I'm a noob to db tuning like this, so this is unfamiliar ground for me. I'm still searching myself, but any tips would be welcomed.
As a side note, my PHP memory_limit is set to 256MB, so I don't think that's a problem.