0

We've a java program (micro-service) that shows below heap pattern when there's no load on the program ( program is doing nothing)

enter image description here

trincot
  • 317,000
  • 35
  • 244
  • 286
Ashish18
  • 37
  • 4

1 Answers1

0

This is a healthy looking 'saw-tooth' pattern of memory allocation. Memory is being allocated for objects and being garbage collected when it's not being referenced.

The fact that your program is "doing nothing" doesn't mean that the libraries\frameworks\application servers you're are using are also doing nothing. These tools will be using using resources: maintaining threads, waiting for connections on ports, managing resources etc. This ensures requests to your micro-service are handled as efficiently as possible, but will require system resources.

Problems occur when resources are allocated but can't be recovered, which isn't happening in the graph above.

StuPointerException
  • 7,117
  • 5
  • 29
  • 54