By v1.10.0-beta2 of #JuliaLang, the mark phase of the garbage collector is now multi-threaded.

Let's produce more garbage then!

🙃🎈

When the number of worker threads is set to N, then the number of garbage collector threads is set to N/2, automatically.

Btw, the number of garbage collector threads can set manually by using the

--gcthreads

parameter, e.g.,

# julia --gcthreads=4

@mhsatman

Delicious. Have you done any testing to see how this affects stuff? I know people were experiencing issues with multithreaded code where it had to stop the world, and sometimes threads would be cranking and not hit a pause point, causing very long GC pauses on other threads (like tens of seconds).

@dlakelan There are numerous entries discussing the same issue - multiple threads slowing down my code - and I mentioned this problem in my recent tweets. The motivation behind adding the multiple thread feature to the GC is precisely the same. By the way, I haven't conducted comprehensive stress tests. It may or may not be related to the same issue, but @adam_wysokinski has observed some allocation improvements in the new alpha release.