Expected behaviour
Same performance between client / server on version 5.1 vs 5.2
Actual behaviour
We have upgraded some days ago to phpredis 5.2.1. After the upgrade we have seen that the CPU usage on our Redis servers have increased a lot (between 30-60%). Last night we got into trouble and narrowed the issue down to the phpredis upgrade.
We have downgraded all servers to 5.1.1. and we directly see the positive impact on our Redis servers. It looks like something has changed on persistent connection handling.
In version 5.2.1 we see a lot of echo requests with phpredis_pool, which doesn't exist on 5.1.1. The issue seems to come from here, at least its one visible aspect. In 5.1.1 we also do not see any "Ping" comments to keep alive the persistent connection
a5f9592
This graphs shows the CPU usage of one Redis server. Until 10:00 it was 5.2.1 and then downgraded to 5.1.1. Nothing else has changed application wise.

Connection is done like this:
$this->db_norepli2->pconnect('elasticache-hostname', 6379, 10, NULL, 20);
I'm seeing this behaviour on
- OS:
- Redis:
- PHP:PHP 7.3.11 (cli) (built: Oct 31 2019 18:30:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies
Server
redis_version:5.0.4
Clients
connected_clients:16833
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0
instantaneous_ops_per_sec:33981
Steps to reproduce, backtrace or example script
I've checked
I have found this issue which might be related #1668
We never had any connection issues on persistent connections with version 5.1.1.
Expected behaviour
Same performance between client / server on version 5.1 vs 5.2
Actual behaviour
We have upgraded some days ago to phpredis 5.2.1. After the upgrade we have seen that the CPU usage on our Redis servers have increased a lot (between 30-60%). Last night we got into trouble and narrowed the issue down to the phpredis upgrade.
We have downgraded all servers to 5.1.1. and we directly see the positive impact on our Redis servers. It looks like something has changed on persistent connection handling.
In version 5.2.1 we see a lot of echo requests with phpredis_pool, which doesn't exist on 5.1.1. The issue seems to come from here, at least its one visible aspect. In 5.1.1 we also do not see any "Ping" comments to keep alive the persistent connection
a5f9592
This graphs shows the CPU usage of one Redis server. Until 10:00 it was 5.2.1 and then downgraded to 5.1.1. Nothing else has changed application wise.
Connection is done like this:
$this->db_norepli2->pconnect('elasticache-hostname', 6379, 10, NULL, 20);
I'm seeing this behaviour on
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.11, Copyright (c) 1999-2018, by Zend Technologies
Server
redis_version:5.0.4
Clients
connected_clients:16833
client_recent_max_input_buffer:2
client_recent_max_output_buffer:0
blocked_clients:0
instantaneous_ops_per_sec:33981
Steps to reproduce, backtrace or example script
I've checked
developbranchI have found this issue which might be related #1668
We never had any connection issues on persistent connections with version 5.1.1.