← Back to team overview

mysql-proxy-discuss team mailing list archive

Re: mysql proxy IMPROVING performance?

 

Hey!

On Sat, Sep 5, 2009 at 1:37 AM, Kay Röpke<Kay.Roepke@xxxxxxx> wrote:
>
> On Sep 5, 2009, at 1:24 AM, Adrienne Porter Felt wrote:
>
>>>
>>> BTW, is this MySQL Proxy 0.7.x, or a custom built 0.8? 0.8 would be
>>> multithreaded
>>> already screwing my entire explanation even more ;)
>>>
>>
>> It's 0.7.x, whichever came with funnel.

It is based on an earlier version of 0.8. It uses event threads, but
hasn't been 'rebased' against 0.8 for a long time.

>>
>> Thank you for the brainstorming........this is extremely puzzling.  Our
>> test
>> code is very short and simple and none of us can find bugs in it; all we
>> do
>> is change the port our connection goes through (either the proxy or not
>> the
>> proxy) and time the statement.
>
>
> rats, there goes my theory… :)
>
> i'm assuming you benchmark app is simple enough to be able to share it?
> i would like to try to repeat it and gather same information on why this
> could happen.
> not that i'm overly disappointed that it's faster, but as you said: it is
> puzzling
> and i don't like not having a good answer to your questions.
>
> more work is being done, so it should never be faster than the direct path.
> there, i said it.
> ah, another thing: is this on localhost or across the network? not that i
> have any grand ideas
> but it would be good to know.

It would be good to see the scripts etc you are using. Are you making
a new connection for every query? Because if you are, you will benefit
from the funnel plugin re-using connections, but in all my benchmarks,
for a single connection, doing queries in sequential order, you will
(even MUST) be slower than going directly to the database. Thats why
it would be good to see more about your benchmarking environment

I observe this 'overhead' making the proxied connections slower, until
you reach around 100 - 150 clients (maybe more or less for your
workload). Then, if you have identified a good concurrency for you
workload and storage engine etc, you start to the benefit from the
funnel 'serialising' a larger of set of parallel queries over a
smaller set of backend connections. The benefit may not always be a
faster average query time, but you will likely get a smaller standard
deviation in query times.

Cheers

-- 
Nick Loeve



References