lkml.org 
[lkml]   [2000]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Some questions about linux kernel.
On Sat, Mar 11, 2000 at 01:14:13PM +0300, Peter Zaitsev wrote:
> 1) I've found the very simple thing - program which just hogs all memory by
> running for(;;) t=malloc(4096); for example run under usual user with no
> explicit memory limitations leads system to unusable state after all swap
> space is finished.

Yes. That is what usually happens.

> Well. The kernel still works afterwards but many of inportant processes dies

Basicly all the swaped out runnable processes will die when they page fault.
since we're oom basicly all processes are more or less swaped out. as
consequence, at least syslogd dies. if you're lucky and the offending
process dies too meanwhile nothing else bad will happen.

Rik van Riel has presented one of the best solutions i've seen here latelly.
I bet he would like you to test his oom patches.

> and so remote mashine can't even be rebooted properly. The worst thing the
> same program leads to nothing then run under solaris 2.6 for example - I
> just get the message Out of memory for a.out and no process of other users
> are affected. I've checked this on many distributions (RH 6.1,Slakware
> 7.0,Suse 6.3) with up to last kernel 2.2.14 - everythere I have the same
> effect.

Solaris does swap overcommit ?

> 2) Linux has two parameters related to buffering. Buffers and cache. The
> problem is I can't find anywhere the difference between them in any
> documentation described good, better then just saying these are different
> things. I do not understand why simetimes I got buffers are more than a
> cache under havy file I/O and sometimes cache more than buffers. Can anyone
> explain this or point me to good documentation.
>

buffers are used for i/o (read/write and such). they hold stuff waiting to
go to disk and ready to go to disk.
cache is page cache, used by mmap and such.


--
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
I am Homer of Borg! Prepare to be... OOooo! donuts!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [from the cache]
©2003-2011 Jasper Spaans