Working with D6, trying to get a page running more efficiently. I made a lot of progress by installing the Cache Backport module and configuring Redis, so devel shows my DB queries are a fraction of what they were before. Load testing shows that the site can handle a much heavier load than ever. Making progress.

The problem now is that the initial connection to the site is slow, usually 2-3 seconds but often as high as 5 or 6. It's not the database doing it, Devel shows queries are very fast, less than 500 ms on average. It seems to be pretty random. I'm working off a test server right now, I'm the only one on it, but I know it's not just me because any tests with external services show the same thing. My log files are clean, both Apache and syslog. The only other symptom I've seen is that prior to the page's load, PHP will spawn 6 processes and CPU will be high.

I've tried using XDebug to trace PHP's behavior but nothing is jumping out at me. It's definitely loading a few different files, including the Domain module, but I can't really tell what's happening.

I'm using fcgi, Debian 7, Apache is using mpm-worker, if that matters at all.

1 Answer 1


I would suggest trying to use drupals caching to cache the page and installing a php caching system such as APC or OP cache (if using php 5.4 or higher for OP caching) and this should speed up significantly. If you really want a performance hit then try using varnish to cache the pages.

The reason is by default apache does not do a very good job rendering pages in the sense of requests per second and can significantly increase when caching and exponentially increase using varnish caching.

So in short the following is good for performance:

PHP: 1. ) APC cache or OP caching. 2. ) Varnish caching 3. ) MYSQL caching such as memcache

  • It's funny you say this! I just setup eAccelerator and the page is moving wonderfully. I had been using APC but this is doing a much better job. It didn't play nicely with Redis, I need to figure out how to make it exclude specific files, but it's working great even with Redis disabled.
    – clg
    May 18, 2014 at 21:22
  • Its also funny you asked this question as I watched a very interesting drupal performance talk last night. Check it out here drupalize.me/videos/overview-performance-scalability. In a nutshell the besy way is: innodb for mysql, memcache, apc caching, nginx, and varnish. May 18, 2014 at 21:31
  • That's great, I'll check it out soon. Nginx is next on the to-do list.
    – clg
    May 19, 2014 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.