我是jstat工具的新手.因此,我做了一个如下的样本.
I am new to jstat tool. Therefore I did a sample as below.
./jstat -gcutil -t 4001 5000 Timestamp S0 S1 E O P YGC YGCT FGC FGCT GCT 565088.4 0.00 0.89 75.86 40.59 84.80 405 3.822 4 0.549 4.371 565093.4 0.00 0.89 77.81 40.59 84.80 405 3.822 4 0.549 4.371 565098.4 0.00 0.89 77.81 40.59 84.80 405 3.822 4 0.549 4.371 565103.5 0.00 0.89 77.85 40.59 84.80 405 3.822 4 0.549 4.371 565108.5 0.00 0.89 77.85 40.59 84.80 405 3.822 4 0.549 4.371 565113.4 0.00 0.89 77.85 40.59 84.80 405 3.822 4 0.549 4.371 jstat -gc output S0C S1C S0U S1U EC EU OC OU PC PU YGC YGCT FGC FGCT GCT 704.0 704.0 0.4 0.0 6080.0 4013.8 14928.0 6335.2 21248.0 18019.6 436 3.957 4 0.549 4.506 704.0 704.0 0.4 0.0 6080.0 4016.6 14928.0 6335.2 21248.0 18019.6 436 3.957 4 0.549 4.506 704.0 704.0 0.4 0.0 6080.0 4135.4 14928.0 6335.2 21248.0 18019.6 436 3.957 4 0.549 4.506 704.0 704.0 0.4 0.0 6080.0 4135.4 14928.0 6335.2 21248.0 18019.6 436 3.957 4 0.549 4.506 704.0 704.0 0.4 0.0 6080.0 4135.4 14928.0 6335.2 21248.0 18019.6 436 3.957 4 0.549 4.506 704.0 704.0 0.4 0.0 6080.0 4135.4 14928.0 6335.2 21248.0 18019.6 436 3.957 4 0.549 4.506此结果表示什么?哪些列需要注意可能的内存问题,例如内存泄漏等.
What does this results indicates? Which are the columns to look out for possible memory problem e.g. memory leak etc.
推荐答案请参阅文档:
docs.oracle /javase/8/docs/technotes/tools/unix/jstat.html
基本上,一行是一个时间点.这些列显示有关JVM内存区域(Survivor,Eden等)的数据,如果不了解JVM的工作原理,就不可能了解它们.
Basically one row is one point in time. The columns show data about the JVM memory areas (Survivor, Eden, ...), understanding them is impossible without knowing how the JVM works.
例如在文章年轻一代中的JVM垃圾收集有一些解释.
For example in the article JVM garbage collection in young generation there is some explanation.
以下是JVM对象生成工作原理的摘录:
Eden是创建新对象的地方.当伊甸园已满时,将运行small GC:如果某个对象没有对其的引用,则它将被删除,否则它将保留,并移至Survivor空间(仅在以下位置使用一个幸存空间)一次,所有来自其他空间的对象都将复制到那里).
Eden is a place where new objects created. When the Eden is full, a small GC is run: if an object has no reference to it, it will be deleted, otherwise it will survive, and move to the Survivor space (only one of the survivor spaces in use at a time, all objects from the other space is copied there).
如果对象在一定数量的来回复制中幸存下来,则将其移动到Old空间.如果旧空间已满,则会运行Full GC,这会影响JVM中的所有对象,因此操作会繁重.
If an object survives a certain number of back-and-forth copying, it is moved to Old space. If the Old space is full, a Full GC is run, which affects all objects in the JVM, so it is much heavier operation.
此外,还有Permanent空间,用于存储元数据"(类描述符,字段,方法,...描述符).
Also, there is the Permanent space, where the "metadata" (class descriptors, field, method, ... descriptors) are stored.
更多推荐
解释jstat结果
发布评论