]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
log: use smaller buffer for ConcreteEntry 23721/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 6 Sep 2018 15:52:25 +0000 (08:52 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Sat, 15 Sep 2018 02:46:12 +0000 (19:46 -0700)
commit9c105090928bcd3955c68d26b787dc324c9d42d6
tree33dd1fa89a47fb3ebed568b35f9db75adad8bf4d
parentb86994e3f9315b203e927d420cd8def21dcb9e2f
log: use smaller buffer for ConcreteEntry

This brings down the static size of the memory used by the logging infrastructure:

    If we used 1024, we'd have 1088*10000 = 10880000 = 10MB in use by the ring
    buffer and 2*1088*100 = 2*108800 = 2*106KB for the m_new and m_flush
    vectors.

In my testing, 1024 covers most log entries.

Note, I've kept 4096 for the StackStringStream via MutableEntry as these are
already allocated on the heap and cached in a thread local vector. Generally
there should only be about a dozen of these allocated so it's worth keeping a
larger buffer.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/log/Entry.h