Operating System - HP-UX
1825769 Members
1970 Online
109687 Solutions
New Discussion

swapon filesystem swap merely for staging

 
Ralph Grothe
Honored Contributor

swapon filesystem swap merely for staging

Hi,

I've never made use of filesystem swap space yet, but regard it useful for the purpose of installing a new SAP R/3 monster as an interim swap reservation digest.
I don't want to waste that much diskspace (they claim to require some 20 GB).

Now I stumble over the interpretation esotherics of swapinfo

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10000 0 10000 0% 0 - 1 /dev/vg00/lvol2
localfs 1474 0 1474 0% none 2000 9 /var/adm/crash/paging
reserve - 188 -188
memory 6331 343 5988 5%
total 17805 531 17274 3% - 2000 -

The filesystem, of which I would like to share 10 GB for paging (while reserving some 2 GB for the OS'es savecrash) is this one

# bdf /var/adm/crash
Filesystem kbytes used avail %used Mounted on
/dev/vg01/dump 12337152 3662 11948076 0% /var/adm/crash

Thus I issued this command.

# swapon -r 2000M -p 9 /var/adm/crash

But why is swapinfo only showing mere 1.5 GB available of the whole empty filesystem?




I cannot help but I find the explanation of the options in the manpage of 1m swapon pretty contrived.
This wording rather confuses me than explains what exactly is left for paging.



-r reserve reserve specifies the space, in addition to the
space currently occupied by the file system, that
is reserved for file system use only, making it
unavailable to the paging system. This reserved
space is in addition to the minimum free space
specified by the administrator when the file
system was created. See WARNINGS. The default
value for reserve is 0 indicating that no file
system space is reserved for file system use only.
reserve can be specified in the same forms as
limit, above.



Madness, thy name is system administration
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: swapon filesystem swap merely for staging

Because filesystem swap space is only taken when actually needed, you need to "outbushwhack" swap by specifying a -m min value large enough to satisfy SAP installation requirements. Swapinfo will then report big numers and SAP is fat, dumb, and happy.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: swapon filesystem swap merely for staging

Because filesystem swap space is only taken when actually needed, you need to "outbushwhack" swap by specifying a -m min value large enough to satisfy SAP installation requirements. Swapinfo will then report big numbers and SAP is fat, dumb, and happy.
If it ain't broke, I can fix that.
Ralph Grothe
Honored Contributor

Re: swapon filesystem swap merely for staging

Damned, haven't expected that one must preallocate.
Many thanks for the hint.
I reissued the swapon command, this time supplying it with an "-m 10000M".
Now it really grabbed that much from the filesystem.

# bdf /var/adm/crash
Filesystem kbytes used avail %used Mounted on
/dev/vg01/dump 12337152 10245078 2026734 83% /var/adm/crash
# du -skx /var/adm/crash/paging
10240136 /var/adm/crash/paging


However, swapinfo still displays strange numbers.

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10000 0 10000 0% 0 - 1 /dev/vg00/lvol2
localfs 1808 0 1808 0% none 2000 9 /var/adm/crash/pagin
g
reserve - 172 -172
memory 6331 343 5988 5%
total 18139 515 17624 3% - 2000 -
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10000 0 10000 0% 0 - 1 /dev/vg00/lvol2
localfs 1808 0 1808 0% none 2000 9 /var/adm/crash/paging
reserve - 172 -172
memory 6331 343 5988 5%
total 18139 515 17624 3% - 2000 -


Unfortunately, the DBAs have given up by now and escaped for home.
Therefore I can tell you the effect not before tomorrow.

Btw, do you think this problem

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=521197

could be related to the swap requirements?
Madness, thy name is system administration