Commit f608073
committed
Revert "introduce new stats item EvictedBytes (#93)"
This reverts commit 1412165.
Reason for revert: the exposed EvictedBytes metric is misleading - it doesn't reflect the real
eviction rate of the data in the cache, since old data is overwritten by the new data
in the cyclic buffer formed from the cache chunks, on the addition of new items to the cache.
It is impossible to detect the eviction rate since the code doesn't know when it overwrites
the already existing data. The EvictedBytes metric is just increased by the total size of chunks
on every wraparound in the shard. This can be used as a rough estimation of the evicted bytes,
but it is updated too rarely on large caches.
It is possible to add WrittenBytes metric, which will show the number of bytes written to the cache.
This metric roughly equals to the EvictedBytes metric after the cache becomes full and old data
starts to be overwritten by the new data.
Both metrics have zero practical applicability, so it is better to drop the EvictedBytes metric
even if it has been already exposed in public, in order to reduce the complexity of the code and reduce
the confusion for the users who try using this metric. All the users of this metric must stop using it.
Updates #93
Updates VictoriaMetrics/VictoriaMetrics#92931 parent 9bc5415 commit f608073
1 file changed
+2
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
| |||
237 | 234 | | |
238 | 235 | | |
239 | 236 | | |
240 | | - | |
241 | | - | |
242 | | - | |
| 237 | + | |
| 238 | + | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
| |||
270 | 266 | | |
271 | 267 | | |
272 | 268 | | |
273 | | - | |
274 | 269 | | |
275 | 270 | | |
276 | 271 | | |
| |||
308 | 303 | | |
309 | 304 | | |
310 | 305 | | |
311 | | - | |
312 | 306 | | |
313 | 307 | | |
314 | 308 | | |
| |||
377 | 371 | | |
378 | 372 | | |
379 | 373 | | |
380 | | - | |
381 | 374 | | |
382 | 375 | | |
383 | 376 | | |
| |||
0 commit comments