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

Add a plugin to collect bcache perf stats #2378

Closed
pponnuvel opened this issue Jan 19, 2021 · 4 comments
Closed

Add a plugin to collect bcache perf stats #2378

pponnuvel opened this issue Jan 19, 2021 · 4 comments

Comments

@pponnuvel
Copy link
Contributor

pponnuvel commented Jan 19, 2021

Collecting perf stats on bcache [0] [1] is useful to identify performance problems if they're deployed as a caching layer.
Useful stats are:

  • /sys/block/bcache*/bcache/{cache_mode,dirty_data,io_errors,sequential_cutoff,state,writeback_percent,stats_hour/{bypassed,cache_{hit_ratio,hits,misses}},cache/internal/copy_gc_enabled}

  • /sys/fs/bcache/*/{block_size,bucket_size,cache_available_percent,congested_*_threshold_us}

  • /sys/fs/bcache/*/{*,stats_*/*,internal/*,bdev*/*,bdev*/stat_*/*}

I plan to work on adding a new plugin to collect these.

[0] https://wiki.archlinux.org/index.php/bcache
[1] https://bcache.evilpiepirate.org/

@hillpd
Copy link
Contributor

hillpd commented Jan 19, 2021

This data would definitely be useful.

Be mindful of lp#1840043 [0]. It is an older issue where stat collection can severely impact system performance. The plug-in may need to check and prevent stat collection for exposed kernels.

[0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1840043

@bmr-cymru
Copy link
Member

Executing the stat collection can be gated by a predicate - we just need the right criteria for when to exclude the collection. The SoSPredicate supports various checks that are used to determine whether or not a command should run.

@pponnuvel
Copy link
Contributor Author

@hillpd Thanks, Dan, for the note. priority_stats isn't in the list of the stats I planned to collect on bcache (which degrades performance when queried). So we're OK.

@pponnuvel
Copy link
Contributor Author

pponnuvel commented Jan 24, 2021

@bmr-cymru It'd be useful if bcache are deployed as a caching device. I am thinking of IndependentPlugin with files set one of the sysfs entry something like as: b6a7a81

(I haven't tested b6a7a81 yet - will make a PR after test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants