Re: 2.6.9, 64bit, 4GB memory => panics ...
From: Rudolf Usselmann
Date: Sun Dec 05 2004 - 02:05:38 EST
On Sun, 2004-12-05 at 13:26, Zwane Mwaikambo wrote:
> Make sure that you have the following option in your kernel;
>
> CONFIG_SERIAL_8250_CONSOLE=y
>
...
>
> 7:35:respawn:/sbin/agetty 38400 ttyS0
>
> Finally all you need is a program on the monitoring system, minicom
> should suffice if you have nothing else.
>
> Zwane
Thanks a lot Zwane, appreciate these tips !
I am now trying to be better prepared for my next 4gb test, and
have been working on a small program that should "eat memory".
I'm not sure I am doing the right thing though ...
The idea was to create an app that would consume a lot of memory
without touching any other system resources.
At first I used ksysguard to watch the memory consumption.
Interestingly enough, it was "wired": The VmSize column seems
to jump randomly, once I get 1,051 than I will see 3,148,615
than I will get 2,789 than I might see 1,073,976 than it will
give me 3,148 .... all during the same run of my mem eater app.
... just mentioning it here in case there is a connection between
my problem and this wired display ...
Now this testing was done with 2GB at first ... no kernel panics
with 2GB.
Than I decided to use /proc/meminfo, but that suggests that I
am not using all memory at all ! With 2GB malloc fails after
510 iterations (510 MB ???) ... (I have a 10GB swap partition)
And /proc/meminfo confirms that:
MemTotal: 2056528 kB
MemFree: 1526424 kB
About 1/2 gig is used, I checked limits, and that said unlimited ...
What else can block memory usage ? May be I just need to start my
app several times ?!
Hmm, after forking mem eater 6 times I get:
MemTotal: 2056528 kB
MemFree: 610000 kB
Which is almost the same as after 4 and 5 spins ...
Any ideas/suggestion ?
Thanks a lot guys & gals !
Kind Regards,
rudi
// -------------------------- eat mem ---------------------------------
#include "stdio.h"
#include "stdlib.h"
int main() {
int mem[10000];
int i, n;
for(i=0;i<2000;i++) {
printf("Doing alloc %0d ...\n",i);
mem[i] = (int)malloc(1024*1024*1024);
if(mem[i] == NULL)
printf("Malloc failed ...\n");
else
for(n=0;n<(1024*1024*1024);n=n+640) mem[i] = n;
}
while(1);
return(0);
}
// --------------------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/