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

Projects
None yet
4 participants
@andrerom
Copy link
Contributor

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).

Fix getItems() performance issue with RedisCluster (php-redis)
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.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Feb 23, 2019

@fabpot

fabpot approved these changes Feb 23, 2019

@fabpot

This comment has been minimized.

Copy link
Member

fabpot commented Feb 23, 2019

Thank you @andrerom.

@fabpot fabpot merged commit 178506e into symfony:3.4 Feb 23, 2019

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
fabbot.io Your code looks good.
Details

fabpot added a commit that referenced this pull request Feb 23, 2019

bug #30351 Fix getItems() performance issue with RedisCluster (php-re…
…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 andrerom:redis_client_perf_issue branch Feb 25, 2019

This was referenced Mar 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.