summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-10-10 21:21:39 +0300
committerGitHub <noreply@github.com>2022-10-10 21:21:39 +0300
commitbd38daa40cd21f2f357b2930f529b68d96523102 (patch)
tree115ca2bffbee181ffefe22c9f6a34e8d67d03db1
parent51e6ce2863daa4ab430771ff38983bf8396dcc03 (diff)
ARAL optimal alloc size (#13804)
aral optimal alloc size
-rw-r--r--libnetdata/arrayalloc/arrayalloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libnetdata/arrayalloc/arrayalloc.c b/libnetdata/arrayalloc/arrayalloc.c
index f6b38db2f1..f4d3cb0312 100644
--- a/libnetdata/arrayalloc/arrayalloc.c
+++ b/libnetdata/arrayalloc/arrayalloc.c
@@ -6,7 +6,9 @@
#define ARAL_MAX_PAGE_SIZE_MMAP (1*1024*1024*1024)
// max malloc size
-#define ARAL_MAX_PAGE_SIZE_MALLOC (10*1024*1024)
+// optimal at current versions of libc is up to 256k
+// ideal to have the same overhead as libc is 4k
+#define ARAL_MAX_PAGE_SIZE_MALLOC (64*1024)
typedef struct arrayalloc_free {
size_t size;