summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@mmarkovcorp.com>2017-09-28 17:56:14 -0700
committerOri Bernstein <ori@mmarkovcorp.com>2017-09-28 17:56:14 -0700
commit5b3d26f6ff1c59e7e781660b737147ff40352130 (patch)
tree6be2b54ba22137c4e474a65f2f807eb9e75a0d26
parentdae26bc67285c9bdc8f6093ada35d7e7ca808796 (diff)
downloadmc-5b3d26f6ff1c59e7e781660b737147ff40352130.tar.gz
Reduce max bucket size
Turns out that we were spending a lot of time initializing buckets. Reducing the size of the bucket reduces max alloc latency significantly, since we're not spending tens of milliseconds initializing hundreds of thousands of slots.
-rw-r--r--lib/std/bytealloc.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/bytealloc.myr b/lib/std/bytealloc.myr
index 37fd5ef..bb1be41 100644
--- a/lib/std/bytealloc.myr
+++ b/lib/std/bytealloc.myr
@@ -30,7 +30,7 @@ pkg std =
const Zslab = (0 : slab#)
const Zchunk = (0 : chunk#)
-const Slabsz = 4*MiB
+const Slabsz = 512*KiB
const Cachemax = 4
const Bktmax = 128*KiB /* a balance between wasted space and falling back to mmap */
const Pagesz = 4*KiB