shithub: mc

Download patch

ref: 5b3d26f6ff1c59e7e781660b737147ff40352130
parent: dae26bc67285c9bdc8f6093ada35d7e7ca808796
author: Ori Bernstein <ori@mmarkovcorp.com>
date: Thu Sep 28 13:56:14 EDT 2017

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.

--- a/lib/std/bytealloc.myr
+++ b/lib/std/bytealloc.myr
@@ -30,7 +30,7 @@
 
 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