MySQL Performance

tuffgong

[H]ard|Gawd
Joined
Jan 19, 2005
Messages
1,696
Generally speaking, how many requests per second could a MySQL database take? I know some of it depends on hardware. For example, let's say I have a crappy old AMD system with 256mb laying around and I wanted to run an internal web server and hammer it.

Don't worry...I'm not trying to take any sites down ;-) I've just always been curious.
 
I found a quick and dirty way to test is to write a php script that inserts random data in a new row, and then run it in a loop. First try inserting 100 random data entries and see how long the page takes to execute, then try 1000, and so on. You can add a timer to display how long it took to process.

You could do this with a shell script as well but php is easier and probably closer to a real life situation assuming you plan to code a web based app that will access the database.

There are probably more scientific ways to test this, but it should at least give you a general idea.
 
There's no general answer. It depends on the type of requests, the performance of the hardware, and so on. It even depends on the order of the requests. Unfortunately, it's very difficult to answer the question even in a vague sense because MySQL doesn't participate in benchmarks.
 
Generally speaking, how many requests per second could a MySQL database take?

This is akin to writing "Generally speaking, how long is a peice of string?"

But... to try and give you a more useful answer. If you are setting this up to learn about databases/ development, then it should meet your needs. One other thing, unless you are running a light linux distro - Id some more memory.
 
Thanks for the info.

So for example, my site is hosted on Blue Host on a shared device. Therefore, I assume that I definitely can't get the same performance I would out of of a managed server. I just want to be sure they don't lock my account if I generate too much traffic.
 
That's an example of what?

If you want to be sure that they won't close your account, then you need to review the agreement you have with them to see what bandwidth limits it might have, and what remedies it specifies for overages. If you don't understand that agreement, you should contact your lawyer to help you review it. Or, you might ask their support folks what their policy is regarding bandwidth usage. I don't think these things have anything to do with the performance of MySQL.
 
Back
Top