question on mysql proxy"s load balancing

question on mysql proxy"s load balancing

am 29.08.2008 20:13:23 von Jenny Chen

------=_Part_23460_26139932.1220033603295
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

When I read Jk's document on MySQL proxy:
http://jan.kneschke.de/projects/mysql/mysql-proxy/

In Load balancing part, he mentioned that:
"We use SQF (shortest queue first) to distribute the load across the
backends equally. Each backend will get the same number of connections."

My understanding is that if there are 100 concurrent client connecting to
the myql proxy with two backend mysql server(master and slave), the mysql
proxy will send 50 connections to the master server, and the other 50
connections to the slave server, is my understanding correct?
But I did observed very different in the simple mysqlslap test:
mysqlslap -hproxy-host -P4040 -q ./simple.sql -c 100 -i
( ./mysql-proxy --proxy-backend-addresses=master-host:3306
--proxy-backend-addresses=slave-host:3306)

on the master server, from the processlist, I saw "Threads-creates" arround
166, but "threads running/connected" only 12; on the slave server,
"Threads-creates" arround 166, but "threads running/connected" only 1. Does
anyone can please explain why this happening?
(And the mysqlslap test result was very poor compared to the same test
without mysql proxy and connecting to only one mysql server instance.)

Thanks in advance for your information.

------=_Part_23460_26139932.1220033603295--