summaryrefslogtreecommitdiff
path: root/src/zmalloc.h
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2018-02-18 17:36:21 +0200
committerOran Agra <oran@redislabs.com>2018-03-12 15:08:52 +0200
commit806736cdf91658e7a8e1a2d8631b82763b508c36 (patch)
treeb5d9b0ad4be2f58dcc2de0ad355d39416b62f5bf /src/zmalloc.h
parentbe1b4aa9aa76d15bb57b7159cb559a8b9dde5513 (diff)
downloadredis-806736cdf91658e7a8e1a2d8631b82763b508c36.tar.gz
Adding real allocator fragmentation to INFO and MEMORY command + active defrag test
other fixes / improvements: - LUA script memory isn't taken from zmalloc (taken from libc malloc) so it can cause high fragmentation ratio to be displayed (which is false) - there was a problem with "fragmentation" info being calculated from RSS and used_memory sampled at different times (now sampling them together) other details: - adding a few more allocator info fields to INFO and MEMORY commands - improve defrag test to measure defrag latency of big keys - increasing the accuracy of the defrag test (by looking at real grag info) this way we can use an even lower threshold and still avoid false positives - keep the old (total) "fragmentation" field unchanged, but add new ones for spcific things - add these the MEMORY DOCTOR command - deduct LUA memory from the rss in case of non jemalloc allocator (one for which we don't "allocator active/used") - reduce sampling rate of the rss and allocator info
Diffstat (limited to 'src/zmalloc.h')
-rw-r--r--src/zmalloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zmalloc.h b/src/zmalloc.h
index 64f2f36aa..3c926bcbe 100644
--- a/src/zmalloc.h
+++ b/src/zmalloc.h
@@ -79,8 +79,8 @@ void zfree(void *ptr);
char *zstrdup(const char *s);
size_t zmalloc_used_memory(void);
void zmalloc_set_oom_handler(void (*oom_handler)(size_t));
-float zmalloc_get_fragmentation_ratio(size_t rss);
size_t zmalloc_get_rss(void);
+int zmalloc_get_allocator_info(size_t *allocated, size_t *active, size_t *resident);
size_t zmalloc_get_private_dirty(long pid);
size_t zmalloc_get_smap_bytes_by_field(char *field, long pid);
size_t zmalloc_get_memory_size(void);