swap not being used

debu debajit_kataki at rediffmail.com
Mon Nov 17 04:14:13 UTC 2008


Hi,
  
Here is more detail:

perl testswap.pl

code:

#!/usr/bin/perl

$i = 0;

while ($i < 100000000000000)
{
       $allocate_mem[$i] =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
       $i++;
}

I run this script in one console and in another with free -mt.

Till i get : "Out of memory" in 1 st console, i see not a single KB swap is utilized in second console of same server.

#cat /etc/fstab.

/dev/VolGroup00/swap01  swap                    swap    defaults        0 0
/dev/VolGroup00/swap02  swap                    swap    defaults        0 0



Whats happening? 

~Regards
DK


On Mon, 17 Nov 2008 Geofrey Rainey wrote :
>Linux will try to maximize its memory usage so there's nothing wrong
>With 99% memory usage. Perhaps your system doesn't actually need
>To be using swap?
>
>-----Original Message-----
> From: redhat-list-bounces at redhat.com
>[mailto:redhat-list-bounces at redhat.com] On Behalf Of debu --- Debajit
>kataki
>Sent: Sunday, 16 November 2008 6:18 a.m.
>To: redhat-list at redhat.com
>Subject: swap not being used
>
>I had a pretty old untouched server for a long time, which i thought to
>bring back to production. But what i saw was it had no swap at all.
>
>
>I crated two LVM of 2GB each, mkfs -t ext3  lvm, mkswap and a swapon. is
>not showing me that it is currently being used, even when the entire
>memorey got exhausted.
>
>Any pointer/advuce guys? Am I missing something?
>
>Regards
>~debu
>--
>redhat-list mailing list
>unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
>https://www.redhat.com/mailman/listinfo/redhat-list
>==========================================================
>For more information on the Television New Zealand Group, visit us
>online at tvnz.co.nz
>==========================================================
>CAUTION:  This e-mail and any attachment(s) contain information that
>is intended to be read only by the named recipient(s).  This information
>is not to be used or stored by any other person and/or organisation.
>
>
>--
>redhat-list mailing list
>unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
>https://www.redhat.com/mailman/listinfo/redhat-list



More information about the redhat-list mailing list