UKUUG home

UKUUG

(the UK's Unix & Open Systems User Group)

Home

Events

About UKUUG

UKUUG Diary

Membership

Book Discounts

Other Discounts

Mailing lists

Sponsors

Newsletter

Consulting

 


 

High Performance MySQL Jeremy D Zawodny and Derek J Balling
Published by O'Reilly Media
ISBN:0-596-00306-4
294 pages
£ 28.50
Published: 23rd April 2004
reviewed by Mike Smith
   in the September 2004 issue (pdf), (html)
bookcover  

High Performance. That makes you think of speed, but there's more than just raw speed to think about. This book is well thought out (however wait until you read the whole of this review before making your own minds up), covering some of the basics but reminding us that there are wider issues to consider than just tuning the app server and storage to produce a high performance service. So the book also looks at replication schemes and load balancing to support higher throughput requirements. However, surprisingly, it also covers Backup and Recovery strategy and Security.

It may be worth checking out the associated website, mentioned only in the introduction, so I missed it the first time I skimmed through the book - http://www.highperformancemysql.com/. At the time I looked, which was the first week of August, there was just a blog with four or five entries talking about the book being published - though the book itself promises scripts and future tips will be put there. (The last entry was back in April, so I have my doubts!)

There's a short chapter on basics - nothing of note here really. Then a chapter on storage engines - the main options being MyISAM, InnoDB, Heap and NDB. The engine you use for a particular table (and you can use a combination of all engines in a single database) depends on the characteristics you need supported. Only some (InnoDB and BDB) support transactions, for instance. You probably knew that already.

The next chapter covers Benchmarking - why its important, strategies and three examples (including a tool written by one of the authors). I use Winrunner and Loadrunner in commercial environments, but they're ever so expensive. The tools here are MySQL specific, and just a brief example is given for each..

Now we are getting to the main attraction. There are a few chapters on indexing, analysing and optimising queries and tuning at the server level. The indexing chapter provides a fairly basic overview - what they are and the different types - B-Trees, hashing etc. I hadn't realised MySQL now supports spatial indexes (with R-Trees), but it does. I remember doing interesting stuff with convex hulls years ago, and wonder whether these features would have helped! So in making sure you have optimal performance you need to chose the right table and right indexing schemes (obvious, really).

The server tuning chapter is a little odd. It talks about CPU, Memory, disk types, selecting a filesystem, swap etc. There were a lot of descriptions, but not a lot of recommendations with specific regard to MySQL. I found it a bit disappointing. There was also discussion about the economics of buying servers. Its all relevant I suppose, but didn't quite hit the spot for me.

Replication and load balancing. I quite liked this area - lots of diagrams and discussions about the relative merits of various schemes. I generally avoid multi-master replication because it can be a nightmare to manage and recover data consistency if things go wrong - I wouldn't recommend it unless its well controlled and well understood. The point of setting up replication in this book is not for disaster recovery (which is where I mainly use it) but to permit multiple query servers to be set up to meet a large query demand. There are explanations on how to setup replication, with example config files. Load balancing just builds on this - but although there's a lot of discussion on load balancing schemes and hardware, it doesn't go into specifics - such as using Alteon, Cisco CSS, Foundry etc. LVS is only mentioned on the last page - so rather lacking in specifics.

A strange inclusion is the chapter on backup and recovery. I can see potential in this particular book for more detailed discussion on the best backup schemes for high performance MySQL services. For instance exploiting replication to keep the backup load away from a production service. Although this point is covered in three small paragraphs, the whole chapter is far more general and quite disappointing. It covers online and offline backup schemes, dump (like Oracle exports) and raw copy backups, and taking snapshots at the filesystem or storage level.

The final chapter is on security. I just can't see why they bothered including it - they covered nothing specific to high performance. Just general MySQL accounts again, firewalls, tcp wrappers, chroot and the like.

MySQL 5.0 has Stored Procedures and 5.1 will add triggers. These features should also facilitate application performance improvements, though there was no discussion on how one might capitalise on them.

I have a mixed view on this book, but mainly disappointment. There was a lot of potential in the subject matter, but the book didn't cover it sufficiently. It was also peppered with "Jeremy did this, and Jeremy did that...". Quite annoying ... what did Derek do apart from write about what Jeremy did at Yahoo! ? (... actually, I think the answer is in the introduction - help him finish the book by writing the last 20% for him. Not good.)

Back to reviews list

Tel: 01763 273 475
Fax: 01763 273 255
Web: Webmaster
Queries: Ask Here
Join UKUUG Today!

UKUUG Secretariat
PO BOX 37
Buntingford
Herts
SG9 9UQ
More information

Page last modified 02 Apr 2007
Copyright © 1995-2011 UKUUG Ltd.