年轻一代的规模是否不仅仅是服务的正常堆消费?
我们有一项服务,其过程闲置,以612 MB的身份记忆。
我们服务的堆的初始和最大尺寸为1GB。从GC日志中检查的年轻一代为〜400 MB。
有很多次要GC。
这是因为默认情况下的服务比年轻一代需要更多的记忆?
在另一个较大的宿主中,年轻一代的规模约为615 MB,这里的次要GC数量较少。这里的堆的初始大小为1 GB,最大尺寸为2 GB。在注意时,堆的总尺寸为1 GB。因此,在总堆尺寸的情况下,年轻一代的大小不同。
想了解这些事情:
- 这确实可以成为问题吗?
- 是否有标准的做法可以使年轻一代的规模多于服务流程的堆消费?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论