views:

571

answers:

8

Hi, i would to know how do you determine the hardware needed for a server?, now i have a DB Server in MySQL, now i want to buy a server, but i don't know what is the hardware that i need. This is a server for a web page.

EDIT: The software it's just MySQL Server

A: 

It depends entirely on the nature of the application(s) it will be hosting, and the load it'll put the server under (now and in the future).

When I'm 'spec'ing a server, I always buy the best spec I can afford.

I generally buy quite a standard spec, except for a database server when I try and get the fastest disks I can afford.

Galwegian
+6  A: 

It all depends on how much load is expected on the application. But as a minimum, I'd go for 2 x cpu or multi-core single cpu, at least 4GB RAM and a decent RAID controller. Depending on your performance and storage requirements - I'd start off with RAID 1 (Mirror) and extend that to RAID 10 (Mirrored stripes) across everything (SAME - Stripe and Mirror Everything).

Get some decent network points too.

That should at least give you enough headroom if you need to expand.

Guy
+1  A: 

Why not do some load testing on your current development server and base your decisions on that? You will probably find that you can use less than expected on your first server and then scale out if/when the business justifies it.

Turnkey
+1  A: 

One way is to model your system and simulate your expected load. There are some tools that can do this sort of discrete event simulation:

This stuff isn't easy, and the commercial tools will cost ya.

You could also try looking for a benchmark that's close to your expected load and see what systems give you the performance you're looking for. The TPC benchmarks would be a good place to start.

Good luck :)

Patrick Cuff
Those tools seem to be overkill. The TPC is a good idea.
Brian Carlton
A: 

Another option is not to get a separate server for the DB, but to host the DB on an existing server. There are many different options for this from virtualisation (vmware, xen) or to dedicate a single server as a "back-end database server"

It is unlikely with modern hardware that you will see significant CPU usage on a dedicated server.

Server sprawl is expensive in the long term. Eventually that server will need upgrading and replacing. If you have to replace a few dozen (or a few hundred) it can be a nightmare.

Guy
A: 

It depends on how many hits you will need it to serve. Run the program on an old standard PC if you can, run a profiler and see how much the system is taxed. the MySQL Gui Tools has a Health Monitor that will tell you what percentage the system is being used up. Chances are, youll be fine with any old PC. Unless youre serving a lot or a public site like this one (which counts as serving a lot)

Karl
A: 

Databases can be tough to size. CPU speed usually isn't key, but if it's a parallel work load, more cores is better. Lots of memory and fast disks are usually key. It's not uncommon to see 16 or 32GB of memory in a MySQL server now. Of course, that doesn't make a lot of sense if your data set is only 2 or 4GB.

If you can afford enough RAM to put your whole data set in memory (not ram disk, but having the database cache it), get that much RAM. This isn't necessarily a good long term strategy if you expect your data to grow substantially.

If your data size is larger than the amount of RAM you can afford, you can try to compensate with faster disks and using more smaller disks (8 x 74GB instead of 4x 136GB).

You can get some ideas about performance by taking hardware that you have now (assuming you don't have large servers kicking around) and running a scaled down benchmark with some sample data. That should give you an idea of where your bottlenecks are and where you need to spend more cash.

If you're working with a large vendor (Dell, HP, Sun, IBM, etc), you can ask if they'll send a demo unit with the specs your considering. That way, you can run your benchmarks before you buy the equipment.

And finally, if this is your first database server for the app and you have no idea if it's going to be successful, don't worry too much. If you start with a 'low end' server and your app is successful, you can easily forklift upgrade to a beefying server.

Gary Richardson
A: 

It depends how important your customer's perception is and available budget.

If you have little budget I'd add more memory, it's very inexpensive at the moment, especially if you use 4GG modules (the 8GB ones are more than twice as expensive at the 4GB ones where I live).

If you have a little more then think about getting a quad-core or dual-quad-core system.

If you have a bit more still get a good disk controller, ideally a SAS one with hardware RAID.

If customer perception is paramount then get a HP or IBM with redundant power supplies and all of the above, also consider trunking your NICs too if you can be bothered.

Best of luck.

Chopper3