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

common/config_opts.h: compaction readahead for bluestore/rocksdb #14932

Merged
merged 1 commit into from May 4, 2017

Conversation

Projects
None yet
3 participants
@markhpc
Member

markhpc commented May 3, 2017

This greatly reduces time spent in the rocksdb compaction thread during 4K random writes on NVMe because compaction reads are mostly sequential anyway so a large readahead reduces a lot of extra overhead. Previously the CompactionIterator was issuing a read to disk for every Next() call.

Before:

    + 100.00% rocksdb::ThreadPoolImpl::Impl::BGThread
      + 94.70% rocksdb::DBImpl::BackgroundCallCompaction
      | + 94.70% rocksdb::DBImpl::BackgroundCompaction
      |   + 94.70% rocksdb::CompactionJob::Run
      |     + 94.70% rocksdb::CompactionJob::ProcessKeyValueCompaction

After:

    + 100.00% rocksdb::ThreadPoolImpl::Impl::BGThread
      + 81.25% std::condition_variable::wait
      | + 81.25% __gthread_cond_wait
      |   + 81.25% pthread_cond_wait@@GLIBC_2.3.2
      + 18.75% rocksdb::DBImpl::BackgroundCallCompaction
        + 18.75% rocksdb::DBImpl::BackgroundCompaction
          + 18.75% rocksdb::CompactionJob::Run
            + 18.75% rocksdb::CompactionJob::ProcessKeyValueCompaction

Signed-off-by: Mark Nelson mnelson@redhat.com

common/config_opts.h: compaction readahead for bluestore/rocksdb
Signed-off-by: Mark Nelson <mnelson@redhat.com>

@markhpc markhpc requested a review from liewegas May 3, 2017

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas May 3, 2017

Member

\o/

Member

liewegas commented May 3, 2017

\o/

@liewegas liewegas merged commit 4a4f019 into ceph:master May 4, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@liupan1111

This comment has been minimized.

Show comment
Hide comment
@liupan1111

liupan1111 May 4, 2017

Contributor

@markhpc which tool do you use to generate this performance graph? Thanks.

Contributor

liupan1111 commented May 4, 2017

@markhpc which tool do you use to generate this performance graph? Thanks.

@markhpc

This comment has been minimized.

Show comment
Hide comment
@markhpc

markhpc May 11, 2017

Member

liupan1111: this is a gdb based wallclock profiler I adopted to support multiple threads and made callgraphs. The src is here:

https://github.com/markhpc/gdbprof

and you can run it like this:

sudo gdb -ex 'set pagination off' -ex 'attach 19447' -ex 'source /home/ubuntu/src/markhpc/gdbprof/gdbprof.py' -ex 'profile begin' -ex 'quit'

where in the above example 19447 is the pid of the ceph-osd process I was tracing.

Member

markhpc commented May 11, 2017

liupan1111: this is a gdb based wallclock profiler I adopted to support multiple threads and made callgraphs. The src is here:

https://github.com/markhpc/gdbprof

and you can run it like this:

sudo gdb -ex 'set pagination off' -ex 'attach 19447' -ex 'source /home/ubuntu/src/markhpc/gdbprof/gdbprof.py' -ex 'profile begin' -ex 'quit'

where in the above example 19447 is the pid of the ceph-osd process I was tracing.

@markhpc markhpc deleted the markhpc:wip-rocksdb-compaction-readahead branch May 11, 2017

@liupan1111

This comment has been minimized.

Show comment
Hide comment
@liupan1111

liupan1111 May 14, 2017

Contributor

@markhpc Thanks!

Contributor

liupan1111 commented May 14, 2017

@markhpc Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment