- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- badly configured swap
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
04-14-2003 04:30 AM
04-14-2003 04:30 AM
badly configured swap
a few weeks ago i start a sysadmin job at a new company.
I think swap is badly configured from the former sysadmin. I need some advices to make a good configuration:
Physical memmory:
dmesg | grep -i physical
bsl61h:/#dmesg | grep -i physical
physical page size = 4096 bytes, logical page size = 4096 bytes
Physical: 6291456 Kbytes, lockable: 4789104 Kbytes, available: 5506124 Kbytes
Swap:
bsl61h:/#swapinfo -ta
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol2
dev 2048000 188276 1859724 9% 0 - 0 /dev/vg05/lvol5
reserve - 2306572 -2306572
memory 4865520 4865520 0 100%
total 9010672 7360368 1650304 82% - 0 -
I think this isn't a good configuration:
6GB physical memmory and only 3.95 GB RAM. Shall I add some device swap? I think swap space must have at least the same size as physical swap ?
Extend swap on /dev/vg05/lvol5 to 2 GB and add further 2GB
As you can see from the output the swap devices have different priorities. For the interleaving I have to change priority in /etc/fstab. Or ?
Kernel Parameter:
allocate_fs_swapmap 0
maxswapchunks 2072
nswapdev 10
nswapfs 10
remote_nfs_swap 0
swapmem_on 1
swchunk 2048
With a further swap device i have to adjust the kernel parameters (currently 2072 x 2 MB = 4144 MB = 4.04 GB) to reach 6GB
That's right ?
How can give me some advices.
Thanks in advance
Uli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 04:39 AM
04-14-2003 04:39 AM
Re: badly configured swap
If you have swapmem_on = 1 and dbc_max_pct = 5 (or 4), then it may not matter about the disk swap as you will be putting almost everything in memory.
What are the settings I mentioned, what types of applications are you running, and what does your memory usage look like now?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 04:42 AM
04-14-2003 04:42 AM
Re: badly configured swap
There are various strategies on swap. I was told at HP classes set it to a total of twice physical memory up to 16 G of ram.
Some of the vets here now say 1.5 times physical memory.
I remember JRF or someone recommending one small primary swap area and a large secondary one adding up to 1.5 times physical memory.
This was supposed to provide better performance. Most of the time only that small fast primary swap area ever got used.
Lots of strategies, no firm rules.
I am attaching a performance monitoring script that could help you gather information you need to make good decisions.
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
04-14-2003 04:53 AM
04-14-2003 04:53 AM
Re: badly configured swap
1. increase 'maxswapchunks' to 4096 (8 GB) in order to prevent recompile the kernel again in the future.
2. run 'ipcs -ma' to see the shared memory areas.
3. create new logical volumes to add new swap areas up to 6 GB as you suggested or much more according to applications running.
4. check dbc_max_pct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2003 05:06 AM
04-14-2003 05:06 AM
Re: badly configured swap
total 9010672 7360368 1650304 82% - 0 -
But swap needs to be contiguous and this may prevent you from extending /dev/vg05/lvol5.
You don't have to reboot if maxswapchunkcs is ok, so first try adding in another logical volume configured for swap.
NOTE: All priorities must be equal to 1! This is set in /etc/fstab for swap other than /dev/vg00/lvol2.
Here is the procedure:
lvcreate -L #### -n swap -C y -r n /dev/vg##
NOTE: -L = mb
swapon -f -p 1 /dev/vg##/swap
'swapon' may not complain if maxswapchucnks is OK. If it doesn't like maxswapchuncks then it will tell you.
maxswapchunks = total swap / 1024 * swchunk
sysdef | grep -i maxswapchuncks
sysdef | grep -i swchunck
/etc/fstab
/dev/vg##/swap ... swap pri=1 0 1