JVM进程与JVM堆内存使用情况 [英] JVM Process vs JVM Heap memory usage

查看:412
本文介绍了JVM进程与JVM堆内存使用情况的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读此进程内存与堆 - JVM
和我有同样的问题。

I have read through this Process Memory Vs Heap -- JVM and i have the same problem.

jvm进程内存使用量不断增加而且从不收缩。我在linux服务器上做了一个top检查。应用程序正在将作业调度到集群(使用Quartz + Sun Java DRMAA API)

The jvm process memory usage keeps increasing and never shrinks.I checked by doing a top on the linux server. The application is scheduling jobs to a cluster ( Using Quartz + Sun Java DRMAA API )

java堆空间在应用程序生命周期中保持在限制范围内但是jvm进程显示内存使用量稳步攀升,永不下降。

The java heap space is staying within the limits during the application life cycle but the jvm process is showing a steady climb in memory usage and never coming down.

这是内存泄漏吗?如果是这样,为什么堆空间在限制范围内。有人可以解释一下。

Is this a memory leak ? If so , why is heap space being within the limits. Can someone explain this.

更新:当我通过jconsole跟踪时,我有-Xmx1600m -Xms1600m我可以看到堆空间在这个限制内如果超过450米,那么top命令显示进程使用的时间超过900米。

UPDATE: I have -Xmx1600m -Xms1600m when i track through jconsole i can see the heap space well within this limit aroung 450m but the top command shows the process is using more than 900m.

推荐答案

使用的总虚拟内存是最大堆+线程堆栈+直接内存+ perm gen +共享库。这永远不会缩小。

The total virtual memory used is the sum of the maximum heap + thread stacks + direct memory + perm gen + share libraries. This never shrinks.

实际使用的主内存取决于占用了多少虚拟内存。共享库是共享的,因此拥有多个JVM不会导致此内存加倍等。

The actual main memory used depends on how much of the virtual memory has been occupied. Shared libraries are shared so having multiple JVMs won't result in this memory doubling etc.

JVM从不向操作系统释放内存,但是如果主内存不用于很长一段时间,如果需要,可以将其换掉。

The JVM never releases memory to the OS, however if main memory is not used for a long time it can be swapped out if this is need.

这篇关于JVM进程与JVM堆内存使用情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆