On Tue, Apr 26, 2011 at 12:34 AM, rodgerd <[email protected]> wrote: > On Mon, 25 Apr 2011 22:53:21 +0200, Rob van der Heij > <[email protected]> wrote: > >> >> If it is non-blocking, why would one be concerned about the elapsed >> time of GC and what would be the interest of having multiple threads >> working in parallel on GC. Or would you really have allocation rates >> so high that a single thread could not keep with it? Or should we >> conclude that current implementations don't deploy such algorithms? > > Irrespective of whether a given GC algorithm is blocking or not, I would > be concerned about elapsed time since it's CPU spent on GC, not on > application tasks. Whether the JVM logs GC elapsed times isn't a > particularly useful metric as to whether pauses are happening or not.
Right! Now we're getting somewhere... The amount of CPU time spent in GC depends on the amount of garbage etc, but CPU time required for it does not get less when a parallel GC spreads the effort over multiple virtual CPUs (deliberate understatement - adding communication between threads will increase cost). And if you engage more virtual CPUs in the GC processing, those virtual CPU will not run application threads at that time. So even when GC does not block, it then sucks out all CPU and you still don't run... I know I simplified GC by saying that "all stops during GC" since there's clearly parts of the process that can be done while shop is open. I would expect the parallel GC threads to run with low priority so that they take over once the application thread has blocked itself. Such a setup would not benefit from more virtual CPUs than can run at the same time. Rob -- Rob van der Heij Velocity Software http://www.velocitysoftware.com/ ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
