[erlang-questions] Turn off Garbage Collection for a time

Tobias Pfeiffer pragtob@REDACTED
Wed Jun 1 08:47:09 CEST 2016


Hi everyone,

is there a way in Elixir/Erlang to turn off the Garbage collection? I've
searched and what I found so far is :erlang.garbage_collect to force
garbage collection.http://erlang.org/doc/man/erlang.html#garbage_collect-0

I was also made aware of :erlang.spawn_opt/2 http://erlang.org/doc/man/erlang.html#spawn_opt-2 and setting a high value for min_heap_size + setting fullsweep_after.

Is there any way to turn it off completely?

Why would I want to do that? I'm working on a benchmarking tool and I
don't want garbage collection to mess with my measured execution times. I run them multiple times and standard deviation goes way up because usually GC triggers during one run of n.

Any hints welcome + thanks
Tobi

-- 
http://www.pragtob.info/




More information about the erlang-questions mailing list