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

Take hz into account in activerehashing to avoid CPU spikes #977

Open
wants to merge 5 commits into
base: unstable
Choose a base branch
from

Commits on Sep 2, 2024

  1. Take hz into account in activerehashing to avoid CPU spikes

    Currently in conf we describe activerehashing as: Active rehashing
    uses 1 millisecond every 100 milliseconds of CPU time. This is the
    case for hz = 10.
    
    If we change hz, the description in conf will be inaccurate. Users
    may notice that the server spends some CPU (used in activerehashing)
    at high hz but don't know why, since our cron calls are fixed to 1ms.
    
    This PR takes hz into account and fixed the CPU usage a 1% (this may
    not be accurate in some cases because we do 100 step rehashing in
    dictRehashMicroseconds but it can avoid CPU spikes in this case).
    
    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    a916df0 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. Merge remote-tracking branch 'upstream/unstable' into activerehashing_1

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    3249207 View commit details
    Browse the repository at this point in the history
  2. fix format

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    5fc8611 View commit details
    Browse the repository at this point in the history
  3. doc review from zuiderkwast, thanks

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    8c88944 View commit details
    Browse the repository at this point in the history
  4. fix format

    Signed-off-by: Binbin <binloveplay1314@qq.com>
    enjoy-binbin committed Sep 9, 2024
    Configuration menu
    Copy the full SHA
    7ffffaa View commit details
    Browse the repository at this point in the history