Server Upgrade


EvilDragon

Administrator
Staff member
Joined
Mar 4, 2003
Messages
29,986
Age
46
Location
Ingolstadt
I'm planning on getting a new server for the boards and the OpenPandora-websites.

As you might know, if a lot of users are browsing the server currently slows down. I don't want to think about what will happen once 4000 Pandoras are out and more and more people become interested.

So, I'm thinking about getting one of those two:

http://www.hetzner.de/en/hosting/produkte_rootserver/eq9/
http://www.hetzner.de/en/hosting/produkte_rootserver/eq8/

One has huge amounts of RAM, the other one has some good RAM buy way better CPUs.

I'm sure there are some advanced webserver admins here - what do you think?
I know MySQL and apache2 love having more RAM - but it might also be that the CPU is at its end when MySQL and apache2 are using 8 or 9 GB RAM.
Then the one with 12GB RAM and the better CPU would be way better suited.

However, maybe MySQL and apache2 don't eat up that much CPU and would run better with the slower CPU but 24GB RAM?

What do you think?
 
Current load looks like what when it peaks? Just guessing here but the system with the faster CPU also seam to have a faster setup down at the I/O level. Hardware mirroring would have been fastest, but software mirroring means it basically works against one drive, and copies it to the other while working. Hardware mirroring is faster due to the controller being able to read data of both drives, and the drive that "gets there first" gets to read it, making random seek times lower. (With SATA command queuing this is a tad more effective on software systems, but still normally slower then proper hardware setups)

It's kinda hopples to have a good opinion without more knowledge about the current system, and where peak loads run in to a dead end.
CPU alone is rarely the limit.
B!
 
take the one with more RAM. the more ram the better it is, that's at least the experience i made over the last years.

not specific about - but i got my root server at hetzner for years now (just switched to a better on recently). i can't remember when i first rented my dedicated server there - but i've always been happy with hetzner :)
 
If you can, install nginx instead of apache2. You will find that it can handle twice as many requests without breaking a sweat. It also helps that PHP is used through FastCGI in this case instead of being an Apache module. MySQL is probably going to be your biggest problem though unless you're getting over 1000 requests a second. You could setup MySQL as a cluster if you have three servers. Make one the master and the other both slaves to reduce the load.

Also, if possible, use memcached. Memcached is a godsend for server administrators hosting websites. IPBoard seems pretty advanced, especially since it isn't free, so I would guess that it supports caching with memcached.

I'm working with twitpic.com this summer as a software/systems engineeer so we have to deal with this stuff on a daily basis. Server optimization is an art in its own right.

EDIT: forgot to say that I recommend the server with more RAM. A Core i7 server is going to be fast no matter which model of the processor you get, so the more memory you can get, the better. Especially if you can use memcached. Dedicate 3 or 4GB to memcached and you'll be good to go.
 
Mr B said:
Current load looks like what when it peaks? Just guessing here but the system with the faster CPU also seam to have a faster setup down at the I/O level. Hardware mirroring would have been fastest, but software mirroring means it basically works against one drive, and copies it to the other while working.

The I/O should be fast enough for a webserver.

Currently, I limited the Apache2 threads as I only have 4GB memory and are running out easily when too many users connect.
Therefore, when there's a lot going on here, the server works fine - but you have to wait until Apache2 can server you.

CPU usage usually is between 20 - 30% (1 Dual-Core AMD Opteron(tm) Processor 1214 HE processors (2 cpu cores)), so there's still a bit room.

However, I don't know how big the CPU usage will be with 12GB RAM. :)
 
Last edited:
I'd stick with the rest of the people then. Go with more memory over CPU power.
Even if you assumed a linear relationship between memory increase vs CPU usage you'd still have plenty of headroom.
B!
 
I'd also say get the one with the more memory, the CPU will be fast enough anyway.
 
The more ram, the more speed.
I'm always surprised how fast an old machine acts when it's full of ram.
Hard drive access, even on sata raid, bloat global compute performance.
And Linux is amazing at managing cache.

I use this from time to time :
mount -t tmpfs -o size=810M,mode=777 tmpfs /mnt/ram/
And i work directly in /mnt/ram/
Dudes it can save 95% of your working time.
 
Does this also eliminate these strange "caching problems"? Because now the Forums are sometimes not responding, even when only a few people are online.
 
fusion_power said:
Does this also eliminate these strange "caching problems"? Because now the Forums are sometimes not responding, even when only a few people are online.

Those are no strange caching problems - but there are multiple domains on this server. Simply because there aren't many users online, it doesn't mean the server is not in use ;)
 
Last edited:
EvilDragon said:
Okay. Ordered the one with more RAM.

24GB should be enough for the moment :D
You will be surprised, when won't be enough :) Better if you took 64 GB. Or at least make sure that your motherboard has spare slots for more memory sticks.
 
Last edited by a moderator:
MySQL benefits more from CPU speed and memory since it is based on threads. PostgreSQL benefits more from additional CPUs and memory since it is runs multiple processes and does not share as much between processes. This makes it much better at really high levels of concurrency.

I also use the file system in RAM trick. I move the MySQL session and log tables there so that my disk is hit less for writes. I have an init.d script that saves the contents of the RAM file system and restores it on boot.

I use lighttpd (nginx would work just as well, I suspect) for serving static files. The .php requests are sent to Apache by a reverse proxy setup within the lighttpd config. This way, each web server is used for what it does best.
 
Back
Top