Reduce TLAB size
Prevent pathological cases like threads fighting for TLABs and doing
back to back GC for alloc each allocation.
No performance change on angler, before:
EEAC: 1161, 1171, 1211
MemAllocTest: 1005, 971, 1148
After:
EEAC: 1173, 1175, 1163
MemAllocTest: 1003, 908, 803
There is also a mysterious speed up on volantis:
EEAC: 1563, 1553, 1543
MemAllocTest: 1474, 1486, 1485
After:
EEAC: 709, 714, 709
MemAllocTest: 664, 684, 655
Bug: 28976163
Change-Id: I564908badf395b6f948aa2dafcb66fe353fc1eba
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 2a1a4a1..6fb048a 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -128,7 +128,7 @@
static constexpr size_t kDefaultMinFree = kDefaultMaxFree / 4;
static constexpr size_t kDefaultLongPauseLogThreshold = MsToNs(5);
static constexpr size_t kDefaultLongGCLogThreshold = MsToNs(100);
- static constexpr size_t kDefaultTLABSize = 256 * KB;
+ static constexpr size_t kDefaultTLABSize = 32 * KB;
static constexpr double kDefaultTargetUtilization = 0.5;
static constexpr double kDefaultHeapGrowthMultiplier = 2.0;
// Primitive arrays larger than this size are put in the large object space.