1833107 Members
2826 Online
110051 Solutions
New Discussion

Reserve Swap Space

 
Stephen Hughes
Occasional Contributor

Reserve Swap Space

I'm currently running my EDI System on hp-ux 10.20. I have a problem that when we receive a translated a file bigger than 20mb, out software we are using doesn't ftp it to the production server. The poeple who support our software suggest I increase the per process reserved swap memory/reserve swap space. Can this be done, and if so, how?
Is there anything else you can think of that I can do?
4 REPLIES 4
Alex Glennie
Honored Contributor

Re: Reserve Swap Space

It maybe worth looking at :

Pseudo swap is HP's solution for large memory customers who do not wish to
purchase a large amount of swap space. The justification for purchasing large
memory systems is to prevent paging and swapping, therefore, the argument
becomes "Why purchase a lot of swap space if the system is not expected to page
or swap?"

Pseudo swap is swap space which the operating systems recognizes, but in
reality it does not exist. Pseudo swap is make-believe swap space. It does not
exist in memory, it does not exist on disk, it does not exist anywhere.
However, the operating system does recognize it, which means more swap space
can be reserved than physically exists.

The purpose of pseudo swap is to allow more processes to run in memory, than
could be supported by the swap device(s). Swap devices refer to both device
swap or filesystem swap. It allows the operating system(specifically the kernel
variable swap_avail) to recognize more swap space, thereby allowing additional
processes to start when all of the physical swap has been reserved. By having
the operating system recognize more swap space than physically exists, large
memory customers can now operate without having to purchase large amounts of
swap space which they will most likely never use.

The size of pseudo swap is dependent on the amount of memory in the system.
Specifically, the size is 75% of physical memory. This means the swap_avail
variable will have an additional amount(75% of physical memory) added to its
content. This additional amount allows more processes to start when all of the
physical swap has been reserved.

Pseudo swap is enabled through the tunable kernel parameter called swapmem_on.
If the value for swapmem_on is 1, then psuedo swap is turned on or enabled. The
percentage of physical memory that pseudo swap adds to swap_avail is not a
tunable kernel parameter and is always 75%. This information is valid for all
versions of HP-UX 10.X and 11.0
CHRIS_ANORUO
Honored Contributor

Re: Reserve Swap Space

You can not manually increase the reserved swap space which has a negative value. It is the space given to swapon for interleaved paging/swapping.The size indicates the number of file system blocks that are saved for file system use only.
You can create more swap space on your system and also modufy the kernel parameters as follows:
allocate_fs_swapmap=0
swapmem_on=1
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Dave Wherry
Esteemed Contributor

Re: Reserve Swap Space

It sounds more like a networking than a memory/swap issue to me. You say it can not ftp to your production server. I had a similar problem a couple of years ago on a Sequent system running Dynix PTX. We had to increase a kernel parameter to allow for the larger files to be ftp'd. I think the problem was that the larger files were taking longer and hitting some sort of time-out. I've looked and do not see any comparable kernel parameter in HP-UX.
Another possibility is with your network. I've seen firewalls that block large files from being downloaded. Maybe your network has some sort of limitation configured.
Has this file recently grown in size? If the ftp used to work, but, now fails since it is larger, there might be a limit set somewhere.
Alan Riggs
Honored Contributor

Re: Reserve Swap Space

I agree. turning on psuedo-swap will relieve the problem if you are actually running into a swap limit issue. The symptoms of this are failures to fork or exec for new processes. This is because the OS wil not start a shell for a process unless it can reserve space to page the process out at need.

Use swapinfo to get a look at your swap space. If you are not nearing 100% of swap space reserved with no memory swap then you are unlikely to be experiencing a swap issue.