MySQL Configuration

We spent weeks on tweaking our MySQL database to the maximum. The results were encouraging: performance was up to 3 times higher on our Opteron machines than out of the box. On the Sun machine, the results were even more impressive, especially when we started using MySQL 5.0. MySQL 5 runs horribly slow on the T1 out of the box, but we got up to 5 times more performance out of our T2000 server after getting some excellent tweaking tips from Peter Zaitsev (MySQL) and Luojia Chen (Sun).

All testing was done with InnoDB as our storage engine in MySQL 5.0.21. We optimized for a server with 4 GB of RAM. Here is our MySQL configuration:

[mysqld]
port3306
socket= /tmp/mysql.sock
skip-locking
key_buffer = 1G
max_allowed_packet = 1M
table_cache = 1024
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
thread_cache = 125
max_user_connections = 450
max_connections = 450
thread_concurrency = 16

The "query cache" was off, as we wanted to test worst case performance. Our test database is still the same as in previous articles, about 1GB in size. The workload consists of more than 90% selects, thus this is mostly a "read intensive" workload.

MySQL Results

All numbers are expressed in queries per second.



Notice that the T1 needs about 20-30 MySQL threads to run at full speed; this is clearly a result of it's 8 core "4 thread Gatling gun core" architecture. It must also be noted that the out-of-the box MySQL performance is simply horrible, about 4-5 times lower than the well optimized numbers you see above. There is no escaping the face that you must take the time to read Sun's tunings tips well.

Once you do, the 1 GHz T1 is capable of performing like an Opteron 2.2 GHz, which is pretty amazing. Kudos to Luojia Chen and Peter Zaitsev for a job well done. While the old Xeon which consumed 4 times more power than the T1 to give the same performance looked pretty silly, the new Xeon 5160 easily outperforms the T1. The performance/Watt title will probably go to the low power Woodcrest versions, which we haven't tested yet.

Let us see what a single dual-core Woodcrest can do versus a dual-core Opteron and quad-core Sun T1.



As we were testing with only two cores, we brought back the Dual Xeon Irwindale for the test. We did a few extra tests on this platform as we also had the older Nocona platform in the labs. The additional 1MB cache of Irwindale improved our benchmark numbers by 7-8%, which is quite impressive. Our time investment in tweaking our MySQL database also made the caches and memory system more important. Finally, Hyper-Threading still doesn't pay off in MySQL: we noticed a small slowdown of about 7%.

Java Webserving MySQL Scaling and PostGreSQL
Comments Locked

91 Comments

View All Comments

  • snorre - Thursday, June 8, 2006 - link

    Anandtech is going down the drain, there are no doubts left about it IMHO.

    "Woodcrest" may be a nice improvement for Intel, but comparing it to clearly crippled (both software and hardware wise) Opteron systems is pretty lame by any standard.

    Remember: Fool us once shame on us, fool us twice shame on YOU!

    This is your third strike in my book, so now your officially out in THG hell.

    I hope you wake up and smell the coffee soon...
  • Slappi - Thursday, June 8, 2006 - link

    Exactly.

    I just can't believe what I am seeing here.

    This site was once THE HARDWARE SITE for me and I always recommended it to others.

    If Intel has a better chip hey that's great! But.... what is with the OBVIOUS underhanded reporting against AMD and for INTEL that has been going on here for the past few months?


    It is so blatant here that I am starting to wonder of Intel's new chips are a lot of smoke and mirrors. If it is such a great chip it should speak for itself, not with all this closed testing and crippled AMD machines. Makes me wonder.


    You would think after reading all the Anand Intel press that the new CPUs could cure cancer and cook dinner.
  • duploxxx - Thursday, June 8, 2006 - link

    i can give 2 pages full of rather strange figures and compares about this review. but i hope you'll bring the readers the windows benches fast and compare with other published benches so everybody can see that the linux optimization can shift wherever you want.

    you use workstaion/budget motherboard against the intel server board. use a sun galaxy or hp proliant.

    the specint and specfp are not correct, even intel gives way other numbers

    some benches are done with one socket others with 2 socket. why?

    mysql benches are optimized for two cores thats very clear.. the perfromance drop on opteron is much more the the one on woodcrest. knowing the architecture of the opteron this should be the other way round. the opteron is lacking here due to the motherboard

    you can extrapolate it in a different way showing different results, again you use 2 different opterons and use thsi difference to calculate 3.0, both setups are workstation and therefore performance is wrong. some benches you even talk and calculate 2 systems but not showing on the graphs.

    your conclusion: is rather funny. you state that the wooodcrest is the best performing server on a platform that has maybe 2% worlwide support with benches that can not be compared to other publication. no linnear powerconsuption with other servers because no exual hardware setup and most systems use 2gb/cpu thats a +28w consumption for the woodcrest.

    as stated from line 1 give some real world benches where people can compare with other posted results.
  • zsdersw - Thursday, June 8, 2006 - link

    quote:

    you use workstaion/budget motherboard against the intel server board. use a sun galaxy or hp proliant.


    The MSI K8N Master2-FAR board is a server motherboard. So are the boards in the other two Opteron servers.
  • MrKaz - Thursday, June 8, 2006 - link

    I don’t know if you all already have realized but that is what it will look like the 4x4 boards.

    And that’s NOT a server board, ONLY ONE of the processors is accessing directly to the memory and that must IMPACT the performance.

    http://www.msi.com.tw/images/product_img/mbd_img/9...">http://www.msi.com.tw/images/product_img/mbd_img/9...
  • AnandThenMan - Thursday, June 8, 2006 - link

    Anyone that calls that MSI mobo a "server board" is a freakin retard.

    As for this "review" it has to be the worst on Anandtech in at least 6 months.
  • zsdersw - Thursday, June 8, 2006 - link

    quote:

    Anyone that calls that MSI mobo a "server board" is a freakin retard.


    I guess MSI themselves must be retards then. Look where it's listed: http://www.msi.com.tw/program/products/server/svr/...">http://www.msi.com.tw/program/products/server/svr/...
  • ashyanbhog - Thursday, June 8, 2006 - link

    for those who think MSI board must be good because they list it on their server pages,

    Just look at the memeory banks

    MSI has a single bank, forcing the 2nd CPU to share the memory channel, reducing memory bandwidth to both CPUs, and increasing memory latencies. They are discarding NUMA capabailities to keep the price at around 250$

    http://www.msi.com.tw/program/products/server/svr/...">http://www.msi.com.tw/program/products/server/svr/...

    Now check Tyan k8we and Supermicro h8dci boards linked below. Notice that they all carry two seperate memory banks, giving each processor its own dedicated bank. This doubles the available memory bandwidth and keeps lantencies low.

    http://www.tyan.com/products/html/thunderk8we.html">http://www.tyan.com/products/html/thunderk8we.html

    http://www.supermicro.com/Aplus/motherboard/Optero...">http://www.supermicro.com/Aplus/motherboard/Optero...

    Iwill D8kn is another similar board that I can recall. They all recommend that you put atleast on card in each bank in a two processor setup to utilize the extra bandwidth.

    But adding this extra bank comes at a cost, all the above boards are priced around $500 mark. Its common knowledge in the AMD community that one needs get the boards with seperate memory banks if on is looking for a high performance machine.

    If you still have doubt, check the review on GamePC, linked below. Notice that the Tyan TIGER k8we, (with single memory channel to both CPUs like the MSI board) is beaten in every benchmark by Tyan THUNDER k8we (which has dedicated memory channels for both CPUs)
  • BasMSI - Friday, June 9, 2006 - link

    MSI lists them as Workstation boards, not server boards.

    http://www.msi.com.tw/program/products/server/svr/...">>>See link<<

    They should have used the K8D-Master series, those are server boards and do have NUMA.
  • zsdersw - Friday, June 9, 2006 - link

    It's under the "Server and Rackmount" section of their website.

Log in

Don't have an account? Sign up now