When To Use Hardware Upgrade Instead Of Software Optimization

One typical question which frequently pops up is whenever it is better to use hardware upgrade or optimize software more. I already wrote about it, for example here.

Today I’ll look at the same topic from the consultants view. When consultant should suggest hardware upgrade and when it is not in a simple checklist form.

How good is hardware ? Sometimes people use so crappy hardware it would be much cheaper for them to upgrade before purchasing much of professional services. Though in some cases people like their system to be optimal and so they want to run it on some old box even if it costs them more to optimize it. It may be valid choice allowing to take a hardware boost later down the road when you need a major performance increase and do not have a time for big application changes.

Is current hardware usage balanced ? Say you have 10 servers one of them is overloaded and 8 are almost idle. In this case proper balancing is the answer rather than getting more hardware. Of course not all of the applications can be easily balanced but it is also surprising how many cases of people with reasonable sharded or replicated architecture suffer from wrong balance. Balancing can be simple operations act or require application changes which is another variable.

Are there any spikes in hardware use ? Often performance problems happen only Sometimes….. for example nightly when you do a backup or at 15 minutes off hour when you have some cron job running. In such cases evening out the usage is often better choice than hardware upgrade and it also can be done easily.

Is MySQL, Queries, Architecture optimized well enough ? Do not advice hardware upgrade as the first thing when you can triple performance by simple my.cnf change. Well enough is a tricky term though. You need to balance things and see what can be easily done by consultant or the customer and what is not. Adding the indexes is easy. Changing the query in your own application is easy but is hard for third party application, especially if it is close source. Big schema changes, caching, sharding can be even more complication - it depends. The bigger your application is going to be the more optimal you want to be on application level to be efficient.

What is exactly your goal with hardware upgrade ? Same as with software optimizations and changes you do should have a goal. You add the index to avoid full table scan and make given query faster. You add memory to avoid disk IO and make lookups faster. The goal in the application performance - making throughput better, query faster should lead you to goals in hardware (faster random IO, better caching, faster execution) which you can use to understand what needs to be done (gettings SSD, upgrading memory, upgrading CPUs). There are number of balancing questions you have to solve too such as SSD may not need so good in memory caching any more etc. There is no such thing as better hardware really, just hardware which serves application needs better. Many of us probably remember as moving from 4 Core systems to 8 Core reduced performance for many MySQL systems even though hardware itself was superior.

There are surely more things you can look at but these are simple obvious things you can keep in mind. Do you think I should add something else ?

References
0

I specialise MySQL Server performance as well as in performance of application stacks using MySQL, especially LAMP. Web sites handling millions of visitors a day dealing with terabytes of data and hundreds of servers is king of applications I love the most. Peter is a DZone MVB and is not an employee of DZone and has posted 3 posts at DZone.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

michalsss replied on Tue, 2009/06/16 - 12:14pm

Lets start from beginning. I have started earn $$ with sports betting about 3 years ago. Firstly I was very very bed thinking about this kind of job. Lots of people said me that sports btting is just gambling and nothing more. That I have started read a lot of betting and bookmakers firms, bonuses ect. First what I found what very interested me was betfair and Betfair trading system it is nothing but exchange bets with other members of this system. It is amazing option earn lots of money. One more think what I love in betfair is great bonus with Sports betting. Firstly when You wanna start betting You have to choose of the betting system and next find good site with livescore. When You have more information about sport betting You could think about change Your bookmaker to something new like bwin or bet365. Last think what I wanna tell You is Good LUCK, read and learn as much as You can and finaly You got You succes with bookies.Best regards !!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.