crazy novice
crazy novice

Reputation: 1817

How many GC threads should I have?

My understanding is that with the server GC mode, you get one GC thread per processor for your application. However when looking a dump file, I am looking at different results.

When I open a dump file, its showng 4 procs. enter image description here

!eehheap -gc command suggesting the same.

enter image description here

When I run !threads -special command, its showing 8 GC threads. Why? enter image description here

Upvotes: 1

Views: 909

Answers (1)

Henk Holterman
Henk Holterman

Reputation: 273854

You have 4 cores and 4 Heaps (as shown in the dump).

Per core you have a GC thread (for generations 0 and 1) and a Background GC thread for gen2.

8 threads in all. You can see a depiction of 4 threads on a dual-core on this page, look for "Server GC: Before and after".

Upvotes: 4

Related Questions