1834425 Members
2070 Online
110067 Solutions
New Discussion

Re: swap space

 
Reggie Chang
Frequent Advisor

swap space

Hello all,

I feel that the swap space was not properly set up on our machine. Swapinfo shows the
following.


# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
localfs 1146 0 1146 0% 2048 0 0 /work/paging
reserve - 50 -50
memory 382 39 343 10%
total 2040 89 1951 4% - 0 -
#

So I tried to make /dev/vg00/lvol2 back
to the primary swap but it remained the
same in swapinfo (still secondary fo rlvol2).

The commands used are :
lvrmboot -s vg00
lvlnboot -s /dev/vg00/lvol2

I've modified /etc/fstab and rebooted, by
the way.

Any comments are welcome.

Best regards,

Reggie
reggie@zonatech.com



9 REPLIES 9
Bill Hassell
Honored Contributor

Re: swap space

It's not clear at all what you want to do. The primary swap area is lvol2 with a second swap area that is actually filesystem swap. To remove the swap designation for the filesystem, just remove the entry in /etc/fstab and reboot (swap can never be removed on a running system).

512 megs should be fine for most applications. Swap is just an overflow area...there is no reason to have thousands of megs of swap space if it is never going to be used.


Bill Hassell, sysadmin
Sridhar Bhaskarla
Honored Contributor

Re: swap space

Hi Reggie,

I didn't quite understand your question. If it is about the priority "1" of the primary swap space, then it is the default and is not changeable. It is designed that way for the diskless clients so that they can use their own swap. Also it will allow you better manage your other swap devices by specifying either low (high prority) or equal (interleaving) value so that the swap allocation can be efficient.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: swap space

Hi:

It appears that all you need to do is edit /etc/fstab and change the priority of your additional swap to a value > 1; reboot; and then you are all set.
If it ain't broke, I can fix that.
Hooi Siew Hoong_1
Frequent Advisor

Re: swap space

Hi,

Your swap configuration looks normal. Primary swap should not have an entry in /etc/fstab. Using lvlnboot command to configure the primary swap would be sufficient. Any additional swap will need an entry in /etc/fstab.

Reggie Chang
Frequent Advisor

Re: swap space

Maybe I should describe where all the problem started.

When I tried to compile a FORTRAN code (part of a package), compiler complained about the swap space (or maxdsiz kernel parameter). I think swap space is easier to fix.

Once the machine was added a file swap. At that time the file swap had priority 0. (It has been taken away now.)

The error message from compilation is

#f90 -c +O3 +U77 flutter.f
/home/reggie/zaero/fciAAAa01932.f
external subroutine FLUTER
external subroutine KMDRIV
.
.
external subroutine RLEIGV
9437 Lines Compiled
Error 8203 : In procedure memory exhausted at 65532 Kbytes; try increasing swap space or the maxdsiz kernel parameter (8203)
f90: Errors detected.

You can see that the swap space is 512MB but the compilation stopped at using about 65 MB. (from top command, it reached slight higher of Virtual Memory but
still less than 100 MB)

So what is the issue here then? I think I got 512 MB of swap according to swapinfo -tam. Is it right? Should /etc/fstab have a line about swap space /dev/vg00/lvol2?

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
reserve - 41 -41
memory 382 20 362 5%
total 894 61 833 7% - 0 -
#

Thank you for the feedback.

Reggie

James R. Ferguson
Acclaimed Contributor

Re: swap space

Hi Reggie:

/dev/vg00/lvol2 is your *primary* swap device and should *not* have an entry in /etc/fstab.

If you put an entry in /etc/fstab for primary swap, you will see a warning at startup noting "WARNING: swap partition already active".

Regards!

...JRF...
Patrick Wallek
Honored Contributor

Re: swap space

I believe you posted the problem about your fortran compile blowing up in another recent thread:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x54cba2db8513d6118ff40090279cd0f9,00.html

In that thread it is pointed out that the problem appears to be your maxdsiz kernel parameter, and steps are recommended to fix that.

Here is a document on the maxdsiz kernel parameter:
http://docs.hp.com/hpux/onlinedocs/os/KCparam.MaxDsiz.html

You will notice that the default is 64MB. So if you are hitting that limit, it is not going to matter what you do to your swap space configuration, you are still going to have the problem until you increase maxdsiz and reboot the machine.
James R. Ferguson
Acclaimed Contributor

Re: swap space

Hi (again) Reggie:

The issue of too little swap space vs. an inaequate 'maxdsiz' are different issues. In one or more of your other postings concerning your general Fortran compilation problem, I suggested to you that you needed to increase 'maxdsiz'. You then noted that you were having kernel compilation problems (in the thread below). You should see my suggestion in *that* thread to look at a similar one. See your thread and follow my last suggestion therein to see if it resolves your kernel problem, please:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xb0caa2db8513d6118ff40090279cd0f9,00.html

Regards!

...JRF...
Reggie Chang
Frequent Advisor

Re: swap space

I decided to re-install 10.20 yesterday and everything works fine now.

Thank you all.

Reggie