On 18. nov.. 2009, at 17.29, Carlos Alvarez wrote:

On Mon, Nov 16, 2009 at 6:04 PM, dormando <dorma...@rydia.net> wrote:
Are you using large multigets at all?

Please forgive me if I am wrong, I am just a newbie.

Looking at the code (libmemcached), I understand that large multigets
of small items would pressure over the conection. As far as I can
imagine looking at the code, if two keys of a multiget go to the same
server, they would use two separate conections. So a big number of
multigets would dry the available conections.

for (x= 0; x < number_of_keys; x++)
{
...
    rc= memcached_connect(&ptr->hosts[server_key]);
...
}


No, it they will reuse the same connection. the call to memcached_connect there is to verify that the connection is open so that we can send data over the wire..

Cheers,

Trond

Reply via email to