'Should the young generation size be more than a service's normal heap consumption?
We have a service, whose process sitting idle, takes a heap memory of 612 MB.
The heap of our service is given a initial and maximum size of 1GB. The young generation, as checked from gc logs, is ~400 MB.
There are a lot of minor GCs.
Is this because the service by default takes more memory than the young generation?
In another bigger host, the young generation size is ~615 MB and there are very less number of minor GCs here. The initial size of heap here is 1 GB and max size is 2 GB. At the time of taking the note, the total size of heap was 1 GB. So with the same total heap size, the young generation size was different.
Wanted to understand these things:
- Can this indeed be the problem?
- Is there a standard practise to keep young generation size more than the heap consumption of the service's process?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
