1825721 Members
3134 Online
109687 Solutions
New Discussion

adding swap space

 
SOLVED
Go to solution
Deepak Seth_1
Regular Advisor

adding swap space

I have a V class system with 16 gig of RAM and about 5 gig of SWAP SPACE.

Here is my output of swapinfo
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 1024 0 1024 0% 0 - 0 /dev/vg00/lvol12
dev 4000 0 4000 0% 0 - 1 /dev/vg00/lvol10
reserve - 3420 -3420
memory 13327 779 12548 6%
total 19375 4199 15176 22% - 0 -
Iam planning to add another 30 gig of device space (EMC unmirrored disk) . Few questions .

1. should i create a seperate vg and assign a 30 gig to swap space or

2. should i add a swap space to my existing volumes - let say 5 gig each to 6 volumes . To maintain the same size ?

3. Should my maxswapchunks value = totalspace * 2 ?

4. how should i define them in fstab - which level so they work best ?

Any help/suggestion appriciated.

8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: adding swap space

Hi:

I wouldn't add any more. From what you show, you're not using any of your device swap now. Why waste the disk?

Regards!

...JRF...
Santosh Nair_1
Honored Contributor
Solution

Re: adding swap space

Why are you looking to add 30 GB of swap? You shouldn't need that much swap space...you're just begging for performance problems if you need that much swap. In any case, in response to your questions, you should probably spread out the swap across as many spindles (disks) as possible to get the best performance. Remember to set the priority of all these disks to the same number so that it doesn't constantly hit one disk. As for maxswapchunks, the max value for this parameter is 16384. Which means that the max swap you can have on a system is roughly 32 GB, i.e. 16384 * DEV_BSIZE (1024) * swchunk(2048) = 32 GB.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
A. Clay Stephenson
Acclaimed Contributor

Re: adding swap space

Hi Deepak:

My first question is why? You are not using it. A few applications (SAP) do some really dumb things that require the swapspace but don't really use it. All you may need to do is enable pseudoswap and you should be fine.

Plan B. If you feel you really must have the swap then use the terrible, dreaded filesystem swap at very low (hi number) priority. The value of this method is that the swapspace is there for application checks but unless it is really used, it doesn't consume diskspace. In your case, the disk doesn't appear to be used so it's far better to trick the system by using filesystem swap - since we're really not using it anyway.

Clay
If it ain't broke, I can fix that.
Deepak Seth_1
Regular Advisor

Re: adding swap space

I want to disable sudo swaping ie swapmem_on = 0 . In order to make use of sudo swapping i want to assign a huge swap space otherwise it is limited to just whatever it has now - which of 5-6 gig and i will also not be using my physical memory . What do u suggest . We use Baan ERP .
Santosh Nair_1
Honored Contributor

Re: adding swap space

Pseudo swap doesn't actually take up any memory...its just a way to trick the OS into thinking that there is enough reserve space for processes to startup. It does NOT rob the system of ANY memory.

-Santosh
Life is what's happening while you're busy making other plans
Roger Baptiste
Honored Contributor

Re: adding swap space

Deepak,

From your swapinfo output,
i don't see any need to add
additional swap to the
existing setup.
Please note that Psedo-Swap
is currently SET ON in your
system. That is allowing you
to use 75% of your Memory
for Pseudo-swap - which
comes to around 12 Gb.
Add that to your 5Gb device
swap and you have 17Gb of
swap on your box. There is
no need to add further to it,
unless the usage is high.

HTH
raj
Take it easy.
Deepak Seth_1
Regular Advisor

Re: adding swap space

i do see little bit of pageout in the system - ocassionly and somehow find this 30 gig space of no use and therefore plan to use as a device space .
A. Clay Stephenson
Acclaimed Contributor

Re: adding swap space

Hi Deepak:

If you are seeing a few pageouts that is probably memory mapped files being closed and is certainly no big deal.
If it ain't broke, I can fix that.