Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a Website on a dedicated server. Here are the server settings:

  • GenuineIntel, Intel (R) Core (TM) i5-2400 CPU@3.10GHz
  • Version Plesk v10.3.0_build1012110629.18 os_Ubuntu 10.04
  • OS Linux
  • MemTotal 16Gb

This website ( is an e-commerce site made up of 18000 categories and 300000 products. All running on PHP5 / MySQL.

As you can see when browsing, the display of pages is done in 5 seconds (or more) which is too long. I am looking for a way to reduce the display that is compatible with the installation of our server.

I have used varnish, but I had too many problems with the experience to retry. What do you recommend? The module page_speed google for apache 2 is it a good solution?

share|improve this question
I'm going to assume from your tag you use Apache? Maybe listing the config of your server rather than the specs would help. – TylerShads Nov 16 '11 at 13:52

Varnish is probably the right solution for you. However, you can go ahead with some other stuff as well.

Try using either of:

  1. APC
  2. Memcache

These solutions would speed up the backed access for your Apache process and remove the database access overhead for pages.

However, I'd still recommend you post a question about what issues you were facing while implementing varnish, may be those get solved, as varnish usually works great for most people.

share|improve this answer

The vendors of the e-commerce application could answer best.

On the face of it, it looks like it wants some kind of cache-control headers on the HTTP responses - an 'Expires' header or an 'Etag'. However, you don't necessarily want to be adding these everywhere, or else you could break something where the user really did need a fresh view instead of going to a cache.

Actually, it's kind of criminal that the e-commerce application doesn't adjust these headers out of the box (knowing when the cache is 'stale' is something the application knows best). I'd be looking for a different one.

Also, judging by the time required for a single request, it would seem like the application isn't cut out for the number of categories and products you're inflicting upon it. They probably do some SQL queries which involve 'table scans' (lots of disk I/O) or alternatively some complex queries which involve very large working sets in the database memory (eg. sorting 300,000 records). Indexes in the MySQL database can sometimes help these issues, but again it would be better if the installation procedure for the application added these, since one first needs to know which queries the application is likely to issue before one can optimise the database for them. Another sign that you've got the wrong e-commerce applciation for the job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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