Linked by Thom Holwerda on Tue 2nd Jan 2007 21:39 UTC
Thread beginning with comment 198194
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.





Member since:
2005-07-06
As rayiner said, GC doesn't belong in the kernel, but the kernel VM manager should definitely cooperate better with the GCs as how much memory should be allocated before doing a garbage collection depends on the memory pressure:
- allocate too little memory and the GC will waste CPU time doing garbage collection while there is still a lot of "free" memory available.
- allocate too much memory and some pages could be paged out before the GC reclaim memory which is dumb as the GC will have to swap-in again the page to do its collection pass to release memory, a kind of trashing which could have been avoided in some case.
Currently system administrator have to hand-tune the memory used by the GC to make the system works better which is quite suboptimal..
The only paper I know (there are probably more papers, but it's the only one I know) about this research topic is here:
http://www.cs.umass.edu/~emery/pubs/04-16.pdf
They patched a Linux kernel and got interesting numbers.
Note that in GCs for 'client type applications' you may still want to limit the size of the memory used by the GC even though there is still free memory so that each GC-pass do not take too much time, avoiding a freeze for the user.