I am using all Drupal caching options to speed up my website such as CSS, Javascript compression and page caching. Unfortunately, when I try to clean the cache manually on drupal it takes around 30 seconds. Therefore, I set cache expiry to 1 day. If I were to set this to 10 mins, my customers would wait at least 30 secs for pages to load. I can't afford this to happen.
Although I am running Drupal on a fast webserver and there are only 5000 nodes on the system, I feel this process takes too long. Think about what would happen if I were to have 50000 nodes....I've installed memcache on the server but that did not seem to speed up the process. Can you guys help me on how to reduce this cache cleaning duration?
Comments
It sounds as there may be a
It sounds as there may be a bottleneck on your mysql server. If this is the case you can address this in various ways. I am assuming since you say the server is fast that you have allocated sufficient php to running php, but that might be worth checking. Renting a server with a fast hard disk may help. Maybe you already have a server with SSD or 15k rpm hard disks? Once that is in place, a careful look at mysql tuning may help. You might also look at which tables are getting large. If it is watchdog, there is a problem with your site generating too many error messages! Maybe there is faulty code slowing down the site. There is always the option of keeping certain tables in MongoDB. However the first thing is surely to work out the reason why things are so slow, I have just thrown out some possibilities to look at to help you track down the cause(s) of the problem, which is necessary before you can plan a cure.
Digit Professionals
Hi John, Thank you for your
Hi John,
Thank you for your response. We are actually running on VPS and have only about 7000 nodes. I find this number very small in compared to other huge Drupal sites. How long should cache clean normally take with a VPS server with a 4.25 Ghz processor and 3 gigs of ram? Do you know?
Doktor
My experience suggests that
My experience suggests that 30 seconds would be pretty normal on a site of that size where a lot of the nodes and fields are in the cache. Probably the central thing you should be interested in is not the processor speed but the hard disk speed. You might ask your VPS provider about that. A 15k rmp disk array (as used by Linode and other quality providers) or an SSD should be fine.
If you are still not happy, bear in mind that Drupal has a swappable caching layer, so you can easily set some or all cache tables to use RAM instead of the hard disk, if you have enough RAM free for storing cache data (when all its other jobs have been taken into account). This can be done by using Memcache or APC or other such tools as data stores (APC is primarily a an opcode cache, but can also store data). If you do that, cache clearing can be a bit unpredictable, but the Memcache or APC or Varnish Drupal modules should handle cache clearing if you are using these tools to cache your data.
Digit Professionals