Details
-
Bug
-
Resolution: Unresolved
-
P4
-
17.0.5
-
x86_64
-
linux
Description
ADDITIONAL SYSTEM INFORMATION :
JDK17, Docker Container, Linux
A DESCRIPTION OF THE PROBLEM :
When I fetch memory usage and max memory it returns the values inside memory.max and memory.current files and these values includes linux page caches and this can give very false values when you read a lot of files. I've found that dotnet runtime has been experience this too until https://github.com/dotnet/runtime/pull/53074 this pr it may help there is a better description and an example implementation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Java app that reads a lot of files from a volume and reports the memory usages via MxBean, and deploy it to a linux container then run.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
MXBean should return memory usage metric that doesn't includes page caches.
ACTUAL -
MXBean's function that returns current memory usage returns more memory than jvm use although it's the only process in container.
FREQUENCY : always
JDK17, Docker Container, Linux
A DESCRIPTION OF THE PROBLEM :
When I fetch memory usage and max memory it returns the values inside memory.max and memory.current files and these values includes linux page caches and this can give very false values when you read a lot of files. I've found that dotnet runtime has been experience this too until https://github.com/dotnet/runtime/pull/53074 this pr it may help there is a better description and an example implementation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Java app that reads a lot of files from a volume and reports the memory usages via MxBean, and deploy it to a linux container then run.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
MXBean should return memory usage metric that doesn't includes page caches.
ACTUAL -
MXBean's function that returns current memory usage returns more memory than jvm use although it's the only process in container.
FREQUENCY : always