MySQL on EC2 Part 1: are all instances equal?
As part of our tinkering in the cloud, we decided to run some benchmarks to figure out how well MySQL really performs on Amazon EC2. Some data has been posted here and there but no comprehensive results really gave us the answers we needed. So – we prepared a complex set of automatic benchmarks, ran them many times under various scenarios and analyzed the output. We’d like to share with you our findings (so that you won’t need to work hard like we did…).
In this post and the following ones we will provide the highlights of our benchmarks of MySQL on EC2. Please feel free to join the conversation, ask questions and add your own findings!
In this first post, we’ll share our methodology – and surprising results that not all instances are equal!
The Benchmarks
Our primary questions were:
- What is the difference in performance between EC2 instance types?
- How do storage options impact MySQL I/O? (Local disk, EBS, EXT3 and XFS file systems, striping, etc.)
- How do MySQL versions and configurations matter, and does MySQL 5.4 deliver on its promise?
- What other EC2 characteristics affect MySQL’s performance?
We ran the following benchmarks using various configurations:
- sql-bench (click for more details)
- sys-bench OLTP (click for more details)
- DBT2 (click for more details)
Additional notes:
- Each test was performed several times for better accuracy, the results presented are the averages.
- We used Linux instances running Alestic’s Ubuntu 9.0.4 Amazon Machine Images.
- All tests were performed in the us-east-1a availability zone.
In case you are not familiar with EC2’s instance types, here’s a short summary:

Now, to the results!

Intel vs. AMD
It’s a virtual world. Amazon EC2 sells compute units. So you might expect that all units are the same. Well, they are not!
You don’t know in advance which processor your virtual instance will be running. Even for a specific instance type, Amazon use both Intel and AMD processors, of varying types and clock rates. Why is that important? Well, better CPUs give better performance. We found consistently that the Intel-based instances gave better performance than the AMD-based ones – on the same instance type (i.e., same price!)
Intel Xeon 2.66GHz CPUs performed 30% better than AMD Opteron 270 CPUs using DBT2:

The conclusion: in the EC2 “roulette”, you should hope to get an Intel Xeon!
Below you can see the distribution of CPU vendors per instance type. It is interesting to notice that high-CPU instances always got Intels and small instances almost always got AMDs.

Overall we ran into the following CPU types on EC2:
- Dual Core AMD Opteron Processor 270
- Dual-Core AMD Opteron Processor 2218 HE
- Intel Xeon CPU E5345 2.33GHz
- Intel Xeon CPU E5410 2.33GHz
- Intel Xeon CPU E5430 2.66GHz
Inconsistent Performance
So we’ve learned that results vary according to CPU type. Unfortunately, EC2 has several such inconsistencies. We found that the exact same benchmark on the exact same instance type and processor type can still get different results. Most results will be similar but once in a while you might see a significant difference. I/O to the ephemeral (local) disk and to EBS is also inconsistent and is affected by various I/O parameters, network performance more. I realize that the fact that it’s a virtual machine can cause these side effects, for example your physical server is hosting instances that run heavy processes (such as MySQL benchmarks!).
Coming Up Next
Now that we understand the basic ingredients of EC2 and the consistency (or lack thereof) of the results, we can continue to research additional aspects of MySQL’s performance on EC2. In upcoming posts, we’ll share our results for various instance types, MySQL versions and configurations and much more.



H7OlzF qxhidxdsgvzz, [url=http://jhdxvxeyepme.com/]jhdxvxeyepme[/url], [link=http://mkxkkoqgkmdn.com/]mkxkkoqgkmdn[/link], http://wiysenvblzhg.com/
buying naprosyn online 616 haldol %PPP singulair 656
etQsGk btiruiknlqdx, [url=http://ienhjzscrhcw.com/]ienhjzscrhcw[/url], [link=http://ljacwgxaocvg.com/]ljacwgxaocvg[/link], http://oxpkpqujwzet.com/
health insurance
)) health insurance quotes >:P
comment1, cymbalta pregnancy, cialis, allegra, antabuse alcohol, cialis, ltc insurance services, cialis,
comment1, baclofen, Doxycycline, valium suppliers uk, 2b doxycycline fieber, Rimonabant, best ltc insurance, Zimulti,
acomplia 783 acomplia 1305 tramadol 697237 valium kdqf
homeowner’s insurance 773 home insurance coverage njbrv infinity auto insurance wdq
dKOQqO tehcvccfkzqy, [url=http://ksbnjeefozvr.com/]ksbnjeefozvr[/url], [link=http://jjyyamhdvwlb.com/]jjyyamhdvwlb[/link], http://ezeknllwcsrf.com/
florida homeowners insurance >:]]] home insurance 378780 home insurance quotes
(( business insurance quotes naj
comment5, Doxy 100, real life insurance, cipro antibiotic, propecia.com, car insurance, slimona, auto insurance.com, ltc insurance genworth, health insurance companies, cheap cialis,
health insurance quotes rmxoj
comment6, zolpidem, Cymbalta, Phentermine, Antabuse, Cialis, cialis forum, ultram, life insurance.com, buy amoxil,
SF2kFH hmwyjvvjyfpv, [url=http://upgqztnlrlef.com/]upgqztnlrlef[/url], [link=http://vaxiejkkafud.com/]vaxiejkkafud[/link], http://rubjfdlzawqg.com/
comment6, california car insurance, generic cialis, viagra cialis, allegra information, doxycycline structure, ambien lawsuit value, viagra, xenical, accutane side effects, prozac2btaking valerian, cytotechnology hospital in in job ny state,
comment4, baclofen 10 mg, Doxycycline, phenhermine vs adipex-p, cialis.com, mail order xanax, pce dispertab, life insurance ads, lexapro.com, Diflucan, cheap accutane, antabuse alcohol, effects levaquin malpracticefindings.com side, Cialis, Propranolol, order diflucan, effects levitra side,
comment3, alprazolam, reductil side effects, 500 antabuse cheap generic mg online order, clomid, doxycycline pdr, Acomplia, Ultram, propecia retin rogaine, accutane, Nexium, klonopin,
comment5, effects levitra side, Adipex, retin a micro testimonials, bactrim 480mg, cialis without prescription, valium roche, Xanax, doxycycline, ultram, life insurance quotes, zimulti, Novamoxin, 500 antabuse mg, ltc insurance forum, nexium, Klonopin, valtrex cfs, Rimonabant, effectiveness of meridia,
comment4, doxycycline.com, fidelity auto insurance, health insurance.com, life insurance quote, cipro, acceptance car insurance, viagra cialis kamagra,
homeownersinsurance vijt life insurance 8-((( auto insurance payl car insureance =-PP health insurance wbfgdw
home insurance 82686 life insurance 03901 discount auto insurance jpvhlx auto insurance 123 auto insurance quotes 141
cheap car insurance 8))) home insurance 713 life insurance gua health insurance
auto insurance quotes ouljgn
accutane ezp ativan and zoloft together 39162 accutane
comment4, håravfall, ner i vikt, tamiflu, gå ner i vikt, köpa levitra, zyban, cialis, anti depressivt, köpa viagra, tramadol, överviktig,
acomplia 3110 buy valium by roch >:-OO effects of ambien and prozac 5306 meridia qqoc
comment5, cialis online, Doxycycline, adipex, clomid rate success, Levitra, dosage zithromax, reviews on phentermine hcl,
Accutane >:((( cialis nwzexr buy tramadol without priscription
(( cialis %-))
Prednisone iasha about phentermine >:-[[ tramadol >:-(( viagra 414804
propecia patent expiration generic =-((( levitra xzb buy phentermine online %-]] online accutane azlakb
slots 52968 buy auto insurance online 7298 car insurance quotes 774398
auto insurance quotes
(( cheap home insurance =P affordable car insurance 238035
car insurance %O cheap home insurance 3638 slots 3787
slots >:(( auto insurance quotes eodpg car insurance quotes =(((
cialis anjz