Commit d64561ba authored by mcdruid's avatar mcdruid Committed by Jeremy

Issue #2996888 by mcdruid: enable compression by default with memcached extension (D7 branch)

parent fbdbd705
...@@ -641,18 +641,20 @@ default options (selected through performance testing). These options will be ...@@ -641,18 +641,20 @@ default options (selected through performance testing). These options will be
set unless overridden in settings.php. set unless overridden in settings.php.
$conf['memcache_options'] = array( $conf['memcache_options'] = array(
Memcached::OPT_COMPRESSION => FALSE,
Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,
); );
These are as follows: These are as follows:
* Turn off compression, as this takes more CPU cycles than it's worth for most
users
* Turn on consistent distribution, which allows you to add/remove servers * Turn on consistent distribution, which allows you to add/remove servers
easily easily
Other options you could experiment with: Other options you could experiment with:
+ Memcached::OPT_COMPRESSION => FALSE,
* This disables compression in the Memcached extension. This may save some
CPU cost, but can result in significantly more data being transmitted and
stored. See: https://www.drupal.org/project/memcache/issues/2958403
+ Memcached::OPT_BINARY_PROTOCOL => TRUE, + Memcached::OPT_BINARY_PROTOCOL => TRUE,
* This enables the Memcache binary protocol (only available in Memcached * This enables the Memcache binary protocol (only available in Memcached
1.4 and later). Note that some users have reported SLOWER performance 1.4 and later). Note that some users have reported SLOWER performance
......
...@@ -756,7 +756,6 @@ function dmemcache_instance($bin = 'cache') { ...@@ -756,7 +756,6 @@ function dmemcache_instance($bin = 'cache') {
$memcache = new Memcached; $memcache = new Memcached;
} }
$default_opts = array( $default_opts = array(
Memcached::OPT_COMPRESSION => FALSE,
Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT, Memcached::OPT_DISTRIBUTION => Memcached::DISTRIBUTION_CONSISTENT,
); );
foreach ($default_opts as $key => $value) { foreach ($default_opts as $key => $value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment