mdelete and Cache::Memcached::delete_multi()
timo at tzc.com
Thu Nov 15 06:35:43 UTC 2007
Tomash Brechko wrote:
> On Tue, Nov 13, 2007 at 17:52:31 -0800, Brian Aker wrote:
>> Is there a benchmark showing that the multi delete performs multi key
>> delete any faster then issuing single delete commands?
> None that I know about ;). But you may experiment with mdelete.t in
> the server, or 05_delete_multi.t in the Perl module.
> I have no doubts it will outperform single deletes because of the
> latency of waiting the reply before sending the next command. More
> interesting would be to compare it to streamed delete, like the one
> that Marc is willing to share, but not yet.
It's not that hard to add multi-delete to the current clients with the
existing protocol. You can just pipeline the commands, sending all the
deletes, then reading all the responses. It means there is "\r\ndelete "
between each key instead of just " ". It may be slightly more cpu
intensive, but compared to the network latency saved, the extra cpu time
will be utterly insignificant.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the memcached