I was running some MySQL benchmarks the other day to test performance with a small (mostly static) database and a big query cache. Imagine my surprise when I was able to get over 20,000 queries per second.

Wow.

Here's the best part--the hardware is over two years old.

Yup. The MySQL box was a Dual P3-933 with 1GB RAM and some 10k RPM SCSI disks in a RAID-5 setup. (Not that the disks mattered at all.) It was running MySQL 4.0.12 on RedHat 9.0 with the 2.4.20-6smp kernel.

Now, where can I find a dual 2.4GHz machine on which to repeat the test... :-)

Update: It looks like I'll be able to run the test on a dual 2.8GHz FreeBSD 4.8 box in the next couple of days. Excellent.

Posted by jzawodn at May 06, 2003 10:33 AM

Reader Comments
# Jason said:

I have a dual 2.4 ghz Xeon machine...you could send the code to me and I could test it! :-)

on May 6, 2003 12:08 PM
# Dan said:

Yeesh, you've got what would, not too long ago, be considered a machine from hell and you're surprised that you can get 20K TPS out of it? Unless you've got hairy queries I'd have been surprised if you hadn't.

Geez, kids these days just don't realize what sort of hardware they're sitting on... :-P

on May 6, 2003 12:21 PM
# Chris said:

Well...if your machine is TOO slow you can always give it to me. Im always looking for a new one ;)

on May 6, 2003 12:39 PM
# Steve Friedl said:

> Now, where can I find a dual 2.4GHz machine on which to repeat the test...

Um, at your new job maybe? :-)

on May 6, 2003 12:40 PM
# Matt said:

Do you have any advice on tweaking the query cache?

on May 6, 2003 01:28 PM
# Arcterex said:

Geez Jeremy, make me feel bad why don't you. I've been trying to convince myself for a while now that my k7-900 512mbram is "not that old" :P

on May 6, 2003 02:30 PM
# Sean Brunnock said:

What kind queries? All fixed-length columns in the table?

on May 7, 2003 05:04 AM
# tzicha said:

Hmph. Old, slow machine. Come join me with my 'speed-demon' development machine: P-133 w 90MB Ram. Wow, what a power house!

on May 7, 2003 05:23 AM
# Jeremy Zawodny said:

"What kind of queries?"

It does't matter. They were hitting the query cache.

But since you want to know, they were single row lookups on the primary key in a MyISAM table (variable length rows).

on May 7, 2003 08:12 AM
# Ryan Tharp said:

What's your config? i.e. key_buffers etc...

on May 7, 2003 04:10 PM
# redhatter said:

Jeremy, was MySQL installed via RPMs or from source? I tried to install a copy from source (I need MySQL to be able to handle at least 1000 concurrent connections, I thought NPTL might help) I used configure tips from the install docs, but 'make test' always fails - RH 9.0

on May 8, 2003 12:18 AM
# Yusuf said:

Jeremy, How many connections did you have open to the mysql server ? Does increasing/decreasing this make a difference to your benchmarks

on May 9, 2003 02:16 AM
# Mark Maunder said:

Thanks, I searched on google for mysql benchmarks as we're coding a serious system around 4, and your site came up. I can sleep easier tonight as I doubt we'll need 20k tps anytime soon.

on May 11, 2003 11:44 PM
Disclaimer: The opinions expressed here are mine and mine alone. My current, past, or previous employers are not responsible for what I write here, the comments left by others, or the photos I may share. If you have questions, please contact me. Also, I am not a journalist or reporter. Don't "pitch" me.

 

Privacy: I do not share or publish the email addresses or IP addresses of anyone posting a comment here without consent. However, I do reserve the right to remove comments that are spammy, off-topic, or otherwise unsuitable based on my comment policy. In a few cases, I may leave spammy comments but remove any URLs they contain.