kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

Expose some stats in RocksDB Perf Context and IO Stats Context

Open mathspanda opened this issue 3 years ago • 1 comments
trafficstars

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Motivation

Stats in Perf Context or IO Stat Context are useful to pinpoint some performance issues of redis commands. For example, Counters internal_delete_skipped_count could illustrate why zrangebyscore is so slow if there is too many tombstones.

Solution

No response

Are you willing to submit a PR?

  • [x] I'm willing to submit a PR!

mathspanda avatar Aug 21 '22 15:08 mathspanda

@mathspanda Thanks for your report, internal_delete_skipped_count makes a lot sense, would you like to contribute it?

git-hulk avatar Aug 22 '22 04:08 git-hulk

Hi @git-hulk , if nobody is working on this, can I take over?

chrisxu333 avatar Nov 25 '23 17:11 chrisxu333

@chrisxu333 Thank you!

git-hulk avatar Nov 25 '23 18:11 git-hulk

https://github.com/apache/kvrocks/pull/1902

As mentioned here, maybe compaction-cpu-time can also be added here.

mapleFU avatar Nov 26 '23 10:11 mapleFU

@git-hulk As I'm thinking, this exposure of rocksdb perf and io stats would incur additional costs, so we maybe need a toggle to control it? Also what would be the proper way of displaying such stats, I'm thinking include them inside the result of info command?

chrisxu333 avatar Nov 26 '23 16:11 chrisxu333

Hi @chrisxu333

Yes, I didn't think through this issue. It's not only about how to display the information but also how to collect that perf information since we don't enable them by default.

git-hulk avatar Nov 27 '23 12:11 git-hulk

Hi @chrisxu333

Yes, I didn't think through this issue. It's not only about how to display the information but also how to collect that perf information since we don't enable them by default.

Sounds good I'll try to figure out a design :)

chrisxu333 avatar Nov 27 '23 15:11 chrisxu333

Hi @git-hulk and @PragmaTwice , I've opened a pr for this issue. Please help review :)

chrisxu333 avatar Dec 18 '23 15:12 chrisxu333