View previous topic :: View next topic |
Author |
Message |
pmatos Veteran
Joined: 06 Jun 2003 Posts: 1246 Location: Eckental, Germany
|
Posted: Sun Apr 05, 2009 5:35 pm Post subject: Memory Monitor |
|
|
Hi guys,
I have 2Gb of RAM but that is quickly not being enough nowadays. With Gnome + Firefox plus a couple others, my system is regularly crashing after all the memory + swap space is eaten. The system starts to slow down up to the point where it becomes unusable and unable to recover.
There should be a way where the system just returns an error to the program due to unable to allocate memory.
Otherwise there should be a way to monitor the memory being used and I should be warned when the memory is getting dangerously low...
Any suggestions?
Cheers,
Paulo |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Sun Apr 05, 2009 6:27 pm Post subject: |
|
|
Try using top to spot which application(s) or GNOME component(s) leaks memory. 2GB RAM should be plenty for the workload you describe unless something (Firefox?) is leaking like mad. Once you've identified the culprit maybe we can help fix it.
The kernel OOM killer should step in to destroy memory-hungry processes when memory is exhausted. You can verify this by checking the output of dmesg when trouble strikes. The system shouldn't crash as a result, though you could get kicked out of GNOME depending on what the kernel decides to kill. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
szczerb Veteran
Joined: 24 Feb 2007 Posts: 1709 Location: Poland => Lodz
|
Posted: Sun Apr 05, 2009 6:41 pm Post subject: |
|
|
Clearly, something is leaking memory. top or htop will tell you what it is.
BTW I also have 2GB of ram and I can start a VM with 768MB and still do normal stuff (like you described) on the host system, while barely touching swap space. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sun Apr 05, 2009 9:13 pm Post subject: Re: Memory Monitor |
|
|
pmatos wrote: |
There should be a way where the system just returns an error to the program due to unable to allocate memory. |
There is. If memory overcommit is disabled, or if the amount committed exceeds the overcommit threshold, the kernel should fail a memory allocation. Unfortunately, most modern programs are written with the assumption that memory allocations do not fail until the system is in such a bad state that it is not worth handling. Thus, they typically crash when memory is exhausted, even though the kernel gives them the opportunity to try to recover gracefully. |
|
Back to top |
|
|
|