- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- maxswapchunks
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:10 AM
05-28-2003 07:10 AM
I need to add more swap space to one of my HP-UX 11 systems and it does not take the second swap.
I have increased maxswapchunks to 9000 and I have one 4GB swap and I need to add a second 4GB swap.
But the system still complains that maxswapchunks is still too low.
Thanks
Solved! Go to Solution.
- Tags:
- maxswapchunks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:53 AM
05-28-2003 06:53 AM
Re: maxswapchunks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 06:59 AM
05-28-2003 06:59 AM
Re: maxswapchunks
kmtune -q maxswapchunks
reports 9000, as it should.
kmtune -q swchunk
reports the default 2048
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:14 AM
05-28-2003 07:14 AM
Re: maxswapchunks
How big was the parameter before? Did you double it?
"
maxswapchunks xswchunk xDEV_BSIZE
For example, using default values for swchunk (2048) and maxswapchunks
(256), and assuming DEV_BSIZE is 1024 bytes, the total configurable swap
space equals 537 Mbytes. "
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:15 AM
05-28-2003 07:15 AM
Re: maxswapchunks
set maxswapchunk to 16834 ,
that is the maximum supported.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:16 AM
05-28-2003 07:16 AM
Re: maxswapchunks
Acceptable Values:
Minimum
1
Maximum
16384
Default
256
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:21 AM
05-28-2003 07:21 AM
Re: maxswapchunks
I know all that, initially I only doubled it, but as it did not make a difference, I have doubled it again.
9000 should be enough up to 18GB of swap space.
But it does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:30 AM
05-28-2003 07:30 AM
Re: maxswapchunks
1. The maxswapchunk kernel limit was set too low and needed to be
increased.
The kernel tunable maxswapchunks is used to determine the amount of
swap space that is configurable on the system. Use this formula to
determine the maximum amount of configurable swap space:
Max Swap Space = maxswapchunks * 1024 * swchunk (typically 2048)
If maxswapchunks is 256 (default) then 512Mb of swap space can be
configured.
256 * 1024 * 2048 = 536870912
536870912 / 1024 = 524288 Kb
524288 / 1024 = 512 Mb
Maximum Configurable Swap Space: 512 Mb
Here is a second example of computing the maximum configurable swap
space. In this example maxswapchunks is set to 2005.
2005 * 1024 * 2048 = 4204789760 bytes
4204789760 / 1024 = 4106240 Kbytes
4106240 / 1024 = 4010 Mbytes
4010 / 1024 = 3.916 Gbytes
Maximum Configurable Swap Space: 3.9 Gb
Use the sysdef(1M) command to find out what is configured on the
system. For example:
# sysdef
...
maxswapchunks 512 - 1-16384 -
maxtsiz 16384 - 0-655360 Pages -
maxtsiz_64bit 262144 - 256-1048576 Pages -
maxuprc 75 - 3- -
...
swapmem_on 1 - - -
swchunk 2048 - 2048-16384 kBytes -
...
2. Output from swapinfo(1M) indicated that the device still thought it
had a filesystem on that disk even though it was configured as device
swap in the fstab file.
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 768 51 717 7% 0 - 1 /dev/vg00/lvol2
dev 900 51 849 6% 0 - 1 /dev/vg00/newswap
dev 2080 51 2029 2% 1966080 - 1 /dev/vg00/swapdev2
^
|
|--> normally zero
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 07:57 AM
05-28-2003 07:57 AM
Re: maxswapchunks
This is the error message:
# swapon /dev/vg01/swap1
swapon: The kernel tunable parameter "maxswapchunks" needs to be increased to ad
dpaging on device /dev/vg01/swap1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 08:15 AM
05-28-2003 08:15 AM
Re: maxswapchunks
Perhaps there is (was) a filesystem present. This has been known to yield this error. Try:
# swapon -f /dev/vg01/swap1
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:05 AM
05-28-2003 09:05 AM
Re: maxswapchunks
This is a brand new configured disk.
There was someone on this forum with a similar problem, same subject, but the links to the solution (from someone at HP) do not work anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:09 AM
05-28-2003 09:09 AM
Re: maxswapchunks
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:17 AM
05-28-2003 09:17 AM
Re: maxswapchunks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:22 AM
05-28-2003 09:22 AM
Re: maxswapchunks
Try this, before your 'swapon' command:
# dd if=/dev/zero of=/dev/vg01/swap1 bs=256k count=10
If you are running 11.0 and don't have 'dev/zero', create it thusly first:
# mknod /dev/zero c 3 0x000004
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:27 AM
05-28-2003 09:27 AM
Re: maxswapchunks
First)
I used SAM. Just ran the kmupdate and rebooting the server now. Will post if there are further errors.
Thanks.
Second)
Works now. Thanks!
Did you run kmupdate?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:27 AM
05-28-2003 09:27 AM
Re: maxswapchunks
>>>dd if=/dev/zero of=/dev/vg01/swap1 bs=256k count=10
I/O error
1+0 records in
0+1 records out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:33 AM
05-28-2003 09:33 AM
Re: maxswapchunks
kmupdate needs to be run when you did NOT move the new kernel into place and rebooted from SAM. I did this twice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:55 AM
05-28-2003 09:55 AM
Re: maxswapchunks
#
cd /stand/build
/usr/lbin/sysadm/system_prep -v -s system
/usr/sbin/mk_kernel -s /stand/build/system
/usr/sbin/kmupdate
This is a required step that will make the newly configured kernel bootable. kmupdate also saves the currently running kernel under a new name, /stand/vmunix.prev, and schedules the update of the system to use the default name /stand/vmunix for the newly configured kernel.
Restart the system.
shutdown -ry now
From the HP Doc
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/5185-6559/5185-6559_top.html&con=/hpux/onlinedocs/5185-6559/00/00/3-con.html&toc=/hpux/onlinedocs/5185-6559/00/00/3-toc.html&searchterms=make%7cnew%7ckernel%7chp-ux&queryid=20030528-115050
If at any point you get errors as it seems you have, you need to stop and fix them. Post them here if you want.
:-)
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 10:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 10:23 AM
05-28-2003 10:23 AM
Re: maxswapchunks
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 8683
VGDA 2
PE Size (Mbytes) 4
Total PE 8681
Alloc PE 7670
Free PE 1011
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vg01/disk1
LV Status available/syncd
LV Size (Mbytes) 30680
Current LE 7670
Allocated PE 7670
Used PV 1
LV Name /dev/vg01/swap1
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0
--- Physical volumes ---
PV Name /dev/dsk/c2t2d0
PV Status available
Total PE 8681
Free PE 1011
Autoswitch On
# lvdisplay -v /dev/vg01/swap1
--- Logical volumes ---
LV Name /dev/vg01/swap1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
# ls -l /dev/vg01
total 0
brw-r----- 1 root sys 64 0x010001 May 28 10:27 disk1
crw-r--r-- 1 root sys 64 0x010000 May 28 10:26 group
crw-r----- 1 root sys 64 0x010001 May 28 10:27 rdisk1
crw-r----- 1 root sys 64 0x010002 May 28 10:27 rswap1
brw-r----- 1 root sys 64 0x010002 May 28 10:27 swap1
#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 10:33 AM
05-28-2003 10:33 AM
Re: maxswapchunks
Somehow SAM created the new swap of zero size, instead of 4GB. I have increased the size from 0 to 4GB and now the system can use it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 10:36 AM
05-28-2003 10:36 AM
Re: maxswapchunks
Well, for starts, the size of '/dev/vg01/lvol1' is *zero* extents. You're not going to allocate much of anything there!
Regards!
...JRF...