Wow 34 MB of Rss with jemalloc vs 5MB in system malloc, is that correct?
@erich what's your allocation pattern like?
@federicomena I think I found the problem. I'm using the futures_cpupool, when I removed the cpupool the memory decreases to 6MB.
That CpuPool is using about 21 MB just with this line:
let pool = CpuPool::new_num_cpus();
@erich probably the per-thread stacks. What does pmap say?
@federicomena Yes!, that seems to be reason. I don't understand jemalloc (yet) but seems to be using more Rss than the system allocator. Ths is the comparison of the CpuPool with size 4, at the left is jemalloc. https://mastodon.social/media/kMgbPfhL-0KslvdImc4