- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Question on 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
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
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
тАО07-04-2003 02:53 AM
тАО07-04-2003 02:53 AM
The system has 1024 MB of memory
and when I do a swapinfo -t I get the following.
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 49152 0 49152 0% 0 - 1 /dev/vg00/lvol2
dev 512000 0 512000 0% 0 - 0 /dev/vg00/lvol3
dev 409600 0 409600 0% 0 - 1 /dev/vg12/SWAPE1
reserve - 559232 -559232
total 970752 559232 411520 58% -
When I do a top the system only reports 350 MB of memory. Is there a problem with top.
HP did a report for the customer and adviced them to change the prioraty on all the swapchunks to have a prioraty of 1
Currently they are
/dev/vg00/lvol3 ... swap pri=0 0 0
/dev/vg12/SWAPE1 ... swap pri=1 0 0
Is there any benifit in doing it?
I want to add more swap to the system so that I have 1.5 X memory.
Further what will I gain by changing the kernel parameter (swapmem_on 1) currently 0
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2003 03:10 AM
тАО07-04-2003 03:10 AM
Re: Question on swap
First about top, it is not really accurate, but it is not so bad about memory usage. Take care that it is "used" memory, cf man pages:
Memory Data
Includes virtual and real memory in use (with the amount of memory considered "active" in parentheses) and the amount of free memory.
So in your case 350Mb of memory is in use. Now about swap, using swapmem_on is usefull on really big system, on system like yours, no you will gain nothing to use it (swapmem_on is a sotfware feature to be able to launch more processes than your swap space can handle).
Now it is true that it is better to have the same priority for all swap device, but the best thing is to not swapping at all (if you need to swap your perf will be really bad). In fact you need to add swap only if you need to launch more processes or bigger processes.
Hope this will help.
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2003 04:57 AM
тАО07-04-2003 04:57 AM
Re: Question on swap
Do not change /dev/vg00/lvol2 & /dev/vg00/lvol3 to have the same swap priority. swap round robbins among the same priority swap devices. I guess that vg00 is one disk & at least lvol2 & lvol3 are on the same disk(s). This will lead to the root disk(s) being thrashed!!
The second thing, why are you using vg00/lvol3 (/, root directory etc!!!) as swap.
The idea of assigning the same priority to all swap devices is to spread the IO over the devices. If these "logical" devices are on physically different disks it will help, If not you will cause the disk(s) to thrash.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2003 05:06 AM
тАО07-04-2003 05:06 AM
Re: Question on swap
cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2003 05:46 AM
тАО07-04-2003 05:46 AM
Re: Question on swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2003 06:09 AM
тАО07-04-2003 06:09 AM
Re: Question on swap
If you have a two disks with swap and one disk is faster then you can assign higher priorities to the swap area associated to that disk for increased performance. But you lose the interleaving. So you have to weigh this.
Secondary swap should be on another disk other than the O/S for better I/O performance, and preferably on another controller as well. This is because the O/S disk will always be the heaviest used and by adding 2ndary swap to this disk you'll be adding to its already heavy burden.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-04-2003 07:19 AM
тАО07-04-2003 07:19 AM
SolutionInstead, focus on what appears to be slow. Is it login response time? If so (and the connections are telnet/rlogin) then fix DNS. Does top show high CPU usage (90% or more)? Then the process(es) that consumes most of those CPU cycles needs help unless that is the way it is supposed to work. If there is only one process that consumes the CPU cycles, then only a faster processor will help. If there are several processes that all consume a lot of CPU, then more processors will help. The D-class has been obsolete for a long time and a new rp-2405 would not only cost less than the original D-class, it would be MUCH faster.
Use sar to look at percentage of user versus system. Anything more than 20-30% system overhead indicates an area that needs attention (wasted systen cycles with bad coding or unnecessary queries that cost a lot of time such as du and bdf).
Most of the work needed to improve performance will focus on applications that need attention. Patches will help, especially if the system hasn't been patched for a few years.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2003 10:22 AM
тАО07-05-2003 10:22 AM
Re: Question on swap
What you see in top it's not the whole memory,
check the dmesg to find the memory.
Swap is not the first that system use,
first came the memory then the use of swap.
If you want to know the problems of your
server you need to check all the hardware
and also the kernel.
Check dmesg, syslog, top, iostat, ioscan,
vmstat also use glance.
You need to check if something wrong with
some device in you system.
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2003 08:58 AM
тАО07-06-2003 08:58 AM
Re: Question on swap
I can understand your D-class performs like a '2 legged dog about to die', however it would be like a one legged dog in a coma when it has to start swapping !
Seeing your relatively low memory usage, there would be no immediate need for you to enable pseudo-swap (the swapmem_on kernel param). Pseudo swap is only useful when you have way more physical memory than swapspace (as in, for example, 4GB memory and 1GB swap).
I guess the performance problem will be a CPU one.. let's face it, it's a D ;-) Again, as Bill already said, get hold of some general release patchbundles. I remember several processes going berserk on my D's over the last few years, all could be fixed with a little patch.
Regards
Wout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2003 11:07 PM
тАО07-06-2003 11:07 PM
Re: Question on swap
well I know Where the problem is but I could not see whay HP will recommend that all swap partitions be chenged to 1 and swapmem_on turned to 1.
I have a fair idea where this system goes wrong. For one it is heavy on user round 50% (very BAD code) Bigg jobs with a single commit at the end.
We are in the process to convince the customer to relpace the box with a new one
first sugestion was a rp2470 but they want a bigger one (rp5470).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2003 11:42 PM
тАО07-06-2003 11:42 PM
Re: Question on swap
ALso some parameters with higher values like the semaphore values will bring down the amount of available memory for the user processes
check for the amount of locked memory on the system using
#cat /var/adm/syslog/syslog.log|grep lockable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2003 03:19 AM
тАО07-07-2003 03:19 AM
Re: Question on swap
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2003 06:54 PM
тАО07-09-2003 06:54 PM
Re: Question on swap
http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90742/B2355-90742_top.html&con=/hpux/onlinedocs/B2355-90742/00/00/50-con.html&toc=/hpux/onlinedocs/B2355-90742/00/00/50-toc.html&searchterms=interleaving%7cdisk%7cswap&queryid=20030709-205316
And the specific reference:
Guidelines for Setting Up Device Swap Areas
Interleave device swap areas for better performance.
Two swap areas on different disks perform better than one swap area with the equivalent amount of space. This allows interleaved swapping which means the swap areas are written to concurrently, minimizing disk head movement, thus enhancing performance. (See Guidelines for Assigning Swap Priority.)
When using LVM, you should set up secondary swap areas within logical volumes that are on different disks (physical volumes) using lvextend.
If you have only one disk and need to increase swap space, then you should try to move the primary swap area to a larger region.
Similar-sized device swap areas work best.
Device swap areas should have similar sizes for best performance. Otherwise, when all space in the smaller device swap area is used, only the larger swap area is available, making interleaving no longer possible.
The nswapdev tunable system parameter controls the maximum number of swap devices. SAM has more information on tunable parameters.