Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am looking to upgrade a server for a web app. Currently the application is running very sluggish. We've made some adjustments to mysql (that's another issue in itself) and made some adjustments so that heaviest queries get run on a copy of the database on another server was have as a backup, however this will not last that much longer and we are looking to upgrade.

Currently the servers CPUs are (4) Intel(R) XEON(TM) CPU 2.00GHz, with 1 gig of ram.

The database is 442.5 MiB, with about 1,743,808 records.

There are two parts of the program, the one, side a, inserts and updates most of the data. Side b, reads the data and does some minor updates.

Currently our biggest day for side a are 800 users (of 40,000 users all year) imputing the system. And our Side b is currently unknown, however we have a total of 1000 clients.

The system is most likely going to cap out at 5000 side b clients, with about a year 300,000 side a users.

The current database is 5 years old, so we can most likely expect the database to grow pretty rapidly, possibly double each year (which we can most likely archive older records if it comes to that).

So with that being said, should we get a server for each side of the app, side a being the master, side b being the slave, any updates made on side b are router to side a.

So the question is should i get 2 of these or 1.

  • 2 x Intel Nehalem Xeon E5520 2.26Ghz (8 Cores)
  • 12GB DDRIII Memory
  • 500GB SATAII HDD
  • 100Mbps Port Speed

And naturally, I would need to have a redundant backup so it could potentially be 4 of them.

share|improve this question
    
Is that a typo or do you really have a server with four CPUs and only 1GB of RAM? If that's the case it should be blindingly obvious how you can greatly increase the performance without having to replace the machine. –  John Gardeniers Mar 15 '11 at 20:30
    
I thought the same thing, however the server never swaps, is this normal, or will mysql only do so much with that amount of ram –  rizzo0917 Mar 16 '11 at 11:54
    
you don't say which OS but if it never swaps I'm going to assume Linux. I'm no Linux expert but my understanding (which could be completely wrong) is that if you have additional RAM it will be used for caching, which will make a difference to performance. –  John Gardeniers Mar 16 '11 at 19:00

4 Answers 4

Currently ... 1 gig of ram.

1GB, for a busy database? Really? The current size of your database is 445MB. While that is smaller than your 1GB of RAM, adding more RAM would provide space for indexes, transactions logs, and query working sets all to live in memory. If you go up to even just 4GB of RAM I'll bet you find your disk subsystem hardly matters any more and that your cpu is already adequate.

That said, I would still be looking at a new server. Hard drives only last so long and you still need to get things to disk eventually. There's also a chance that once everything is in RAM you find that you really do want more CPU power. So moving on...

should I get ... 500GB SATAII HDD

Dear Lord, no. You want at least 4 (count 'em) disks in that system (more would, of course, be better), and you want SAS disks if you can afford them. You don't need a lot of hard drive space based on what you've shown, so get the smallest (and therefore cheaper) 10K disks you can, put them in a RAID 10 configuration, and make sure you have a real, hardware-based RAID controller (sadly, expect this to add nearly $1000 to the total cost, or you haven't bought a good controller). You should be able to put all this in a 1U box, no trouble at all, but you might want to size out a 2U box with a few more bays to allow for future growth. Total cost for a system like this would be $4000-$5000.

If a system with 4 SAS disks sounds more expensive than what you wanted, go talk to your boss and tell him you can hold off on the new server this year by just adding RAM to the old one, if he can give you the money you need for a real server next year. Odds are he'll want to do both: just let you buy the RAM this year and make you cheap out on the server next year. But even if you have to settle for SATA over SAS, at least stand firm on getting 4 disks plus hardware-based RAID 10.

share|improve this answer
1  
OR get a SSD (2 mirrored) alternatively to teh discs. Or a couple more 10k discs (Velociraptros) anyhow, make sure you have IO budget, not IO deficits like most desktops, and that is what your oriiginal proposal is, IO wise. –  TomTom Mar 17 '11 at 16:14

Is the E5520 the only chip you can go to? it's a bit old now and you'd see some performance benefits going for the newer 56xx-series chips. Also that NIC will almost certainly be 1Gbps not 100Mbps, server boards don't have 100Mbps ones any more as far as I'm aware. I'd also consider using a pair of mirrored 10krpm SAS disks for DB work if I were you too. Oh and make sure you're using a 64-bit version of Centos too, ideally a recent version such as 5.6 or so.

As for your actual question, well the single machine you've specified will be considerably faster than your existing machine. I'd be tempted to try using a single machine more to the specs that I mentioned above, this will let you invest in the better disks etc. then if you ever feel you need a second machine I'd think about that at the time.

share|improve this answer

You might just want to upgrade the disk subsystem, which is probably your bottleneck. You don't state your OS, but there are tools on all of them to test how hard your disk is getting hit.

Two-drive RAID 1 for the transaction logs, and a 3-drive RAID 5 for the DB would be ideal from what you describe. Use at least SAS drives if you can.

share|improve this answer
    
CentOS release 4.3 –  rizzo0917 Mar 15 '11 at 15:41
    
During a load, try "iostat" to see if the tps are higher than 100 or so, and check the %iowait measurement to see if it creeps above 20% or so. Those combined can be an indicator of a disk bottleneck. –  Hyppy Mar 15 '11 at 16:08
1  
Also RAM - while the current 1GB is larger than the database, adding more would allow space for more index and working sets to live in RAM, disk subsystem be damned. –  Joel Coel Mar 15 '11 at 19:11

I would suggest spending a little time to understand why your current setup is "sluggish" and more accurate statistics on how many, and what type, of queries are being run on each side. Especially considering that you may have a 10x increase in traffic, if you just try to scale blindly you run the risk of scaling the wrong thing and having to scale up again next year spending a lot more time/money than needed.

A few specific things I would start looking at:

  • Get a better understanding of your current traffic. Not only how much but how much of each type. You already seem to have it split by reads/writes but also consider other types and how each impacts performance (for example, cached/uncached, slow/fast queries, etc...). The danger of considering a general category like "users" is that the different types of traffic may increase the same (ex: your reads may increase faster than your writes) and the types will also scale differently (ex: MySQL replication scales reads well but not writes). Monitoring traffic over weeks/months will also get you better trends on your future traffic growth.
  • Find out the bottleneck for your current server. Is it something simple like just CPU/Memory or are there more subtle issues involved like application/database design. Don't spend a lot money on CPU/RAM when all you need is just a better table index.
  • Benchmark/profile you system to know what its limits are. This is important not only to know when you'll need to scale up/out again but also for quantifying the system's performance when you change hardware/software settings. Did that last application revision drop performance 25%? Did tweaking that MySQL configuration do anything? Unless you measure you may never know.
  • Depending on how slow your current system is and your upgrade budget I would consider just getting one new server right away. As you set up the new server do some basic benchmarking/tests to see what sort of performance increase you'll be getting from it. If you're lucky you may find such a large increase that the question whether to get more servers will be answered for you.
share|improve this answer

Your Answer

 
discard

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.