FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-08-2008, 03:18 AM
"hhding.gnu"
 
Default when debian run out of memory

Hi list,

When debian run out of memory, I can only ping the host and can't ssh to
the host.

It seems oom-killer is running but memory is still exhaust.

What should I do then? Only reboot can solve the problem?
Can I protect oom-killer from kill the sshd then I can ssh to the box to
kill the process?


Ding Honghui


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-08-2008, 04:17 AM
"Mumia W.."
 
Default when debian run out of memory

On 08/07/2008 10:18 PM, hhding.gnu wrote:

Hi list,

When debian run out of memory, I can only ping the host and can't ssh to
the host.

It seems oom-killer is running but memory is still exhaust.

What should I do then? Only reboot can solve the problem?
Can I protect oom-killer from kill the sshd then I can ssh to the box to
kill the process?


Ding Honghui




If you have either the Linux source¹ or the Linux documents² installed,
please read ./Documentation/vm/overcommit-accounting to find out how to
configure the overcommit feature of Linux.


AFAIK, when the oom-killer is invoked, almost any process can end up
being the victim, and the system can rapidly reach a state of uselessness.


----------------------
¹ Package linux-source-2.6
² Package linux-doc-2.6


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-08-2008, 04:39 AM
Andrew Sackville-West
 
Default when debian run out of memory

On Fri, Aug 08, 2008 at 11:18:20AM +0800, hhding.gnu wrote:
> Hi list,
>
> When debian run out of memory, I can only ping the host and can't ssh to
> the host.
> It seems oom-killer is running but memory is still exhaust.
>
> What should I do then? Only reboot can solve the problem?
> Can I protect oom-killer from kill the sshd then I can ssh to the box to
> kill the process?

I don't have a lot of experience with this, but, the couple of times
I've hit this, everything runs... *REALLY* slowly. So much time is
taken up by the swapping that it takes *forever* for anything to
happen. Even a simple login can take several minutes. So first, be
patient.

Second, you *can* control how this all behaves. It appears, in my
reading, that the default configuration causes malloc() to
*always* succeed and then the oomkiller comes out to play
eventually. You can configure this through sysctl. see here:

http://opsmonkey.blogspot.com/2007/01/linux-memory-overcommit.html

for info on it. There is a better article out there, but I can't find
it atm.

The idea is to set vm.overcommit to 2 so that malloc() will fail when
you run out of memory. This causes the app trying to malloc() to get a
fail on malloc() and consequently handle it (gracefully or not). But
it keeps the oomkiller from coming out.

another trick is to us ulimit -v <some amount of memory> to control
how much memory a process has access to. man bash and look for ulimit.

hope this helps and hopefully someone else with more knowledge will
come along correct me...

A
 

Thread Tools




All times are GMT. The time now is 10:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org