From: "Srikrishnan Sundararajan" <srikrishnan@in.ibm.com>
To: linux-mm@kvack.org
Subject: oom_killer - Does not perform when stress-tested (system hangs)
Date: Wed, 7 Aug 2002 22:31:21 +0530 [thread overview]
Message-ID: <OFDE4A1CCD.14106609-ON65256C0E.0057D9B9@in.ibm.com> (raw)
Hi,
I'm trying to run multiple instances of the following program which keeps
on allocating memory , assigns value if malloc was not NULL and does not
free.
#include <stdlib.h>
int main()
{
int *p,i;
while (1) {
p = (int *) malloc(1000000 * sizeof(int));
if(p!=NULL)
for(i=0;i<1000000;i++)
p[i]=i;
sleep(1);
}
}
When I run say about 5 instances, oom_killer kills one instance of my
program when SwapFree is 0K, goes on to kill each of the other instances in
turn. The machine is slow in response when my program was running but
perfectly usable after that.
When I run 25 or 40 instances, the system hangs. No response. After waiting
for more than 1.5 hours I did a manual reboot (hard-reset). I looked for
/var/log/messages for "Out of Memory: Killed process...", I could find
about 15 entries for the killing of my program's instances, none for others
and there were no entries for more than an hour till I hard-reset the
machine.
I used a PC with Linux -2.4.7-10 (RH 7.2). RAM:128 MB, Swap: 256 MB. I run
as an user and not as root.
Is this expected behavior? Is it the responsibility of the user not to
"fill" the memory? Could oom_killer not take care of such a stress-test?
Should any thing warn the user when swap-space is full?
Srikrishnan
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next reply other threads:[~2002-08-07 17:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-07 17:01 Srikrishnan Sundararajan [this message]
2002-08-07 22:07 ` William Lee Irwin III
2002-08-15 17:02 Srikrishnan Sundararajan
2002-09-10 7:35 Srikrishnan Sundararajan
2002-09-10 16:07 ` William Lee Irwin III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OFDE4A1CCD.14106609-ON65256C0E.0057D9B9@in.ibm.com \
--to=srikrishnan@in.ibm.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox