aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2016-07-19 14:05:20 -0700
committerChristopher Ferris <cferris@google.com>2016-07-19 18:29:48 -0700
commit53bf3353886d8ad203b448f24c3d7394b3c5da51 (patch)
tree67701dedcac2bdd5fd19b2aa65a6e0f411563d22 /include
parent354524779686d6d5518078fd681110157631c941 (diff)
downloadjemalloc-53bf3353886d8ad203b448f24c3d7394b3c5da51.tar.gz
Improve performance of jemalloc svelte config.
Change the decay time from zero to one second, to avoid problems with the purge interferring with allocations taking too long. Also, decrease the arenas from 2 to 1 for the svelte config to offset the PSS increase caused by the decay time change. Bug: 30077848 (cherry picked from commit 08795324eae5f68d211dc5483746af51203dc661) Change-Id: I8389ab5af322b6e40e6afd86193c6de8a738421b
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/arena.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/jemalloc/internal/arena.h b/include/jemalloc/internal/arena.h
index a8819f9..4062660 100644
--- a/include/jemalloc/internal/arena.h
+++ b/include/jemalloc/internal/arena.h
@@ -30,12 +30,13 @@ typedef enum {
purge_mode_limit = 2
} purge_mode_t;
/* ANDROID change */
-/* Use the decay mode purge method. By setting the DECAY_TIME_DEFAULT to
- * zero, this forces all pages to be purged as soon as they are not in use.
+/* Use the decay mode purge method. Do not set this value to zero, since
+ * forcing a purge immediately affects performance negatively. Using a
+ * small value provides a compromise between performance and extra PSS.
*/
#define PURGE_DEFAULT purge_mode_decay
/* Default decay time in seconds. */
-#define DECAY_TIME_DEFAULT 0
+#define DECAY_TIME_DEFAULT 1
/* End ANDROID change */
/* Number of event ticks between time checks. */
#define DECAY_NTICKS_PER_UPDATE 1000