I am running Drupal 4.7 (though I had the same problem with 4.6) on a dedicated server (at pair.com). Athlon 2100+ CPU, 256MB of RAM, Apahce 1.3.29, PHP 4.3.10, MySQL 4.1.18. The database and web server are the same host. The site has almost zero traffic. My database is extremely small (mysqldump output is 391KB). The CPU is >99% idle. Under these conditions, page loads almost always take 3-5 seconds. I need a 10x improvement.
I installed the devel module and it shows that database queries are general taking <1ms to a few ms, with a couple sometimes taking up to 20ms. Certainly, they do not add up to anywhere near 3-5 seconds. For example: "Executed 119 queries in 81.88 milliseconds. ... Page execution time was 3057.02 ms."
What is going on?
Obviously 256MB of RAM is pretty small and I can increase it to 1GB or more if that is the problem. But if the database was swapping, wouldn't at least some of the queries being taking a substantially larger portion of the execution time?
If I am CPU bound, wouldn't I see an httpd process pegging the CPU while the page was processing? Running top with 1 second refresh, I never see httpd (or mysqld) get above 1-2% of CPU.
One potentially odd thing I noticed: my httpds are niced to -10 but mysqld is niced to +10. pair.com set this up, though they'd probably change it if I asked.
Where should I look?
Thanks,