LVM and VxVM

Strange difference in my swap size.

 
SOLVED
Go to solution
Simone Benzi_1
Frequent Advisor

Strange difference in my swap size.

Hello everybody,

I just increased the swap size on a L3000 hpux 11.11 server: from 4 Gb to 16 Gb

I created this lv: /dev/vg00/lvol9
LV Name /dev/vg00/lvol9
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 12288
Current LE 768
Allocated PE 1536
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

in order to reach 16 Gb, then I turned it on whit a "swapon /dev/vg00/lvol9"

Now the swap is 8 Gb instead of 16!

swapinfo shows:

Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 0 4194304 0% 0 - 1 /dev/vg00/lvol2
dev 4390912 0 4390912 0% 8192000 - 1 /dev/vg00/lvol9
reserve - 135340 -135340
memory 6478556 115564 6362992 2%

What does START/LIMIT = 8192000 means?
How can I use the whole lv and reach 16 Gb?

Thanks a lot!

Simone
12 REPLIES 12
Steven E. Protter
Exalted Contributor

Re: Strange difference in my swap size.

You have 6 GB of physical RAM. You might if successful in this quest end up with a system that is pretty darned slow.

In general there are not a lot of good reasons to set swap higher than 2X physical memory.

See this:
http://docs.hp.com/cgi-bin/otsearch/getfile?id=/hpux/onlinedocs/1218/mem_mgt.html&searchterms=swap%7c16%7cGB%7cHP-UX%7cSet&queryid=20040623-100730


This document covers the issues you need to get the job done.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/5187-2216/5187-2216_top.html&con=/hpux/onlinedocs/5187-2216/00/00/55-con.html&toc=/hpux/onlinedocs/5187-2216/00/00/55-toc.html&searchterms=swap%7csize%7ckernel%7cHP-UX&queryid=20040623-98914

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sridhar Bhaskarla
Honored Contributor

Re: Strange difference in my swap size.

Hi Simone,

Can you post your maxswapchunks and swchunk kernel parameters?.

The maximum swap size you can configure on the system is maxswapchunks * swchunk. So, you will have to increase on of the parameters to accommodate larger swaps. maxswapchunks limit is 16384. Once you hit it, you will have to increase swchunk value.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Patrick Wallek
Honored Contributor

Re: Strange difference in my swap size.

Check /var/adm/syslog/syslog.log and I bet you will see a message that says your maxswapchunks kernel parameter is too small and that it needs to be increased. It should give a value to increase it to so that you can use all of your swap space.

Modifying this kernel parameter requires a system reboot. I generally try to set the maxswapchunks parameter to its maximum value (16384) so that I don't have to worry if I ever need to add some swap space in a hurry.
Simone Benzi_1
Frequent Advisor

Re: Strange difference in my swap size.

Hi,

Here's kernel parameters:

maxswapchunks 16384
swchunk 2048

Simone
Geoff Wild
Honored Contributor

Re: Strange difference in my swap size.

Your swap lvol isn't contiguous.....

need to create like this:

lvcreate -r n -C y -L 12288 /dev/vg00


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jeff Schussele
Honored Contributor

Re: Strange difference in my swap size.

Hi Simone,

What is the PE size of vg00?
Do a vgdisplay vg00.
If it's the default of 4MB, then since lvol9 is mirrored it will only be 3 Gb, If 8 MB then 6Gb & so on.
I suspect it's 8 MB - so if you want a mirrored 12 GB swap LV then you'll need to allocate 3072 PEs to lvol9. Or don't mirror it which I would *not* recommend. Also it's not really a good idea to allocate another swap LV on the same VG as the primary. You really should use another disk or LUN & then set the secondary swap for priority = 0.
BTW - with those kernel parameters you should be able to get to 32GB of swap. But I suspect you forgot to take into account the mirroring.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Simone Benzi_1
Frequent Advisor

Re: Strange difference in my swap size.

Hello!

lv is contiguous and mirrored and PE size is 16 MB:

--- Logical volumes ---
LV Name /dev/vg00/lvol9
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 12288
Current LE 768
Allocated PE 1536
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t2d0 768 768
/dev/dsk/c2t2d0 768 768

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c1t2d0 03371 current /dev/dsk/c2t2d0 03371 current
00001 /dev/dsk/c1t2d0 03372 current /dev/dsk/c2t2d0 03372 current

......


00763 /dev/dsk/c1t2d0 04134 current /dev/dsk/c2t2d0 04134 current
00764 /dev/dsk/c1t2d0 04135 current /dev/dsk/c2t2d0 04135 current
00765 /dev/dsk/c1t2d0 04136 current /dev/dsk/c2t2d0 04136 current
00766 /dev/dsk/c1t2d0 04137 current /dev/dsk/c2t2d0 04137 current
00767 /dev/dsk/c1t2d0 04138 current /dev/dsk/c2t2d0 04138 current

Simone Benzi_1
Frequent Advisor

Re: Strange difference in my swap size.

Hi,

I found this note:

#####################################
From the swapinfo(1M) man page:

START/LIMIT For device paging areas, START is the block address on the
mass storage device of the start of the paging area. The
---> value is normally 0 for devices dedicated to paging, or
the end of the file system for devices containing both a
file system and paging space.

For file system paging areas, LIMIT is the maximum number
of 1-Kbyte blocks that will be used for paging, the same
as the limit value given to swapon.

Also, the following message occurred in /etc/rc.log:

/usr/sbin/swapon: Device /dev/vg00/swapdev2 contains a file system.
The system will page in the space after the end of the file system.
Add "end" to the options field in /etc/fstab to turn off this warning.

Perform the following steps to correct this problem:

a. Since this is a device swap, it cannot be unmounted.
Remove the entry from fstab, and reboot the system.

b. Once the system is up, use dd(1) to copy a large file
to that lvol, for example:

# dd if=/stand/vmunix of=/dev/vg00/swapdev2

c. Configure the swap, for example:

# swapon -f /dev/vg00/swapdev2

d. Check swapinfo as above. If everything looks ok then
add the entry back into fstab.
###################################

tomorrow I'll try this way. Any other no-reboot suggestion?

Simone
Geoff Wild
Honored Contributor

Re: Strange difference in my swap size.

Are you sure it is contiguous?

lvdisplay /dev/vg01/lvol1
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 8704
Current LE 1088
Allocated PE 1088
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default


Your allocation states it is only strict....


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.