1752590 Members
3722 Online
108788 Solutions
New Discussion юеВ

Extend Swap?

 
joe_91
Super Advisor

Extend Swap?

This is my current swapinfo (having 15G). I need to increase to 22G.

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvswap1
dev 3072 0 3072 0% 5242880 - 1 /dev/vg09/lvswap2
reserve - 15360 -15360
memory 19513 4242 15271 22%
total 34873 19602 15271 56% - 0 -
Can i increase the current lvol for swap? or should i create a new lvol like lvswap3 on vg09?

Thanks

Joe
9 REPLIES 9
Patrick Wallek
Honored Contributor

Re: Extend Swap?

I would just add a new swap LV.

My biggest question is why do you think you need to add 7GB more swap space? Your allocation looks fine. You don't appear to be paging out. Why waste 7GB of disk space?
joe_91
Super Advisor

Re: Extend Swap?

you are right. the SAP team says it is their standard to have around 20 G swap space.

Thanks

Joe
A. Clay Stephenson
Acclaimed Contributor

Re: Extend Swap?

One of the requirements of a swap LVOL is that it be contiguously allocated so it's doubtful that the LVOL could be extended. In any event, a reboot would be required before the larger LVOL would be utilized. It's easier (and at least as valid) to simply allocate another swap LVOL. I assume you have set maxswapchunks large enough for the increased swap; if not, you will need to build a new kernel and reboot.

According to this swapinfo output, you aren't using swap so what makes you think that you need more swap space?
If it ain't broke, I can fix that.
DCE
Honored Contributor

Re: Extend Swap?


Just make a new lvol.

Is there a specific reason you need that much swap? Your system performance would die before before you ever actually reached 15 GB of swap used.

You do need to have at least one for one swap for memory. psuedo-swap is a help in the area as well, if you have it enabled in the kernel. (swapmem_on=1)
Patrick Wallek
Honored Contributor

Re: Extend Swap?

Well, my first question to the SAP team would be -- WHY? Why do you think you need that much swap?

I mean, after all, that is what you bought all that RAM for.
A. Clay Stephenson
Acclaimed Contributor

Re: Extend Swap?

The last time I was involved in an SAP install, the SAP installation routine actually looked for the amount of swap and would terminate if 3X memory weren't found; after installation, SAP would be perfectly happy with much less swap (and indeed the swap was never used). One solution is to add that terrible, awful filesystem swap at priority 8 or so; that make's the SAP install happy and you can later remove it.

If you are running more swap space than memory, running pseudoswap (swapmem_on=1) is pointless.
If it ain't broke, I can fix that.
joe_91
Super Advisor

Re: Extend Swap?

Clay,

how would that priority be assigned?

thanks

joe
A. Clay Stephenson
Acclaimed Contributor

Re: Extend Swap?

At boot time, priority is set by reading /etc/fstab; just look at your current /etc/fstab and it should be obvious. Man fstab for details. At run time the swap is specified with the -p option. Man 1m swapon for those details.
If it ain't broke, I can fix that.
sathish kannan
Valued Contributor

Re: Extend Swap?

hi joe,

I don't know where you are going to create the new SWAP lvol, I mean which disk. If you are trying to create on a external SAN array, try to spend it to multiple spindles as much you can.

my 2 cents


Regards
Sathish
Don't Think too much