Re: Swap file not being utilized?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 22 October 2002 13:47, Ryan Camick <ryan@endless.eu.org> 
wrote:
> Subject: Re: Swap file not being utilized?
> From: Ryan Camick <ryan@endless.eu.org>
> To: psyche-list@redhat.com
> Organization:
> Date: 22 Oct 2002 13:32:34 -0400
> Reply-To: psyche-list@redhat.com
>
> On Tue, 2002-10-22 at 13:09, Kevin.Lisciotti@bos.frb.org wrote:
> > On a new Linux server I just set up, I created a 500 meg swap file
> > which is equal to the amount of ram in the machine. The swap file
> > is active but shows 0% used, while the memory shows 184 meg used
> > and 316 meg free.
>
> I assume your results are similar to mine?  This is completely
> normal, to not ever use the swap file, if it is never needed.  (I
> have 512MB RAM and 640MB Swap)
>
> [ryan@vanessa]:[~]$ free -m
>              total       used       free     shared    buffers    
> cached
> Mem:           500        490          9          0         63      
> 239
> -/+ buffers/cache:        187        313
> Swap:          643          0        643
>
> > The swap file is mounted as /dev/hda2, has the proper entry in
> > /etc/fstab yet it's never utilized. Is there a threshold as to when
> > it will kick in or could something else be wrong? I've never had
> > issues with the swap file in earlier versions. Thanks!
>
> I've loaded everything I can possibly think of on my system,
> including about 20 pictures and the only thing changing is the amount
> of buffers/cache.  All is well, this is normal.  Oh, look, I used
> just under 1MB of swap!  Weeee...

It's actually not too difficult to load up your system to observe the 
swap being used.  Just create a text file .. call it 'mybash', and put 
one line within it:  'my bash'  ..you can do this with the following 
command:

$ echo bash mybash > mybash

Next open up a term and enter 'top' to be able to see your memory usage 
.. then open another term and type 'bash mybash' to start an endless 
loop of the mybash script.  You'll see the swap get consumed 
eventually.  At some point it will run out of memory and die on it's 
own.



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux