Thanks Peter. Just using -Xincgc seems to make a major difference for me, even under java 1.5.0_19. This is very nice in terms of my runtimes and it also shows that GC is a major factor here.
-Lee On Mar 27, 2010, at 12:26 PM, Peter Schuller wrote: >> 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. -- Lee Spector, Professor of Computer Science School of Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 Check out Genetic Programming and Evolvable Machines: http://www.springer.com/10710 - http://gpemjournal.blogspot.com/ -- 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.