Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getItems() performance issue with RedisCluster (php-redis) #30351

Merged
merged 1 commit into from Feb 23, 2019

Conversation

andrerom
Copy link
Contributor

@andrerom andrerom commented Feb 22, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? TBD
License MIT

On any kind of multi loads, including tags loading where it's always the case, current code leads to an explosion of Redis lookups affecting performance on RedisCluster (as it does not support pipeline).

This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x, only using pipeline on cluster on predis as mget is more efficient (ref redis doc).

On any kind of multi loads, including tags loading, current code leads to
an explosion of Redis lookups slowing down performance.

This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x,
only using pipeline on cluster on predis as mget is more efficient.
@fabpot
Copy link
Member

fabpot commented Feb 23, 2019

Thank you @andrerom.

@fabpot fabpot merged commit 178506e into symfony:3.4 Feb 23, 2019
fabpot added a commit that referenced this pull request Feb 23, 2019
…dis) (andrerom)

This PR was merged into the 3.4 branch.

Discussion
----------

Fix getItems() performance issue with RedisCluster (php-redis)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | TBD
| License       | MIT

On any kind of multi loads, including tags loading where it's always the case, current code leads to an explosion of Redis lookups affecting performance on RedisCluster _(as it does not support pipeline)_.

This backports the code for mget() usage from 4.x in order to fix it.
It's done with one small improvment which would also be relevant for 4.x, only using pipeline on cluster on predis as mget is more efficient (ref redis doc).

Commits
-------

178506e Fix getItems() performance issue with RedisCluster (php-redis)
@andrerom andrerom deleted the redis_client_perf_issue branch February 25, 2019 15:25
This was referenced Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants