1825805 Members
2902 Online
109687 Solutions
New Discussion

Swap space questions

 
Mike Kuhar
Advisor

Swap space questions

I have two questions.

1. is there a command that will see what is in swap? I ran out of swap yesterday, and I would like to see what was using it.

2. What configurable kernel parameters need to be added/changed to be able to add a second swap area? I tried to add swap throuh sam, and it told me I need to change/add to the kernel parameters, rebuild the kernel and reboot. Since I didn't have a reboot window, I canceled out of it. -mk
6 REPLIES 6
Brian Bergstrand
Honored Contributor

Re: Swap space questions

1. No, you cannot see the swap pages or what process those pages belong to. At least not that I know of. I suppose you could do a hexdump of the swap device if you really wanted to. Don't think that will be easy to interpret though. :)

2. You probably need to increase max_swap_chunks (I think that is the name). In 11i there is a max swap of 16gb.

HTH.
Brian Bergstrand
Honored Contributor

Re: Swap space questions

sorry, the params are:

maxswapchunks and swchunk

Use sam -> Kernel Configuration -> Configurable Parameters to change these and rebuild the kernel. Use Help -> Configurable Kernel Parameters to find out what they do.

HTH.
Patrick Wallek
Honored Contributor

Re: Swap space questions

1) There is no way that I know of to see what is in swap.

2) You need to make sure that the maxswapchunks kernel parameter is large enough to handle the amount of swap you want to add. I set mine at the maximum (16384) when I install HP-UX just in case I ever need to add swap.

If you are paging out, I would seriously look at adding more RAM to your system. Paging out to swap is a serious performance degradation.
Jeff Schussele
Honored Contributor

Re: Swap space questions

Hi Mike,

As Brian points out, no you can't determine what's using swap. Just how much is used.

And besides maxswapchunks, the other kernel parm that can be adjusted to increase maximum available swap space is swchunk which defines the chunk size (in 1KB blocks) of swap.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: Swap space questions

There is really no practical way to know what's in swap; moreover, if the system is paging out and paging in the the answer changes from moment to moment.

Maxswapchunks is your boy BUT is it also possible that you don't need any more swap eventhough you ran out. You may simply need to set swapmem_on=1 to enable pseudoswap. If your machine has more memory than swap and pseudoswap is not enanled then the process memory limit is the swap size BUT if pseudoswap is enabled then the limit becomes 1.75 X memory + swap.

If it ain't broke, I can fix that.
Mike Kuhar
Advisor

Re: Swap space questions

Thanks to all, the maxswapchunks increase will do exactly what I need. -mk