1834017 Members
2518 Online
110063 Solutions
New Discussion

Re: swap space

 
Jose_11
Advisor

swap space

I have 2 swap spaces defines in my system (hpux11.0):
primary swap on /dev/vg00/lvol2 and a secondary swap that defines as a local filesystem .
The both are with priority 1.

problem is that when I try to run new process I get "not enough space" but when I perform "swapinfo -t" I c that primary swap is 47% used and the secondary swap is 0% used (total % used is 99%).

Can sombody explain why secondary space is 0% used .

from /etc/fstab :
/dev/vg00/lvol9 /files swapfs min=0,lim=65536,pri=1 0 2


swapinfo -t shows:
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 524288 248632 275656 47% 0 - 1 /dev/vg00/lvol2
localfs 524288 0 524288 0% 524288 0 1 /files/paging
reserve - 799944 -799944
memory 178032 163524 14508 92%
total 1226608 1212100 14508 99% - 0 -

Thanks in advance

9 REPLIES 9
Vincenzo Restuccia
Honored Contributor

Re: swap space

insert in /etc/fstab:
/dev/vg00/lvolxx ... swap pri=1 0 0
#swapon -a (enabled secondary sap)
Jose_11
Advisor

Re: swap space

Hi Vincenzo,

I have already the line :
/dev/vg00/lvol9 /files swapfs min=0,lim=65536,pri=1 0 2

for secondary swap, in /etc/fstab and there is no need to define /dev/vg00/lvol2 in /etc/fstab (as far as I know) !

what are the two 0's,in the end line that u suggest, mean ?
Vincenzo Restuccia
Honored Contributor

Re: swap space

When you add swap areas, you can assign a priority to each. Priorities range from 0 (the highest) to 10 (the lowest). The system uses the swap areas with higher priority first. The system gives device swap priority over file system swap when each has the same priority. Here are the guidelines you should use:

Given multiple swap devices with identical performance, assign each an identical priority. By so doing, you will allow the system to use each of them on an interleaved basis which enhances performance.


Assign higher priorities to the swap areas that have faster performance and lower priorities to areas that are slower.


Give device swap areas priority over file system swap areas.


Give lower use file systems priority over higher use file systems.
The primary swap area has priority 1. Device and file system swap areas set dynamically default to a priority of 1 if no priority is specified.

Jose_11
Advisor

Re: swap space

Hi Vincenzo,

From your reply I can understand that when primary swap is full then the system begin to swap to the secondary swap.
But in my system I get "no more space" when secondary swap space is 0% used - Why ???


Vincenzo Restuccia
Honored Contributor

Re: swap space

Increase maxswapchunks
maxswapchunks sets the maximum amount of swap space that can be configured, system-wide.

Acceptable Values:
Minimum
1
Maximum
16384
Default
256
Jose_11
Advisor

Re: swap space

maxswapchunks is calculate as follows:

maxswapchunks= Max_swap_space/(1024*swchuck)

in my system:
Max_swap_space 1G
maxswapchunks 513 swapmem_on 1 swchunk 2048

So it seems that maxswapchunks=513 is a good value.

someone have another idea ???
Vincenzo Restuccia
Honored Contributor

Re: swap space

You should increase maxdsiz, possibly maxssiz,
and sometimes maxtsiz needs to be increased as well. If the program will run, maxtsiz is probably big enough. You might also need to increase shmmax. I would also make sure that I have enough swap and/or enable pseudo-swap (swapmem_on=1). Typically, disk i/o is not all that important so I would reduce dbc_max_pct to no more than 10% or set bufpages to limit buffer cache to no more than 100MB.
See http://docs.hp.com/hpux/onlinedocs/os/KCparams.OverviewAll.html
Deshpande Prashant
Honored Contributor

Re: swap space

Hi
Take a look at glance to see if any system table kernel parameters are running out. You may want to see syslog.
It may be more than just swap issue.

Thanks.
Prashant.
Take it as it comes.
Rita C Workman
Honored Contributor

Re: swap space

Hi Yosi,

I agree much with Vicenzo...but I am going to head in a slightly different direction on swap. First let me say, that I prefer to keep my swap going on in memory...it is the fastest way to process and so then my preference. I set up device swap, but my goal has always been to have it there as a last resort...since device swap involves obvious i/o issues and is far slower.
So first I ensure that I have enabled pseudo_swap in my kernel. Now I am including a thread that mentions a couple points on swap and just a couple parms (there are more to be considered though, as Vicenzo mentioned). But I feel this thread may give you an approach you may want to consider...and somehow I really wonder what your dbc_max_pct is set to??

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

Also do a SEARCH on swap space...and check some other good postings too ..

Hope this helps,
Rita