1848054 Members
5784 Online
104022 Solutions
New Discussion

Re: SWAP

 
SOLVED
Go to solution
Nobody's Hero
Valued Contributor

SWAP

Hey Gang,
I have an L2000 running CiscoWorks 2000 which requires a lot of resources. From glance, I am short on swap. I have 2 Gb of Mem installed with a 3 GB swap/dump area. Glance shows me at 90% swap utilization. I have an extra 9 gig drive that I thought I'd use to make a swap file. You think this will help. How do you make a swap FILE? Do I need a reboot?

Thanks,
Bob
UNIX IS GOOD
4 REPLIES 4
Ruediger Noack
Valued Contributor
Solution

Re: SWAP

Hi,

you can use sam to add more swap.
Add your new disk to a volume group or create a new one.
Then craete a logical volume with size you will use for additional swap. Mark the appropriate field with "use for swap" and also "add now and during boot".
No further steps are nessasary. espacially no reboot.

Good luck
Ruediger
George_Dodds
Honored Contributor

Re: SWAP

Rita C Workman
Honored Contributor

Re: SWAP

Is your swap utilization reflective of swapping/paging out to disk...?
..or is it 90% swap utilization ALL done in memory?

For a quick check you can run
swapinfo -tam

Now look and see if any % is showing under the disk swap. If your paging out you may want to add more memory and thus avoid paging out to disk at all to thus improve performance. You can also monitor paging/swapping by using the:
sar -w 1 60

..this will check for stats on paging/swapping activity every second for 60 seconds.
Check other threads on swap; enable pseudo swap, etc. for more info...

But again...the best and most cost effective is to increase your memory and allocate the resource for better system performance.

Rgrds,
Rita

Roger Baptiste
Honored Contributor

Re: SWAP

hi,

You can create device swap as follows.
Before doing it, add the 9GB disk to one of the existing volume groups on the system by
doing
#pvcreate /dev/dsk/cxtydz
#vgextend /dev/vgX /dev/dsk/cxtydz

****
To create a swap logical volume, do the following:


1. Create a contiguous logical volume:

lvcreate -L size -C y /dev/vgX/lvolY

2. Turn swap on in the logical volume:

swapon /dev/vgX/lvolY

IMPORTANT: The default priority for swap is "1". It is a recommended to have
all the swap devices set to the same priority.

3. Edit the /etc/fstab so that swap will be turned on at boot-up; add the
following line:


/dev/vgx/lvolY ... swap pri=1 0 0

****

You do not need to reboot the system to use the swap.

swapinfo -mt is another command which will give you details of swap usage.

HTH
raj
Take it easy.