From owner-freebsd-stable Wed May 19 10:41:42 1999 Delivered-To: freebsd-stable@freebsd.org Received: from fed-ef1.frb.gov (fed.frb.gov [132.200.32.32]) by hub.freebsd.org (Postfix) with ESMTP id 1FE0C14D2B for ; Wed, 19 May 1999 10:41:40 -0700 (PDT) (envelope-from seth@freebie.dp.ny.frb.org) Received: by fed-ef1.frb.gov; id NAA05526; Wed, 19 May 1999 13:39:08 -0400 (EDT) Received: from m1pmdf.frb.gov(192.168.3.38) by fed.frb.gov via smap (V4.2) id xma005268; Wed, 19 May 99 13:38:52 -0400 Date: Wed, 19 May 1999 13:38:49 -0400 (EDT) From: Seth Subject: RE: Memory leaks & kernel panic/reboot & ahc reboot In-reply-to: To: Ilya Balashov Cc: Greg Quinlan , freebsd-stable@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I am starting to see a common thread....... I use the 'ahc' controller. > > > > This can easily be reproduced..... > reproduce is too easy.... > reboot system... > run "top"... and remember free memory... > run "tar cvf /dev/null /usr" > run "top" again... and almost all free memory LEAKED !!!! > This is NOT LEAKAGE. This is caching of the data in case you need it again. If you don't, it will be reused! Once again, "Inactive" is NOT "leaked". It's "well, we have some data that you may need in the future, so we'll keep it around, but if you need this memory for something else, we'll discard it." To prove this, just run the following script (as a user with no memory restrictions). What it will do is fill up all available memory, reclaim "Inactive" memory, fill up swap, and then crash, freeing up everything and causing all memory to be listed in the "free" output. Like so: Before: Mem: 12M Active, 132M Inact, 19M Wired, 6952K Buf, 213M Free Swap: 512M Total, 512M Free After: Mem: 4084K Active, 544K Inact, 18M Wired, 252K Cache, 7128K Buf, 353M Free Swap: 512M Total, 15M Used, 496M Free, 3% Inuse see? the script: #!/usr/bin/perl # run at your own risk. Haven't had problems here, but YMMV. push @a ,("a"x65536); while (1) { push @a,@a;} SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message