[ruby-core:88244] Re: [Ruby trunk Feature#14718] Use jemalloc by default?

From: Eric Wong <normalperson@...>
Date: 2018-08-01 01:00:09 UTC
List: ruby-core #88244
> Testing the following patch with
> "MALLOC_ARENA_MAX=1 MALLOC_ARENA_TEST=1 make gcbench-rdoc"
> seems show a small improvement in VmHWM across repeated
> runs, but the results aren't stable...
> 
>        https://80x24.org/spew/[email protected]/raw

Maybe https://bugs.ruby-lang.org/issues/14955 to use MADV_FREE
directly is easier to stomach for memory-constrained systems.

> The other problems are we hit malloc a lot and we use native
> threads (despite the GVL) in unnecessary ways; and having a
> process-wide GC means the associated free() for an allocation
> can happen from a thread the allocation didn't come from.

I'm not sure how much it'll help common Ruby apps with GVL;
but mwrap[1] users should see an improvement by adding wfcqueue
support to glibc malloc:

https://public-inbox.org/libc-alpha/20180731084936.g4yw6wnvt677miti@dcvr/T/


[1] git clone https://80x24.org/mwrap.git
    (uses call_rcu for real free(3))

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next