首页 \ 问答 \ 进程内存vs堆 - JVM(Process Memory Vs Heap — JVM)

进程内存vs堆 - JVM(Process Memory Vs Heap — JVM)

我们在tomcat服务器上部署了一个Web应用程序。 我们运行了一些预定的工作,然后堆内存达到峰值并稳定下来,一切似乎都很好。 然而,系统管理员抱怨说,内存使用量(Linux上的“最高”)持续增加,计划的作业越多。 堆内存和CPU的内存之间的关系是什么? 它可以通过任何JVM设置进行控制吗? 我使用JConsole来监视系统。
我强制通过JConsole进行垃圾回收,并且堆使用率降低了,但是Linux上的内存使用率仍然很高,并且从未减少。

任何想法或建议会有很大的帮助?


We have a web application deployed on a tomcat server. There are certain scheduled jobs which we run, after which the heap memory peaks up and settles down, everything seems fine. However the system admin is complaining that memory usage ('top' on Linux ) keeps increasing the more the scheduled jobs are. Whats the co-relation between heap memory and memory of the CPU? Can it be controlled by any JVM settings? I used JConsole to monitor the system.
I forced the garbage collection through JConsole and the heap usage came down, however the memory usage on Linux remained high and it never decreased.

Any ideas or suggestions would of great help?


原文:https://stackoverflow.com/questions/4893192
更新时间:2024-01-30 06:01

相关问答

更多
  • server {}段里加上 charset utf-8;或charset gb2312; 之类的就行了
  • Nginx如何设置同时支持GBK(GB2312)和UTF-8编码 要毛GBK,直接抛弃GBK,全部用UTF-8省事。
  • #!/usr/bin/env python3 from chardet import detect fn = 'a.txt' with open(fn, 'rb') as f: s = f.read() coding = detect(s)['encoding'] print('coding: {}'.format(coding)) print('content: {}'.format(s.decode(coding).rstrip())) newf = 'b.txt' with open(newf, 'w ...
  • 不同的编码。 各个国家和地区所制定的不同 ANSI 编码标准中,都只规定了各自语言所需的“字符”。比如:汉字标准(GB2312)中没有规定韩国语字符怎样存储。这些 ANSI 编码标准所规定的内容包含两层含义: 1. 使用哪些字符。也就是说哪些汉字,字母和符号会被收入标准中。所包含“字符”的集合就叫做“字符集”。 2. 规定每个“字符”分别用一个字节还是多个字节存储,用哪些字节来存储,这个规定就叫做“编码”。 各个国家和地区在制定编码标准的时候,“字符的集合”和“编码”一般都是同时制定的。因此,平常我们所说的 ...
  • 你好,如果你使用的是httpclient,可是使用下面的方法发送gb2312数据, HttpPost httpRequest = new HttpPost(url); httpRequest.setEntity(new UrlEncodedFormEntity(pairs, "gb2312"));
  • gb2312是 简体中文字符集,能显示简体中文常用汉字及英文,主要在中国大陆地区使用。utf-8 是国际编码,可以显示大多数 语言,如:中,日,英,俄等。在utf-8的页面你可以同时显 不同 国家的语言,gb2312则做不到。utf-8做的中文页面同样可以正常显示在非中文的操作系统中,gb2312则不行(未安装gb2312编码)。(以上只是理论,并未测试)另外,还有GBK编码(GB18030),这是大字符集编码,能显示的汉字比GB2312多很多,有些 不常用的汉字也能显示,包括 繁体。台湾地区用的多的是BI ...
  • meta设置 charset后,还需要把文件的编码改成 ansi才行。改文件的编码的工具很多,一般的编辑器都支持。我使用的是 Editplus,在菜单“文档”下面有个“文件编码”,可以修改。如果 charset=utf-8,那文件的编码也要是 utf-8。浏览器默认是读取文件的编码,meta的设置一般不是优先考虑的。
  • 在将字符串转换为GB2312编码时,应在getBytes()调用中指定字符集: String baseString=new String(base64.encode(gb2312.getBytes("GB2312"))); 原则上(并且完全安全)你应该在从Base64( str.getBytes() )转换时执行此操作,但默认字符编码可能没问题,因为base-64编码使用US-ASCII的子集。 谁知道 - 您可能正在默认编码为EBCDIC的平台上运行。 You should specify the ch ...
  • 似乎构成字符的各个字节已被编码为HTML数字实体,就好像它们是来自ISO-8859-1或其他一些8位编码的字符一样。 要撤消数字实体编码,可以使用mb_decode_numericentity : $str = "ÄÉ´ï¶û¾ø¾³Ï´󷴻÷¾Ü¾øÀäà ...
  • 你要找的是输出/输入时的编码/解码。 正如@kalpesh所说,在内部,它都是unicode。 如果要以特定编码读取流然后将其写入另一个流,则必须指定字节(在流中)和字符串(在java中)之间转换的编码,然后在字符串之间(在java)到字节(输出流),如下所示: InputStream is = new FileInputStream("utf8_encoded_text.txt"); OutputStream os = new FileOutputStream("gb231 ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。