master
md 139 lines 3.79 KB
Rendered Raw
1 <!--startmeta
2 custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/collectors/proc.plugin/integrations/bcache.md"
3 meta_yaml: "https://github.com/netdata/netdata/edit/master/src/collectors/proc.plugin/metadata.yaml"
4 sidebar_label: "BCache"
5 learn_status: "Published"
6 learn_rel_path: "Collecting Metrics/Collectors/Storage and Filesystems"
7 keywords: ['bcache', 'cache', 'ssd', 'block devices']
8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
9 endmeta-->
10
11 # BCache
12
13
14 <img src="https://netdata.cloud/img/hard-drive.svg" width="150"/>
15
16
17 Plugin: proc.plugin
18 Module: /sys/fs/bcache
19
20 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
21
22 ## Overview
23
24 Statistics for BCache (block layer cache) devices, including cache hit ratios, I/O operations, cache allocations, and bypass activity.
25
26
27
28
29 This collector is only supported on the following platforms:
30
31 - Linux
32
33 This collector supports collecting metrics from multiple instances of this integration, including remote instances.
34
35
36 ### Default Behavior
37
38 #### Auto-Detection
39
40 Automatically detects BCache devices by reading stats from `/sys/block/*/bcache/`.
41
42
43 #### Limits
44
45 The default configuration for this integration does not impose any limits on data collection.
46
47 #### Performance Impact
48
49 The default configuration for this integration is not expected to impose a significant performance impact on the system.
50
51 ## Setup
52
53
54 ### Prerequisites
55
56 No action required.
57
58 ### Configuration
59
60 #### Options
61
62
63
64 There are no configuration options.
65
66
67
68 #### via File
69
70 The configuration file name for this integration is `netdata.conf`.
71
72 The file format is a modified INI syntax. The general structure is:
73
74 ```ini
75 [section1]
76 option1 = some value
77 option2 = some other value
78
79 [section2]
80 option3 = some third value
81 ```
82 You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
83 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).
84
85 ```bash
86 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
87 sudo ./edit-config netdata.conf
88 ```
89
90 ##### Examples
91 There are no configuration examples.
92
93
94
95 ## Alerts
96
97
98 The following alerts are available:
99
100 | Alert name | On metric | Description |
101 |:------------|:----------|:------------|
102 | [ bcache_cache_dirty ](https://github.com/netdata/netdata/blob/master/src/health/health.d/bcache.conf) | disk.bcache_cache_alloc | percentage of cache space used for dirty data and metadata (this usually means your SSD cache is too small) |
103 | [ bcache_cache_errors ](https://github.com/netdata/netdata/blob/master/src/health/health.d/bcache.conf) | disk.bcache_cache_read_races | number of times data was read from the cache, the bucket was reused and invalidated in the last 10 minutes (when this occurs the data is reread from the backing device) |
104
105
106 ## Metrics
107
108 Metrics grouped by *scope*.
109
110 The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
111
112
113
114 ### Per disk
115
116
117
118 Labels:
119
120 | Label | Description |
121 |:-----------|:----------------|
122 | device | TBD |
123 | mount_point | TBD |
124 | device_type | TBD |
125
126 Metrics:
127
128 | Metric | Dimensions | Unit |
129 |:------|:----------|:----|
130 | disk.bcache_cache_alloc | ununsed, dirty, clean, metadata, undefined | percentage |
131 | disk.bcache_hit_ratio | 5min, 1hour, 1day, ever | percentage |
132 | disk.bcache_rates | congested, writeback | KiB/s |
133 | disk.bcache_size | dirty | MiB |
134 | disk.bcache_usage | avail | percentage |
135 | disk.bcache_cache_read_races | races, errors | operations/s |
136 | disk.bcache | hits, misses, collisions, readaheads | operations/s |
137 | disk.bcache_bypass | hits, misses | operations/s |
138
139