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

Improve performance of the redis get command avoiding fiber switches for small set of data #123

Merged

Conversation

danielealbano
Copy link
Owner

@danielealbano danielealbano commented Jul 1, 2022

This PR fixes an optimisation that was broken in PR #99, it ensure that if the data to read from the storage are smaller than 64kb - 32 bytes everything gets sent without switching fiber context, dramatically reducing the latency.

The PR also include a non related fix that sets the build optimisation level to 2 as it's the one normally used for the packages in the distro.

@danielealbano danielealbano self-assigned this Jul 1, 2022
@danielealbano danielealbano added the bug Something isn't working label Jul 1, 2022
@danielealbano danielealbano added this to In Progress in cachegrand via automation Jul 1, 2022
@danielealbano danielealbano added this to the v0.1 milestone Jul 1, 2022
@codecov
Copy link

codecov bot commented Jul 1, 2022

Codecov Report

Merging #123 (c20a3b1) into main (e75865d) will decrease coverage by 0.50%.
The diff coverage is 41.50%.

@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
- Coverage   78.93%   78.42%   -0.51%     
==========================================
  Files          86       86              
  Lines        5041     5043       +2     
==========================================
- Hits         3979     3955      -24     
- Misses       1062     1088      +26     
Impacted Files Coverage Δ
...redis/command/network_protocol_redis_command_get.c 52.79% <31.11%> (-11.36%) ⬇️
src/protocol/redis/protocol_redis_reader.c 92.64% <100.00%> (ø)
src/slab_allocator.c 92.69% <0.00%> (-3.08%) ⬇️
src/spinlock.c 100.00% <0.00%> (+2.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e75865d...c20a3b1. Read the comment docs.

@danielealbano danielealbano merged commit d0f639a into main Jul 1, 2022
cachegrand automation moved this from In Progress to Completed Jul 1, 2022
@danielealbano danielealbano deleted the refactor_redis_get_command_to_improve_network_sends branch July 1, 2022 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
cachegrand
  
Completed
Development

Successfully merging this pull request may close these issues.

None yet

1 participant