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

Optimizations in notify-one #12545

Closed
wants to merge 3 commits into from
Closed

Commits on May 24, 2024

  1. Parallelize SetState in LaunchParallelMemTableWriters

    We found that for writers s in STATE_LOCKED_WAITING, the notify-one
    function needs to be called, and the cost of calling this function is
    very high especially when there are many writers that need to be
    awakened. So, we Parallelize this progress.
    
    To wake up each writer to write its own memtable, the leader writer
    first wakes up the (n^0.5-1) caller writers, and then those callers
    and the leader will wake up n/x separately to write to the memtable.
    This reduces the number for the leader's to SetState n-1 writers
    to 2*(n^0.5) writers in turn.
    
    vcpu=160, benchmark=db_bench
    The score is normalized:
    | case name         | optimized/base |
    |-------------------|----------------|
    | fillrandom        | 182%           |
    | fillseq           | 184%           |
    | fillsync          | 136%           |
    | overwrite         | 179%           |
    | randomreplacekeys | 180%           |
    | randomtransaction | 161%           |
    | updaterandom      | 163%           |
    | xorupdaterandom   | 165%           |
    casualwind committed May 24, 2024
    Configuration menu
    Copy the full SHA
    96f1a44 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0ba82a5 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. Configuration menu
    Copy the full SHA
    860ed47 View commit details
    Browse the repository at this point in the history