Bcache is a cache in the Linux kernel's block layer, which is used for accessing fast disk drives such as flash-based solid state drives (SSDs) to act as a cache for one or more slower hard disk drives as a read/write cache or read cache.

Why use a Telegraf plugin for Bcache?

SSDs provide significant improvement in performance over traditional rotating SATA and SAS drives while the costs of SSDs have also declined significantly; this makes it possible for more solutions to make the switch to SSDs. Bcache has some useful metrics about how well your caches are performing, and these metrics can be ingested into an InfluxDB instance using the Bcache Telegraf Plugin. By default, Bcache Telegraf plugin gathers metrics for all Bcache devices, but you can restrict the metric collection to specified Bcache devices.

Key Bcache metrics to use for monitoring

Some of the important Bcache metrics that you can collect include:

  • Dirty_data
    • Amount of dirty data for this backing device in the cache. Continuously updated unlike the cache set's version, but may be slightly off.
  • Bypassed
    • Amount of IO (both reads and writes) that has bypassed the cache
  • cache_bypass_hits
  • Cache_bypass_misses
    • Hits and misses for IO that are intended to skip the cache are still counted, but broken out here.
  • cache_hits
  • cache_misses
  • Cache_hit_ratio
    • Hits and misses are counted per individual IO as Bcache sees them; a partial hit is counted as a miss.
  • Cache_miss_collisions
    • Counts instances where data was going to be inserted into the cache from a cache miss, but raced with a write and data was already present (usually 0 since the synchronization for cache misses was rewritten)
  • Cache_readaheads
    • Count of times readahead occurred

For more information, please check out the documentation.

Project URL   Documentation

Related Resources

Infrastructure and application monitoring

The solution to monitor your entire infrastructure stack, including servers, containers, databases and cloud services.

Linux System Monitoring Template

How to use Linux System Monitoring Template

Tomcat Monitoring Template

How to use the Tomcat Monitoring Template

Scroll to Top