why does throughput increase with number of connections even if itexceeds number of processors?

why does throughput increase with number of connections even if itexceeds number of processors?

am 06.09.2011 04:26:58 von Chuntao HONG

Hi,

I wrote a micro benchmark to test the performance of my MySQL server.
In the benchmark, which is written in C#, I created several threads,
each with a connection to the MySQL server, to insert rows into the
same table. Totally 3200 rows are inserted into the table.

When I try to vary the number of C# threads I found that the time
taken to finish the benchmark decreases, thus increasing the
throughput. The throughput increases almost linearly with the number
of C# threads, until I reach 100 threads, which is the maximum number
of connections allowed by my server.

This is quite unexpected, since the server has only two processors. I
expect the throughput to grow from one connection to two connections.
But I don't expect it to grow with more than two connections. Why is
it the case?

My Server has one Intel Xeon X3360 CPU with two cores running at
2.83GHz and 8GB of main memory. It runs Windows Server 2008 R2. The
MySQL version is 5.5.15 x64 Edition.


Thanks!

HONG Chuntao

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: why does throughput increase with number of connections even ifit exceeds number of processors?

am 06.09.2011 08:01:29 von Andrew Moore

--20cf300fadcf046cfb04ac3f8f0c
Content-Type: text/plain; charset=ISO-8859-1

Hong,

What you are seeing is probably your server's ability to keep up with your
benchmark with some comfort. I assume your benchmark isn't completing in a
couple of seconds but would presume that you are not IO bound and all
changes are happening in memory. Its hard to give you 'the' answer as you
haven't provided enough info to work with but in my estimations you aren't
working your machine hard enough. How true to your application is your
benchmark? If you are not expecting an append only workload then you might
be wasting your time merely adding records to a table whcich is what your
benchmark sounds like its doing.

Hth

Andy
On Sep 6, 2011 3:27 AM, "Chuntao HONG" wrote:
> Hi,
>
> I wrote a micro benchmark to test the performance of my MySQL server.
> In the benchmark, which is written in C#, I created several threads,
> each with a connection to the MySQL server, to insert rows into the
> same table. Totally 3200 rows are inserted into the table.
>
> When I try to vary the number of C# threads I found that the time
> taken to finish the benchmark decreases, thus increasing the
> throughput. The throughput increases almost linearly with the number
> of C# threads, until I reach 100 threads, which is the maximum number
> of connections allowed by my server.
>
> This is quite unexpected, since the server has only two processors. I
> expect the throughput to grow from one connection to two connections.
> But I don't expect it to grow with more than two connections. Why is
> it the case?
>
> My Server has one Intel Xeon X3360 CPU with two cores running at
> 2.83GHz and 8GB of main memory. It runs Windows Server 2008 R2. The
> MySQL version is 5.5.15 x64 Edition.
>
>
> Thanks!
>
> HONG Chuntao
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=eroomydna@gmail.com
>

--20cf300fadcf046cfb04ac3f8f0c--