Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I'm running a site on an Ubuntu/Apache/Django/PostgreSQL stack. We upgraded our server recently from 1 processor with 2 Gb total RAM (with 0.5 Gb of that RAM assigned to memcached) to a new server that has 2 processors with 4 Gb total RAM (with 2 Gb of that RAM assigned to memcached). However, when I looked at Google Webmaster Tools, I found out that the average page speed has worsened from 5 seconds to 15 seconds.

Why would performance get worse with a hardware upgrade? What should I check and tune? Is this more likely to be a problem with memcached, Apache, Django, or PostgreSQL?

share|improve this question

closed as too localized by Lucas Kauffman, MadHatter, voretaq7 Jul 18 '12 at 18:44

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

It will depend on the load that's on your website as well, when you are testing. – Lucas Kauffman Mar 15 '12 at 8:32
The load is basicall the same before upgrade and after it. The traffic is about 4 000 unique visitors in average per day. – Иван Mar 15 '12 at 8:43
And you did multiple measurements? – Lucas Kauffman Mar 15 '12 at 8:48
I am sorry, your comment is not clear, what measurements do you mean? – Иван Mar 15 '12 at 11:07
up vote 0 down vote accepted

Profile your setup. Check for bottlenecks. Maybe Postgres is out of IO, or you should give it more RAM instead of memcached. Use atop it collects "historical" stats and is pretty thorough.

Then do client side benchmarking, because it might be that the site is taking 10+ seconds because of too many HTTP connections, too many small images, CSS or JS files. Use Y! Slow or Google Page Speed .. or just plain and simple FireBug.

Also, you might get better results by using NGiNX for serving static content before the whole Apache/Django thing. Or drop Apache completely and use this ( ) and something like runit to keep the workers alive.

share|improve this answer

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