This method says "See binary searching" but I can't find anything relevant on the page. I would like to see an example or two of how to use bsearch. https://ruby-doc.org/core-3.1.2/Array.html#method-i-bsearchmperham (Mike Perham)
nerdrew (Andrew Lazarus) wrote in #note-22: > Is this request still being considered? I consider this issue (and really any decade-old issue) irrelevant. Please close.mperham (Mike Perham)
Hi, new Apple M1 processors have "performance" and "efficiency" cores. Apple provides a QoS API so threads can tune which cores they should execute on. Some threads should be executed as high-priority, some should be treated as low-prior...mperham (Mike Perham)
Sam, I'm ok with your suggestion, any progress here is welcome. The main issue with tcmalloc is that Ruby doesn't support it out of the box with a `--with-tcmalloc` flag. Are you using LD_PRELOAD instead?mperham (Mike Perham)
> Ideally I would like a new Ruby runtime flag --long-lived that was tuned for long run times (e.g low malloc arena count, JIT enabled) vs script/short usages where I want maximum performance. > ... The JVM has had server and client VMs...mperham (Mike Perham)
If jemalloc 5.1.0 is using too much memory, you can tune its arenas in the same way as glibc: ~~~ MALLOC_CONF=narenas:2,print_stats:true ~~~ https://github.com/jemalloc/jemalloc/blob/dev/TUNING.mdmperham (Mike Perham)
Another graph from a production Rails app:  https://twitter.com/krasnoukhov/status/998662977891913728 Edit: Not sure why the image isn't showing...mperham (Mike Perham)
Yusuke, your script doesn't create any memory fragmentation, it throws away everything after 1600 and reads the exact same amount of data each time. I don't believe this is how Rails apps behave; they fragment over time. My script crea...mperham (Mike Perham)
Dennis, your results match my results (Ubuntu 18.04, gcc 7.3, glibc 2.27). jemalloc 3.6 is slow but space efficient. jemalloc 5.1 is faster but almost as bad with space as untuned glibc. MALLOC_ARENA_MAX=2 is fast and space efficient ...mperham (Mike Perham)
Yusuke, I'm not sure, I can't explain that. It does get worse as the machine gets larger. A machine with more cores will see larger bloat, which is what that graph above shows (36 cores, 40GB -> 9GB); the GVL does not appear to help. ...mperham (Mike Perham)