Number of Parallel GC Threads

kirk kirk at kodewerk.com
Fri Jan 23 19:19:47 UTC 2009


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.

Kirk





More information about the hotspot-gc-dev mailing list