If you're using Xon's addon, use his recommended settings in the FAQ.
// === Redis main cache ===
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['namespace'] = 'xf';
$config['cache']['config'] = [
'server' => '127.0.0.1',
'port' => 6379,
'password' => null,
'database' => 0,
'timeout' => 2.5,
'read_timeout' => 2.5,
'connect_retries' => 1,
'persistent' => false,
'force_standalone' => false,
'serializer' => 'php',
'use_lua' => true,
'lifetimelimit' => 2592000,
'compress_data' => 1,
'compress_threshold'=> 20480,
'compression_lib' => null,
'retry_reads_on_master' => true,
];
// === Guest page cache ===
$config['pageCache']['enabled'] = true;
$config['pageCache']['lifetime'] = 600;
$config['cache']['context']['page']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['context']['page']['config'] = [
'server' => '127.0.0.1',
'port' => 6379,
'password' => null,
'database' => 1,
'timeout' => 2.5,
'read_timeout' => 2.5,
'connect_retries' => 1,
'persistent' => false,
'serializer' => 'php',
'use_lua' => true,
'compress_data' => 1,
'compress_threshold'=> 20480,
];
Thats definitely not a default config. Why over complicate it?
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
'server' => '127.0.0.1',
'port' => 6379,
'database' => 0,
];
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['context']['page']['config'] = [
'server' => '127.0.0.1',
'port' => 6379,
'database' => 1,
];
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = [
'server' => '127.0.0.1',
'port' => '6379',
'database' => 0,
'compress_data' => 3,
'use_lua' => true,
'serializer' => 'igbinary',
'compress_threshold' => 20480,
];
This.A bit out of my depth to be honest. I use igbinary because I thought it had the best performance/balance. But yeah, bit out of my depth to comment. Perhaps @Xon can comment?
igbinary
serializer is preferred as it typically performs better when decoding which is what happens the majority of the time.phpredis
extension implements the redis protocol in C which generally performs better, but with v8.0+ the performance different is actually fairly margin now days.These are fairly complicated, and well outside what I offer for free support as "It Depends". And without customized support and testing, it is hard to determine anything besides that.Should I use replicas or sentinel etc.
Thanks for the info @Xon . This is what I ended up with after switching from PHP. Significantly less ram. I'm slowly reducing maxmemory as it runs and I look at peak.Theigbinary
serializer is preferred as it typically performs better when decoding which is what happens the majority of the time.
Thephpredis
extension implements the redis protocol in C which generally performs better, but with v8.0+ the performance different is actually fairly margin now days.
These are fairly complicated, and well outside what I offer for free support as "It Depends". And without customized support and testing, it is hard to determine anything besides that.
serverInfo
on XF 2.3.4+?If you have admins you trust so little that you don't want them to see your redis version... You've got much bigger problems than hiding that display.The Redis information block is currently shown to all administrators.
This does contain some sensitive information (Redis version, etc.) and might not be relevant anyway for administrators with limited permissions.
Could this be changed so the block is only shown to administratos with permissionserverInfo
on XF 2.3.4+?
- php 8.4+ compatibility fixes
- For XF2.3.4+, check "View server information" admin permission when viewing redis information
We use essential cookies to make this site work, and optional cookies to enhance your experience.