PDA

View Full Version : opinions on forum server upgrade


techdeals07
10-28-2008, 09:10 PM
We are a decent size forum. We run 300-500 users online 90% of the time with a traffic spike a few days a month of up to 6000 users. We handle the load pretty well up until around 4000 users, where we see a few timeouts but it's generally fairly tolerable.

We are currently running on a Intel Core2 Duo CPU E7200 @ 2.53GHz, CentOS 32 bit, 4gb ram.

Anyway, our host is offering us a free upgrade of either an additional 4gb ram (bringing the total to 8gb) or a Quad Core Q6600 @ 2.40GHz.

Need opinions on which one of these upgrades will give us the biggest performance boost during those peak times we are getting slammed.

kermit2
10-28-2008, 11:32 PM
Hard to say for certain. You really need spend a bit of time watching the server (during normal operation) and seeing what the RAM/CPU usage are like. You'll get an idea of CPU usage from vmstat (lots of blocking processes == bad). With memory it'll be trickier as a good chunk of it will probably be taken up by caches and buffers. You can look at memory usage with 'free', but a better indication might be the I/O columns of vmstat - ideally you want disk IO to be low, and more memory is often a good way to do that.

Are Apache and MySQL both on the same machine?

techdeals07
10-29-2008, 12:06 AM
Here's vmstat from a few minutes ago. Currently Active Users: 1866 (992 members and 924 guests)

https://vborg.vbsupport.ru/external/2008/10/6.jpg

No idea what this means...:-)


And yes, Apache and MySQL on the same box.

SEOvB
10-29-2008, 01:19 AM
Take the ram!

techdeals07
10-29-2008, 03:37 PM
Take the ram!

My initial thoughts as well, but some concerns with 32bit CentOS / 4gb memory limitation / PAE Kernal...

djxcee
10-29-2008, 07:30 PM
I say upgrade the processor. Adding more ram is cheaper then getting a different processor.

kermit2
10-29-2008, 08:49 PM
Trying running 'vmstat 20'. That'll cause it to output every 20 seconds. Leave it running for 10 minutes or so ... should give you a better idea of what's going on

puertoblack2003
10-30-2008, 05:38 AM
Hard to say for certain. You really need spend a bit of time watching the server (during normal operation) and seeing what the RAM/CPU usage are like. You'll get an idea of CPU usage from vmstat (lots of blocking processes == bad). With memory it'll be trickier as a good chunk of it will probably be taken up by caches and buffers. You can look at memory usage with 'free', but a better indication might be the I/O columns of vmstat - ideally you want disk IO to be low, and more memory is often a good way to do that.

Are Apache and MySQL both on the same machine?


just curious about this.Is there a difference when you run apache and mysql in the same box?

kermit2
10-30-2008, 11:58 AM
just curious about this.Is there a difference when you run apache and mysql in the same box?

If the server is just running Apache, I tend to find CPU to be the bottleneck - memory usage is modest, but PHP execution tends to be CPU hungry.

With a dedicated MySQL machine, you're hoping that as much of the database as possible will be cached in memory (faster than reading the data from disk), so memory tends to be the bottleneck. Of course MySQL can be CPU intensive too (eg when searching), but a lot of the time it isn't, and in those situations, having the data already cached in RAM can be a big performance boost.

If both Apache and MySQL are on the same box it's harder to know which is the bottleneck

puertoblack2003
11-01-2008, 03:43 PM
If the server is just running Apache, I tend to find CPU to be the bottleneck - memory usage is modest, but PHP execution tends to be CPU hungry.

With a dedicated MySQL machine, you're hoping that as much of the database as possible will be cached in memory (faster than reading the data from disk), so memory tends to be the bottleneck. Of course MySQL can be CPU intensive too (eg when searching), but a lot of the time it isn't, and in those situations, having the data already cached in RAM can be a big performance boost.

If both Apache and MySQL are on the same box it's harder to know which is the bottleneck

ok, so the issue is bottleneck? would you suggest to keep it in a separate box ?

kermit2
11-02-2008, 10:20 PM
Not necessarily. I'm not aware of there being any benefit to having two medium spec servers versus one high spec server. I think the reason some people choose seperate servers for Apache and MySQL is either price (since you're paying a premium for a top-end machine); or because a single machine (even a high-end one) isn't powerful enough for their needs, and splitting Apache onto one machine and MySQL onto another is the logical (and easiest) way to spread the load over the two machines.