s*****p 发帖数: 5342 | 1 btw, Java5 稳定吗?
【 以下文字转载自 Linux 讨论区 】
发信人: startup (刘跑跑), 信区: Linux
标 题: 问个系统问题
发信站: BBS 未名空间站 (Thu Aug 21 08:00:15 2008)
i have Java program eating a lot of memory. My ubuntu is running on 1GB
memory machine. i allow JVM to use 2GB by using -Xmx2096M. It is ok for it
to do swapping. However, when its memory jump close to 1GB, it is very easy
to crash. I am wondering if there is any other way to allow this Java
application to use more memory (swapping is fine)?
from top, it seems program crashe | x******h 发帖数: 13678 | 2 以前也遇到过这种问题,帮你顶一下,准备聆听牛人教诲 | m******t 发帖数: 2416 | 3 Let's just say it's not wise to go more than 1.5G with a 32bit vm. 8-)
So 1) optimize your algorithm, 2) switch to 64bit, and/or 3) upgrade
to java 6.
easy
know why?
【在 s*****p 的大作中提到】 : btw, Java5 稳定吗? : 【 以下文字转载自 Linux 讨论区 】 : 发信人: startup (刘跑跑), 信区: Linux : 标 题: 问个系统问题 : 发信站: BBS 未名空间站 (Thu Aug 21 08:00:15 2008) : i have Java program eating a lot of memory. My ubuntu is running on 1GB : memory machine. i allow JVM to use 2GB by using -Xmx2096M. It is ok for it : to do swapping. However, when its memory jump close to 1GB, it is very easy : to crash. I am wondering if there is any other way to allow this Java : application to use more memory (swapping is fine)?
| t*******e 发帖数: 684 | 4 Someone pointed out a few ago that JVM is good in horizontal scaling, not
vertical scaling. Do not give more than 1gb to one JVM, instead, you may
choose to run multiple JVMs on your PC. | c*c 发帖数: 447 | 5 It may be the memory sizing problem. What's the swap size on that machine?
you have 1GB memory and you set the maximum heap to 2G? ANd it's not strange
it crashes when heap is over 1G. Just go get more memory and see how that
works. | s*****p 发帖数: 5342 | 6 memory size is 1GB and swap size is 3GB
Mem: 1033704k total, 1018648k used, 15056k free, 1912k buffers
Swap: 3028212k total, 632040k used, 2396172k free, 103072k cached
like today, it uses swap. however, whenever it crashes, it seems not to use
any swap at all. strange ...
strange
【在 c*c 的大作中提到】 : It may be the memory sizing problem. What's the swap size on that machine? : you have 1GB memory and you set the maximum heap to 2G? ANd it's not strange : it crashes when heap is over 1G. Just go get more memory and see how that : works.
|
|