From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 25210 invoked from network); 10 Mar 1999 00:07:07 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 10 Mar 1999 00:07:07 -0000 Received: from torr (root@dynatec.com [206.16.90.117]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id TAA15647 for ; Tue, 9 Mar 1999 19:00:20 -0500 Received: from gumby.dynatec.com by torr with smtp (Linux Smail3.1.29.1 #3) id m10KW1O-0009iIC; Tue, 9 Mar 99 15:34 PST Date: Tue, 9 Mar 1999 15:32:35 -0800 (PST) From: Matt Nelson To: axp-list@redhat.com cc: "M. Nicklaus" Subject: Re: where does the memory go? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII glad to see i'm not going crazy. please do post your fragbuster. i don't have time at the moment to hack one together myself! -matt ----------------------------------------------------------------------------- Matthew Nelson Dynamics Technology, Inc. 21311 Hawthorne Blvd., Suite 300, Torrance, CA 90503-5610 Voice: (310) 543-5433 FAX: (310) 543-2117 Email: mnelson@dynatec.com On Tue, 9 Mar 1999, M. Nicklaus wrote: > Matt, > > On Tue, 9 Mar 1999, Matt Nelson wrote: > > > On Tue, 9 Mar 1999, Daniel J. Frasnelli wrote: > > > And let's compare this to my system with 128M ram: > > > [dfrasnel@relativity /tmp]$ free > > > total used free shared buffers cached > > > Mem: 127312 115416 11896 73936 13832 61216 > > > -/+ buffers/cache: 40368 86944 > > > Swap: 131064 632 130432 > > > > > > If you look at both of these 'free' outputs, you will notice that a good > > > amount of memory is tied up in both cached and shared memory allocation. > > > My system shows approx. 11M of physical memory free. However, if I were to > > > launch Netscape 4.51 (memory footprint of what, 30M?) I could do so > > > without dipping into swap space. > > > > what you say is true, but i was more concerned with the -/+ buffers/cache > > line of the free(1) output. that line, if i understand it correctly, > > indicates what your are using and have available if you dont count buffers > > and cache. in your example, it shows that you have about 40M used and > > about 87M free. *those* are the numbers that i'm wondering about. on my > > machine, the -/+ buffers/cache used climbs to ~110M during the activity of > > the day, then drops down to ~25M during the night. > > > > when i compare the 110M to the output of "ps axm" during a quiet time in > > the day (i.e., no user jobs running), i see that the the total memory used > > doesn't seem to add up to the 110M that free(1) indicates. and yes, X has > > the biggest memory footprint on an idle machine... > > > > at first i thought there was a memory leak somewhere, but when it went > > back down to something reasonable over night, i figure that i must not be > > understanding something. > > > > any other ideas? > > > > -matt > > We've seen this kind of effect repeatedly on our various Alpha/Linux > boxes. Often, as was pointed out, it has no real negative effects. > But we've definitely had cases where we couldn't start up certain > applications any more, or could not even telnet into the system any more. > > Often, it seems that network-related processes contribute to this > behavior, especially if there's a problem with the network, or some faulty > network setup etc. We've had cases where a 512 MB machine came up with > 4 kB free memory after RPC'ing like crazy during boot-up. > > Without being experts in this, we've attributed this to some kind of > memory fragmentation caused by processes that may be long dead, and which > is possibly not cleaned up optimally. The size of the swap space seems to > play an important role here: with swap space smaller than physical > memory, it appears that the system has more difficulties moving large > applications (and buffers etc.?) in and out of memory without causing > memory fragmentation. After setting swap space to at least physical RAM > size on all machines, this problem has become much less frequent. > > Be that as it may, we've solved this problem by writing a little "RAM > scrubber" application that allocates, and actually accesses, progressively > larger chunks of memory, up to a user-defined limit (it doesn't pay much > to go all the way into swap space, obviously). This little program has > solved the above problems for us in all cases. > > An example I just ran on one of our Alphas: > > "before" > total used free shared buffers cached > Mem: 515320 506744 8576 14880 383880 13424 > -/+ buffers: 109440 405880 > Swap: 590176 144 590032 > > "after" > total used free shared buffers cached > Mem: 515320 12264 503056 5216 208 3184 > -/+ buffers: 8872 506448 > Swap: 590176 1992 588184 > > > If there's interest, I can post this program here. > > (BTW, this effect doesn't seem to be unique to Alpha/Linux. We've seen it > on x86/Linux as well as SGI IRIX, albeit to some lesser extent. In any > event, we've installed our little "RAM scrubber", or "fragbuster", > program, on *all* our Linux/Unix systems.) > > Hope this was of some use, > > Marc > > > -- > To unsubscribe: send e-mail to axp-list-request@redhat.com with > 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com > >