Request for review (1 line) - 7186847
Jon Masamitsu
jon.masamitsu at oracle.com
Tue Oct 9 15:26:29 UTC 2012
On 10/09/12 01:30, Mikael Gerdin wrote:
> Jon,
>
> On 2012-10-09 04:18, Jon Masamitsu wrote:
>> Mikael,
>>
>> Thanks for the review.
>>
>> I expect VirtualSpaceNodes to grow
>> by VirtualSpaceSize which is 256k and
>> and that's where the use of large pages
>> will have an affect. The Metachunks are
>> allocated out of the space in a
>> VirtualSpaceNode (the large VirtualSpaceNode
>> are divided up into chunks). At least that's
>> what I'm expecting.
>
> I guess the only "large" page size which we'll use is 64K pages on
> sparc then. On x86 there's only 4K and 2M.
> On sparc there's also 512K, 4M and even larger, but with 256K as the
> largest page allocation block we'll not use them I think.
The size of the space reserved for a VirtualSpaceNode is page aligned so
however large
VirtualSpaceSize is, we'll get at least 1 page (however large they
are). But getting
1 large page is not optimal so I think I need to increase VirtualSpaceSize.
>
>
>>
>> VirtualSpaceSize are actually smaller that
>> I thought they were so maybe those should
>> be large. At least for 64bit.
>
> Chunks and VirtualSpaceNodes are shared between Metaspaces right?
> So increasing the VirtualSpaceSize to something like 2M or 4M will not
> increase memory overhead if we have many small Metaspaces I think.
Right, they are shared. Having VirtualSpaceSize 2M or 4M should work
fine but also something like 16M should be OK. That reserved 16M for
the VirtualSpaceNodes but the space is only committed when a Metachunk
is allocated. We'll, we do reserve 16M of address space so maybe it
isn't completely harmless.
Jon
>
> /Mikael
>
>>
>> Jon
>>
>> On 10/8/2012 7:57 AM, Mikael Gerdin wrote:
>>> Jon,
>>>
>>> On 2012-10-06 00:12, Jon Masamitsu wrote:
>>>> 7186847: NPG: Use large pages for metadata allocations
>>>>
>>>> http://cr.openjdk.java.net/~jmasa/7186847/webrev.00/
>>>
>>> The fix makes sense, but I wonder how many of the allocations coming
>>> in through the VirtualSpaceNode constructor are large enough to make
>>> use of >4K pages?
>>> Since medium chunks are 8K words it looks like only humongous
>>> allocations will cause large pages to be allocated. Are humongous
>>> metaspace allocations even common enough to warrant the increased
>>> "complexity" of the code?
>>> I'm not saying that your fix is making the code itself more complex,
>>> but it may be misleading people reading it into thinking that large
>>> page size allocations are being used when actually they are not.
>>>
>>> /Mikael
>>>
>>>>
>>>> Thanks.
>>>>
>>>> Jon
>>>
>
More information about the hotspot-gc-dev
mailing list