News for hackers. Stuff that matters.

Why tcmalloc using aggresive decommit == false is a litte better than jemalloc

Hi guys, I am tuning the malloc's performance. I want to replace Apache Doris's memory allocator from tcmalloc to jemalloc. Tcmalloc's conf is : tcmalloc.max_total_thread_cache_bytes:1G, tcmalloc.aggressive_memory_decommit:0 Jemalloc's conf is: percpu_arena:percpu,background_thread:true,metadata_thp:auto,muzzy_decay_ms:30000,dirty_decay_ms:30000,oversize_threshold:0,lg_tcache_max:16

When using tcmalloc, doris's performance is about 5% higher than jemalloc in ssb-flat benchmark. Anything I forget do optimize for Jemalloc?

( 2 comments | 9 points | on HN )
Re:Why tcmalloc using aggresive decommit == false is a litte... by zX41ZdbW on Tuesday September 27, 2022 @07:12PM (#33002327)
You are talking about the old tcmalloc from 2006 that should never be used anymore. There is also a new tcmaloc: https://github.com/google/tcmalloc/

If you are in doubt, you should simply use what ClickHouse is using.

Re:Why tcmalloc using aggresive decommit == false is a litte... by mry123 on Tuesday September 27, 2022 @03:36AM (#32992493)
I see the apache doris https://github.com/apache/doris . it is another olap database, what‘s the difference with clickhouse?