linux内存经常被用掉90%多,只有一个java程序
4个AMD大锤,4G内存
只有一个java程序在跑,top显示jvm使用了400M,但是整个系统的内存已经用了3G多,请高手指点
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
4个AMD大锤,4G内存
只有一个java程序在跑,top显示jvm使用了400M,但是整个系统的内存已经用了3G多,请高手指点
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
巨型 JVM ? 玩笑, 是否 有很多 线程? 有 1500左右?
同时跑的最多40-50个线程
Q: Why is Linux using up all my memory?
A: You may notice as you use Linux that a lot of RAM is in use, even when you're not running very many programs. You may be thinking that there are problems with memory leaks, or that your available RAM is being used inefficiently.
One quick and easy way to find out how much RAM you really have available, though, is to use the command-line utility 'free.' If you are running Gnome, KDE, or another graphical interface, open up a terminal window and type 'free' (without the quotes). Its output looks something like this (edited for brevity):
total used free
Mem: 515364 497208 18156
-/+ buffers/cache: 352512 162852
Swap: 497972 176 497796
The significant row in this output is the one labelled -/+ buffers/cache. Notice that out of 512MB of RAM, only 352MB is in use---even though it appears from the first line that 497MB is in use.
Unless you experience significant slowdowns and hard drive activity, it's unlikely that you are experiencing any problems with memory usage. Besides, if you paid good money for all the RAM you have, you might as well be using it---it's no good to you sitting around doing nothing.
Another tool that you may find useful, if you find that a lot of your RAM is being used, is 'top.' Again, from a terminal window or console, type 'top' (without the quotes). You will see a dynamically-updated list of the currently-running programs on your computer. The name of each program is shown on the far right, along with information about how much CPU and memory each program is using. If you press 'M' while 'top' is running, the programs will be shown in decreasing order of memory usage. This may help you to pinpoint what programs are using the most memory. In some cases, those programs can be shut down (if you do not need them running), or configured to use less memory.