Re: OperatingSystemMXBean unaware of container memory limits

2019-07-11 Thread Bob Vandette
> On Jul 11, 2019, at 1:18 PM, Andrew Azores wrote: > > Hi Bob (and all), > > On Fri, 2019-06-21 at 08:50 -0400, Bob Vandette wrote: >>> >> Fixing the existing OS Mbean is pretty straight forward. Just have >> each method call the new Metrics API, check for error returns >> in case this API

Re: OperatingSystemMXBean unaware of container memory limits

2019-07-11 Thread Andrew Azores
Hi Bob (and all), On Fri, 2019-06-21 at 08:50 -0400, Bob Vandette wrote: > > > Fixing the existing OS Mbean is pretty straight forward. Just have > each method call the new Metrics API, check for error returns > in case this API is not supported on this platform and if success, > return result,

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-22 Thread Kirk Pepperdine
Hi Mario, I completely agree, the OS Bean should be consistent with the memory. That said I favor introducing new MXBeans to achieve the desired effects. If there is no container than the container MXBean could simply not be instantiated. I’m looking for more visibility especially for the

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-22 Thread Kirk Pepperdine
Hi Bob, 100% isolate reduces visibility and from a diagnostic perspective there are a number of issues that can only be seen if you have access to the host information. Also one of the things that gets forgotten is how this change will affect or break tooling. I would suggest a better

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Mario Torre
Thanks! Cheers, Mario On Fri 21. Jun 2019 at 15:54, Bob Vandette wrote: > Here you go. > > https://bugs.openjdk.java.net/browse/JDK-8226575 > > Thanks, > Bob. > > On Jun 21, 2019, at 9:08 AM, Severin Gehwolf wrote: > > Hi Bob, > > On Fri, 2019-06-21 at 08:56 -0400, Bob Vandette wrote: > > On

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Bob Vandette
Here you go. https://bugs.openjdk.java.net/browse/JDK-8226575 Thanks, Bob. > On Jun 21, 2019, at 9:08 AM, Severin Gehwolf wrote: > > Hi Bob, > > On Fri, 2019-06-21 at 08:56 -0400, Bob Vandette wrote: >>> On Jun 21, 2019, at 4:22 AM, Severin

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Bob Vandette
> On Jun 21, 2019, at 4:22 AM, Severin Gehwolf wrote: > > Hi Bob, > > On Thu, 2019-06-20 at 10:16 -0400, Bob Vandette wrote: >> Hi Andrew, >> >> I am aware of the limitations of the OperatingSystemMXBean and was >> hoping to address these limitations during the implementation of >>

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Bob Vandette
> On Jun 21, 2019, at 6:06 AM, Mario Torre > wrote: > > The way I understood the bug report is a two fold approach, i.e. fix the os > bean and *possibly* add a container one or extend it to add more data. Correct. We could file a separate bug to just correct the OS Bean but I was hoping to

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Bob Vandette
I agree with you Mario. When I originally designed the jdk.internal.platform.Metrics API, I was considering providing both a Host and Container Metrics implementation. The problem is that the primary goal of containers is to provide isolation (hiding access to the host) and it would be very

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Mario Torre
Hi Kirk, I think I understand what you mean, however then the OS Bean should be consistent regarding CPU information as well. I think I remember why this was fixed the way it is now was because of incorrect behavior during GC configuration, or something along those lines, so I guess we would

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Kirk Pepperdine
Hi Mario, I don’t believe the MBean returns the wrong information. Is it not that the calls by-pass the container? Would it not be more appropriate to add a container aware mean? From a tooling perspective it’s a mistake to completely seal the JVM away from the hardware as it makes certain

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Mario Torre
The way I understood the bug report is a two fold approach, i.e. fix the os bean and *possibly* add a container one or extend it to add more data. I agree with you and Andrew that the current OS Bean returns wrong information, this should be fixed in any case I think. Bob, do you have some

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-21 Thread Severin Gehwolf
Hi Bob, On Thu, 2019-06-20 at 10:16 -0400, Bob Vandette wrote: > Hi Andrew, > > I am aware of the limitations of the OperatingSystemMXBean and was > hoping to address these limitations during the implementation of > https://bugs.openjdk.java.net/browse/JDK-8199944. > > It would be helpful if

Re: OperatingSystemMXBean unaware of container memory limits

2019-06-20 Thread Bob Vandette
Hi Andrew, I am aware of the limitations of the OperatingSystemMXBean and was hoping to address these limitations during the implementation of https://bugs.openjdk.java.net/browse/JDK-8199944 . It would be helpful if you feel this is important

OperatingSystemMXBean unaware of container memory limits

2019-06-20 Thread Andrew Azores
Hi all, Apologies if this is not the most appropriate list, in which case please direct me where to go. I've noticed a surprising result from the com.sun.management.OperatingSystemMXBean implementation when running in a containerized (specifically, using Docker on Linux) environment. The bean