On Thu, 2004-10-07 at 00:48, Ray Olszewski wrote: > At 10:07 AM 10/7/2004 +0800, Peter wrote: > >Want to free memory? > > > >$ free > > total used free shared buffers cached > >Mem: 223708 220120 3588 0 28356 107936 > >-/+ buffers/cache: 83828 139880 > >Swap: 128480 3996 124484 > > > >$ locate /usr/bin/f* or x* or g* ... > > > > > >$ free > > total used free shared buffers cached > >Mem: 223708 41364 182344 0 1520 28592 > >-/+ buffers/cache: 11252 212456 > >Swap: 128480 5056 123424 > > Peter -- This is a pretty strange consequence of running the "locate" > command. And I cannot replicate it here. For example: > > [EMAIL PROTECTED]:~$ free > total used free shared buffers cached > Mem: 773892 742056 31836 0 87600 441912 > -/+ buffers/cache: 212544 561348 > Swap: 0 0 0 > [EMAIL PROTECTED]:~$ locate /usr/bin/f* > /usr/bin/factor > [about 40 more lines, deleted here] > [EMAIL PROTECTED]:~$ free > total used free shared buffers cached > Mem: 773892 742076 31816 0 87608 441924 > -/+ buffers/cache: 212544 561348 > Swap: 0 0 0 > > Any idea what's causing the change on your system? My understanding of > Linux says it shouldn't work the way you report seeing it, so I'm wondering > what I am missing.
It's not really anything to do with locate. You create an enormous amount of memory pressure that won't be needed but the once. This causes tho VM to dump most of what is in RAM to swap or just free the pages. I believe that is the LRU algorithm doing its job :) In my case most of my applications were dumped to swap. X was still snappy but almost everything else was massively sluggish and locate ate all available memory plus a big chunk of swap. spider ~ # free total used free shared buffers cached Mem: 1034704 1023732 10972 0 53008 334368 -/+ buffers/cache: 636356 398348 Swap: 2048248 25464 2022784 spider ~ # locate /usr/bin/g* <snip> spider ~ # free total used free shared buffers cached Mem: 1034704 132848 901856 0 652 36024 -/+ buffers/cache: 96172 938532 Swap: 2048248 252972 1795276 spider ~ # -- Owen Ford <[EMAIL PROTECTED]> () ascii ribbon campaign - against html e-mail /\ - against proprietary attachments
signature.asc
Description: This is a digitally signed message part