Source: Reasons Unbeknownst
The old saying “Need is the father of innovation” (or something like that) held true this weekend. I was looking for an easy way to benchmark MySQL for some RAM drive InnoDB experimentation but couldn’t find anything cross platform, user friendly, and created after 2005. So I built an early version of what I was looking for.
This is a very synthetic benchmark for now. In some instances InnoDB is much faster than MyISAM (simultaneous reads/writes) but that doesn’t come across in these results. I’m planning on beefing up the benchmark options in later versions. This tool is currently useful in benchmarking hard drive / RAID performance when using InnoDB. It’s also good for basic my.cnf tweaking.
So here is the PHP MySQL Benchmark Tool (PMBT) version 0.2 (download). You’ll need InnoDB (optional) and MySQLi (might change this) support for now. Tested with MySQL 5.0.51b-community.
- Easy to use: No compiling, complicated config files, or OS requirements. Web based.
- Specify your table type (MyISAM, InnoDB, MEMORY)
- Insert, Select, and Update testing (CRUd)
- Specify number of records to test
- Results displayed in operations per second (instead of total seconds)
- Custom benchmarks on existing tables
- Aesthetic Rejuvenation
- Support for non mysqli connections (do a find/replace on the code for now)
- Full text benchmarking for MyISAM
- Less Syntheticish Testing (simultaneous reads/writes (AJAX?))
- Unzip to a web accessible folder.
- Change the DB settings in dbconnect.inc.php to match your setup.
Let me know in the comments if you find this useful.
And in case you’re curious InnoDB inserts went from 100 per second to 9,955 per second on the RAM drive. MyISAM tables saw virtually no change in performance. The InnoDB log was also on the RAM drive for that benchmark. Full ACID compliance at half the speed of a Memory/Heap table ain’t bad. I’m writing up a post on how I made it happen.