Re: Negative non-heap memory maximum

2017-06-23 Thread Dmitry Pavlov
Sounds reasonable to me. I've created issue for this change
https://issues.apache.org/jira/browse/IGNITE-5583

ср, 24 мая 2017 г. в 20:24, Alexey Goncharuk :

> I think it makes sense to switch non-heap memory metrics to new page memory
> semantics, this should show a clean picture in the node output and will
> also protect us from ambiguous -1 output.
>
> 2017-05-24 18:45 GMT+03:00 Dmitry Pavlov :
>
> > Igniters,
> >
> >
> >
> > On my jdk 1.8.0_131 there is negative amount of maximum non heap memory
> > returned by following code:
> >
> > ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage().getMax());
> >
> > returns -1.
> >
> >
> >
> > And this value is used in ignite metrics in
> > GridLocalMetrics.getNonHeapMemoryMaximum() which becomes negative.
> >
> >
> >
> > I have an idea to take this value from memory policy as sum of max sizes
> of
> > all memory policies, from MemoryPolicyConfiguration.getMaxSize()
> >
> >
> >
> > Would it be correct change to avoid negative values in metrics? Do you
> have
> > any comments on this? Or is it better way to use commited memory
> > getCommitted() to calculate free non heap space percent in metrics?
> >
> > Or is there any other way to obtain Max Non Heap memory size?
> >
> >
> >
> > Best Regards,
> >
> > Dmitriy Pavlov
> >
>


Re: Negative non-heap memory maximum

2017-05-24 Thread Alexey Goncharuk
I think it makes sense to switch non-heap memory metrics to new page memory
semantics, this should show a clean picture in the node output and will
also protect us from ambiguous -1 output.

2017-05-24 18:45 GMT+03:00 Dmitry Pavlov :

> Igniters,
>
>
>
> On my jdk 1.8.0_131 there is negative amount of maximum non heap memory
> returned by following code:
>
> ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage().getMax());
>
> returns -1.
>
>
>
> And this value is used in ignite metrics in
> GridLocalMetrics.getNonHeapMemoryMaximum() which becomes negative.
>
>
>
> I have an idea to take this value from memory policy as sum of max sizes of
> all memory policies, from MemoryPolicyConfiguration.getMaxSize()
>
>
>
> Would it be correct change to avoid negative values in metrics? Do you have
> any comments on this? Or is it better way to use commited memory
> getCommitted() to calculate free non heap space percent in metrics?
>
> Or is there any other way to obtain Max Non Heap memory size?
>
>
>
> Best Regards,
>
> Dmitriy Pavlov
>


Negative non-heap memory maximum

2017-05-24 Thread Dmitry Pavlov
Igniters,



On my jdk 1.8.0_131 there is negative amount of maximum non heap memory
returned by following code:

ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage().getMax());

returns -1.



And this value is used in ignite metrics in
GridLocalMetrics.getNonHeapMemoryMaximum() which becomes negative.



I have an idea to take this value from memory policy as sum of max sizes of
all memory policies, from MemoryPolicyConfiguration.getMaxSize()



Would it be correct change to avoid negative values in metrics? Do you have
any comments on this? Or is it better way to use commited memory
getCommitted() to calculate free non heap space percent in metrics?

Or is there any other way to obtain Max Non Heap memory size?



Best Regards,

Dmitriy Pavlov