What's the go with the GC these days?
Francesco Mecca
me at francescomecca.eu
Tue Jan 8 09:39:07 UTC 2019
On Tuesday, 8 January 2019 at 04:34:11 UTC, Jonathan M Davis
wrote:
> If we could solve the forking problem on Windows so that we
> could actually have a cross-platform concurrent GC like the
> Linux one that Sociomantic has used, then that would likely
> give similar benefits (if not better) without having to muck
> with the type system. I forget exactly what the stop-the-world
> pause times were, but they were pretty low. If a thread really
> couldn't afford to be stopped at all, it would still need to be
> separate from the GC, just like now, but that would be true of
> a solution that involved thread-local heaps as well.
>
I don't want to talk about my work (mentored by Leandro of
Sociomantic) until it is done, but the concurrent GC has been
mentioned so many times in this thread that I can't refrain to
show current results.
This are the pause times for Dustmite:
Not forking GC (Linux):
Collection time Stop-the-world time
0 0.000139 0.000137
1 0.000172 0.000155
2 0.001917 0.001033
3 0.013672 0.007031
4 0.028831 0.017149
5 0.073201 0.042553
6 0.175916 0.103788
7 0.271328 0.179002
8 0.607061 0.375101
Forking GC (Linux):
Collection time Stop-the-world time
0 0.000128 0.000125
1 0.000025 0.000125
2 0.000163 0.000155
3 0.003665 0.000155
4 0.000569 0.000564
5 0.023067 0.000564
6 0.001888 0.001882
7 0.062640 0.001882
8 0.004437 0.004429
9 0.118210 0.004429
10 0.009619 0.009613
11 0.251923 0.009613
As you can see the pause times are way lower.
This is true for many other small programs used for benchmarking.
Back in the old TangoRT times the concurrent GC even improved the
program execution time but this is no longer true mainly because
Martin Nowak implemented a similar strategy for the eager
allocation of pools.
I was already contacted by Mike in order to report the status of
the project for the SAOC so I hope we can disclose more in the
upcoming weeks.
This post highlights a possible way to implement the forking
behaviour on Windows as well, but I haven't touched a Windows box
in years.
https://rainers.github.io/visuald/druntime/concurrentgc.html
I would like to see a thread local GC in the future as well but I
still have to understand the weak points of `shared` and how it
can be reshaped.
More information about the Digitalmars-d
mailing list