4 ms·
The problem is not just with the time it takes, but that most garbage collection algorithms are stop-the-world ( not sure if any of them are truly concurrent ).
by simula67 10y ago
The problem is not just with the time it takes, but that most garbage collection algorithms are stop-the-world ( not sure if any of them are truly concurrent ). This can introduce correctness problems.
I used to work on a network management software that used ICMP polling to detect if network devices were down. We had a SEDA architecture, requests were put on a queue, timers were set and if the device did not respond within a timeout, we would mark the device as down.
Problem was, it so happened that in a high load system after we sent out the request, the garbage collector would kick in and take eons to return the system to running state. When the system returns, the timer events would fire and the handlers would note that the timeout has expired and mark the devices as down. The device could have responded in time to the requests but the system would not have detected it.
This is why I am weary of languages with mandatory garbage collection. I feel it should be a library in any serious systems language.
- hga 10y agoSee https://news.ycombinator.com/item?id=11555017 https://news.ycombinator.com/item?id=11555017 Azul's Zing is pauseless, never has to do a stop-the-world collection which they say on a JVM takes about a second per GiB. It has threads which concurrently collect as other threads mutate, uses clever VM tricks such as bulk operations with only one TLB invalidation (or at least they did that with an earlier version of the current collector, they couldn't get it into the mainline Linux kernel and now use a DLKM). It's the only non-toy currently maintained pauseless/concurrent GC that I know of.
- guipsp 10y agohttp://openjdk.java.net/jeps/189 http://openjdk.java.net/jeps/189