| From a36aea827b76b19c82b780de0762da30c230f19f Mon Sep 17 00:00:00 2001 |
| From: Todd Lipcon <todd@cloudera.com> |
| Date: Tue, 23 Sep 2014 19:09:56 -0700 |
| Subject: [PATCH] Change default TCMALLOC_TRANSFER_NUM_OBJ to 40 |
| |
| We found that this configuration was preventing good performance |
| of the central freelist in benchmarks with a lot of threads. |
| |
| After discussion with Aliaksey Kandratsenka (the gperftools maintainer) |
| we decided the best course of action was to revert to a number close to the old |
| default, which seems to improve the performance of these high-concurrency |
| benchmarks by about 4.5x. |
| |
| Any higher numbers seem to produce worse performance in our benchmarks. |
| --- |
| src/common.cc | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/src/common.cc b/src/common.cc |
| index 9d48377..c2ad054 100644 |
| --- a/src/common.cc |
| +++ b/src/common.cc |
| @@ -42,7 +42,7 @@ namespace tcmalloc { |
| // thread and central caches. |
| static int32 FLAGS_tcmalloc_transfer_num_objects; |
| |
| -static const int32 kDefaultTransferNumObjecs = 32768; |
| +static const int32 kDefaultTransferNumObjecs = 40; |
| |
| // The init function is provided to explicit initialize the variable value |
| // from the env. var to avoid C++ global construction that might defer its |
| -- |
| 1.8.3.2 |
| |