Actions
Bug #5163
closedarc should reap range_seg_cache
Start date:
2014-09-13
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
On a production machine we observed:
::kmastat -g
cache buf buf buf memory alloc alloc
name size in use total in use succeed fail
------------------------- ------ ------ ------ ---------- --------- -----
range_seg_cache 64 14953848 294181320 18G 3347011008
That's ~15 million bufs in use out of 294 million total, wasting >17GB of memory.
Looking at the code for arc_kmem_reap_now() I noticed that we explicitly reap
most of the ZFS caches:
for (i = 0; i < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; i++) {
if (zio_buf_cache[i] != prev_cache) {
prev_cache = zio_buf_cache[i];
kmem_cache_reap_now(zio_buf_cache[i]);
}
if (zio_data_buf_cache[i] != prev_data_cache) {
prev_data_cache = zio_data_buf_cache[i];
kmem_cache_reap_now(zio_data_buf_cache[i]);
}
}
kmem_cache_reap_now(buf_cache);
kmem_cache_reap_now(hdr_cache);
Unfortunately we don't reap the range_seg_cache. We should.
Updated by Electric Monk over 7 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 83803b51e1fa57fbf4e86ca5aa58eab6c5822dae
commit 83803b51e1fa57fbf4e86ca5aa58eab6c5822dae Author: George Wilson <george.wilson@delphix.com> Date: 2014-09-16T19:55:57.000Z 5163 arc should reap range_seg_cache Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Richard Elling <richard.elling@gmail.com> Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com>
Actions