[PECL-DEV] [memcache/PECL] Performance problems with set & data over 8KB

Mikael Johansson mikael at synd.info
Sun Apr 23 19:42:42 UTC 2006


Setting the chunk size > 16k seem to mitigate the problem, I've added an ini 
config directive "memcache.chunk_size" for this purpose. Using 
"memcache.chunk_size = 32768" in php.ini or "ini_set('memcache.chunk_size', 
32768);" should do the trick.

The changes are in CVS, checking out a copy is as easy as:

 cvs -d :pserver:cvsread at cvs.php.net:/repository login
 cvs -d :pserver:cvsread at cvs.php.net:/repository co pecl/memcache

Would you mind checking to see that the problem does indeed disappear with 
larger chunk sizes in your environment?

//Mikael

----- Original Message ----- 
From: "Antony Dovgal" <antony at zend.com>
To: "Mikael Johansson" <mikael at synd.info>
Cc: "Jean-François Bustarret" <jfbubus at gmail.com>; 
<memcached at lists.danga.com>; <pecl-dev at lists.php.net>
Sent: Sunday, April 23, 2006 7:53 PM
Subject: Re: [PECL-DEV] [memcache/PECL] Performance problems with set & data 
over 8KB


> Probably this is somehow related to the problem I've met in the past:
> http://cvs.php.net/viewcvs.cgi/pecl/memcache/memcache.c?r1=1.8&r2=1.9
>
> The problem is that two subsequent writes to memcached daemon are MUCH 
> more slower than one writing the same data in one chunk.
>
> This was the reason why I had to patch PECL/memcache 2 years ago and make 
> it write the data and the delimiter ("\r\n") in one call.
> I don't remember details of the conversation I had with Brad and Anatoly, 
> but I still don't know the reasons of this behavior.



More information about the memcached mailing list