稳定的JVM,但系统内存增加 [英] Stable JVM but system memory increase

查看:294
本文介绍了稳定的JVM,但系统内存增加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Ubuntu 16.04服务器上运行Java应用程序.经过广泛的研究,我发现JVM堆大小或多或少是恒定的.无论如何,不​​会增加内存.

I am running a java application on a Ubuntu 16.04 server. After extensive investigation I have discovered that the JVM heap size is more or less constant. At any rate there are no memory increase.

但是,当我使用htop查看服务器时,服务器的内存消耗却以惊人的速度增长.我不确定到底是什么原因造成的,但是它100%来自Java进程.

However, when I look at the server using htop the memory consumption of the server grows at an alarming rate. I am not sure what exactly is causing this but its 100% originating from java process.

我已经查看了hprof文件,但我无法真正告诉我我在寻找什么.

I have looked at the hprof files but I cant really tell what Im looking for.

我正在运行两个可能负责的库,但我并不十分熟悉它们.

I am running two libs that might be responsible but I am not intimately familiar with them;

  • OrientDB(plocal)
  • Hazelcast
  • OrientDB (plocal)
  • Hazelcast

我不确定这两者是否会导致JVM之外的内存增加.

Im not sure if either / both of these would cause a memory increase outside the JVM.

任何有关确定问题的最佳计划的建议都是很好的.

Any advice on the best plan to help identify the problem would be great.

推荐答案

感谢@ the8472,@ davmac @qwwdfsad和@ andrey-lomakin的评论.我很欣赏问题中提供的详细信息,但我想避免提供不相关的数据,而这些数据可能会破坏整个兔子.

我系统地测试了每个建议,结果发现问题出在 OrientDB .我不能说100%以下哪个解决了这个问题(可能两个都解决了).根据@ andrey-lomakin的建议,我从2.1.19升级到了2.2-rc1.为此,应用程序批处理插入开始引发异常,因此我将它们全部转换为单个线性查询.一旦竞争,内存泄漏就消失了.

I systematically tested each suggestion and it turns out that the problem was originating from OrientDB. I cant say 100% which of the following fixed the problem (possibly both). As per @andrey-lomakin suggestion I upgraded from 2.1.19 to 2.2-rc1. In doing this the applications batch inserts started throwing exceptions so I converted them all into single linear queries. Once compete the memory leak has gone.

作为旁注,以防在测试直接IO泄漏时影响其他任何人我确实惊奇地发现-Djdk.nio.maxCachedBufferSize=...Java(TM) SE Runtime Environment (build 1.8.0_91-b14)兼容.

As a side note in case it affects anybody else while testing for direct IO leak I did discover to my suprise that -Djdk.nio.maxCachedBufferSize=... works withJava(TM) SE Runtime Environment (build 1.8.0_91-b14).

这篇关于稳定的JVM,但系统内存增加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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