From 5bd879646cdb303045096fc2b9d75f565313afa8 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Wed, 15 Jul 2015 17:15:26 -0700 Subject: [PATCH] Change default chunk size from 256 KiB to 2 MiB. This change improves interaction with transparent huge pages, e.g. reduced page faults (at least in the absence of unused dirty page purging). --- doc/jemalloc.xml.in | 2 +- include/jemalloc/internal/chunk.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in index bb15ae4f..eb677ad9 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -907,7 +907,7 @@ for (i = 0; i < nbins; i++) { Virtual memory chunk size (log base 2). If a chunk size outside the supported size range is specified, the size is silently clipped to the minimum/maximum supported size. The default - chunk size is 256 KiB (2^18). + chunk size is 2 MiB (2^21). diff --git a/include/jemalloc/internal/chunk.h b/include/jemalloc/internal/chunk.h index c253cdcb..91aefad7 100644 --- a/include/jemalloc/internal/chunk.h +++ b/include/jemalloc/internal/chunk.h @@ -5,7 +5,7 @@ * Size and alignment of memory chunks that are allocated by the OS's virtual * memory system. */ -#define LG_CHUNK_DEFAULT 18 +#define LG_CHUNK_DEFAULT 21 /* Return the chunk address for allocation address a. */ #define CHUNK_ADDR2BASE(a) \