objectcache: optimize MemcachedPeclBagOStuff::*Multi() write methods
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 30 Jun 2019 00:41:46 +0000 (17:41 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 16 Jul 2019 02:45:37 +0000 (19:45 -0700)
commitefba2a4afc72ae703e80db561d6d7d941cc8b668
tree5d901ccc00664d65b77558e15d1f1b192c30bc53
parent316509d9083b4b86dea516b640a7e11dc3924b7c
objectcache: optimize MemcachedPeclBagOStuff::*Multi() write methods

Make use of Memcached::OPT_NO_BLOCK and Memcached::OPT_BUFFER_WRITES
at selective points to avoid slow internal blocking for loops in the
PECL extension methods. As this mode makes the return values less
meaningful, this is only triggered only if WRITE_BACKGROUND is
provided (it only catches some glaring format or size errors that the
client runs into).

Leave changeTTLMulti() to the default as the above approach would not
make it faster, since the diver does not buffer for that command.

Expand mctest.php to include *Multi() methods and also break down the
single key method timings by method.

Change-Id: I11fc58e1a2296778b2526a0b2f3103fef1baba0c
includes/libs/objectcache/BagOStuff.php
includes/libs/objectcache/MemcachedPeclBagOStuff.php
maintenance/mctest.php