Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Memory Monitor
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pmatos
Veteran
Veteran


Joined: 06 Jun 2003
Posts: 1246
Location: Eckental, Germany

PostPosted: Sun Apr 05, 2009 5:35 pm    Post subject: Memory Monitor Reply with quote

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
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Sun Apr 05, 2009 6:27 pm    Post subject: Reply with quote

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
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1709
Location: Poland => Lodz

PostPosted: Sun Apr 05, 2009 6:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21631

PostPosted: Sun Apr 05, 2009 9:13 pm    Post subject: Re: Memory Monitor Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum