General Question

richardhenry's avatar

Approximately how many connections per second could a MySQL server with 64mb of memory handle?

Asked by richardhenry (12692points) March 23rd, 2008

The majority of which would be SELECT queries, with a limited number of INSERT and even less UPDATE queries. None of the queries involve the joining of tables.

Observing members: 0 Composing members: 0

7 Answers

richardhenry's avatar

Nevermind. The answer is between 1200/sec and 2000/sec, but obviously dependent on the load of the request.

glial's avatar

I can’t image it being anywhere close to that high with 64 megs of ram.

richardhenry's avatar

These are from tests I ran on a Media Temple server, and it got to about that before I got my Burst Container warning. Maybe I made a mistake, but these are the results I got. The query was:

—-

SELECT * FROM mysqltest WHERE id=‘1’

—-

Which was a table with three columns and 100 rows. Obviously, if this table had more rows or columns the capacity would be less.

glial's avatar

well if you used that statement you where only selecting 1 row. Correct?

richardhenry's avatar

Correct. It seems that I was able to repeat that query 1436 times in one second, until I was flagged with a Burst Container warning and the server stopped responding until the next second commenced.

glial's avatar

But that was only 1 connection. I won’t how the results would vary with many concurrent connections. Pretty interesting. What were you using to test with?

richardhenry's avatar

Hmm I didn’t really think about that. I was basically looping connect, query, disconnect so they obviously weren’t synchronous. It was a test using PHP, so it probably wasn’t 100% reliable in terms of execution speed… interesting to get a rough idea though. I threw the file away once I was finished with it, I should have kept it and posted the script here. Shouldn’t be too hard to replicate though.

I continually measured the microtime since the request had begun, logging the microtime when each query occurred and once the total microtime reached just under one second I stopped the test.

The queries seemed to stop taking place about 300 microseconds before the second was up, so I suspected that the connections were being somehow limited. So I repeated the test with a two second duration, and sure enough there was a gap when connections were refused until the next second began.

Each time I ran this test I received an email from Media Temple warning me that my MySQL server had entered a Burst Container and that I should consider upgrading.

It’s important to note that these tests were performed on an (mt) server… and that the results may be different with different setups. Media Temple have a very individual server setup as far as I’m aware.

:-)

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther