年轻一代的规模是否不仅仅是服务的正常堆消费?

发布于 2025-01-25 03:00:17 字数 330 浏览 2 评论 0原文

我们有一项服务,其过程闲置,以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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文