January 22, 2005
21,052 Queries per Second on AMD64 MySQL
I've been doing some performance tests on the server I built (I suppose I should stop talking about building that machine from scratch). I wasn't trying to beat some record or metric, was more interested in comparisons between speeds of different queries and different database tools.
For the fun of it, I generated a file with a million select statements against a table in the database. I enables the query cache and issued something like:
shell> mysql < million_in.sql > million.outAs shown here, I was running the MySQL command-line client, sending in a text file that contained a million select queries and putting the output into a file.
As I said, I wasn't attempting to break any records, but when the million-query process finished in 47.5 seconds, I wondered how many queries/second that might be, having seen other people use that metric. Well, 1,000,000 divided by 47.5 gives you 21,052 queries per second.
Having no idea what that meand, I went to Jeremy's weblog thinking I had seen something there along queries/second. I was actually quite suprised to find that I was in the same ballpark, albeit two years late.
I'm running the pre-built AMD64 MySQL binary a 64-bit AMD Gentoo Linux. The data directory is on a 10K SCSI disk. What I find interesting is that I only have one line in my MySQL configuration file, the one that turns on the query cache. Besides that, MySQL is running in it's generic state.
Posted by mike at January 22, 2005 10:14 PM