Number of Parallel GC Threads
Jon Masamitsu
Jon.Masamitsu at Sun.COM
Fri Jan 23 21:12:25 UTC 2009
kirk wrote On 01/23/09 11:19,:
>Jon Masamitsu wrote:
>
>
>>kirk wrote On 01/23/09 09:39,:
>>
>>
>>
>>
>>>...
>>>
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>I've come into a couple of situations where I need to throttle back on
>>>GC threads so I think the request to throttle based on the -Xmx setting
>>>seem reasonable.
>>>
>>>
>>>
>>>
>>>
>>How do you decide the number of GC threads given a maximum heap size?
>>Do you scale the number of GC threads linearly with the maximum
>>heap size?
>>
>>
>>
>>
>Good question. As Tony pointed out, there seems to be a useful number of
>threads to allocate and so his formulation deviates from linear in cases
>where there are a large number of CPUs. In this case I guess I would cap
>at the min offered by that value and one determined by memory. I don't
>have a good feeling for what that other formula would look like but a
>good starting point could be something like 1 for something like every
>64mb. The actual value could be adjusted using some observations about
>how GC was behaving.
>
>
So linear with the max size of the heap (e.g., 8 GC threads for a 512m
max heap)
up to some cap (e.g., using the 5/8's rule Tony described).
What do you mean by GC behavior? And adjusting for it?
More information about the hotspot-gc-dev
mailing list