> BTW also, someone else previously commented on a different thread that maybe 
> some of my slow-downs were GC related, and at the time I didn't understand 
> the possible interactions between the GC and multithread timing issues... 
> which I'm still not sure I completely understand, but all of this has now 
> been cast in a new light.

Using the -XX:+PrintGC and -XX:+PrintGCDetails JVM options will tell
you more about when and whether GC is happening, and what type of GC
is happening.

Whether or not a GC pause is parallel is relevant to whether or not
the JVM will use all (or several depending on settings) available
cores during said pause. There is also the concept of "concurrent" GC,
which refers to the GC running concurrently (in one or more threads)
with your application.

Depending on your choice of GC you may have non-parallel/parallel GC
during stop-the-world pauses, or parallel/non-parallel GC running
concurrently with your application.

The '-Xincgc' option will turn on the concurrent mark-sweep GC which
makes operation on the old generation concurrent, and I believe the
default will also be for parallel GC in the young generation
(generations refer to classifications of data as young or new; the
distinction exists because GC:s typically perform optimizations based
on the fact that most applications generate a lot of short-lived
data).

If you are interested in how GC:s work I can recommend the following papers:

"Uniprocessor garbage collection techniques", which is now fairly old
but gives a pretty good (IMO) overview of GC algorithms of different
types:

   ftp://ftp.cs.utexas.edu/pub/garbage/gcsurvey.ps

Actually if anyone has good suggestions for similar papers I'm all
ears. This was the first paper I ever read about GC and launched my
interest in it; I still think it's good, but then I'm biased.

"Garbage-First Garbage Collection" describes the upcoming GC which is
already available but not yet the default, but intended to be the
default replacement for CMS in JDK 1.7:

   http://research.sun.com/jtech/pubs/04-g1-paper-ismm.pdf

That one in particular will cover several aspects that are relevant to
concurrency as multi-processor scalability was a design goal.

You may also be interested in what I believe to be the original paper
about the CMS collector:

   http://research.sun.com/techrep/2000/smli_tr-2000-88.pdf

Of course both CMS and G1 will have changed since the original
publications of the papers, but they should offer good insight.

-- 
/ Peter Schuller

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to 
clojure+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to