1753936 Members
9591 Online
108811 Solutions
New Discussion юеВ

Re: Swap performance

 
hpuxsa
Frequent Advisor

Swap performance

Hi,

Our new servers generally come with 6-8GB of RAM and 2* 73GB internal disk and the external disk is EMC. I normally configure 6GB of device swap in the the internal disk which is mirrored and I also enable psuedoswap. By doing this i am not following the performance recommendation for swap (spreading swap on multiple disks for interleaving).

Please find below a swapinfo output
swapinfo -mt
dev 6048 47 6001 1% 0 - 1 /dev/vg00/lvol2
reserve - 5494 -5494
memory 7890 2615 5275 33%
total 3938 8156 5782 59% - 0 -

I have been checking the swap utilization and I always see the device swap usage is not more than 1 or 2%. So in this case is it fine to have a single lvol for swap?

If we start using more memory at a later stage is it better to disable pseudoswap and create swap slices on EMC disks?
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor

Re: Swap performance

Hi,

There are two aspects of swap.

1. For reservation: Whenever a process comes up, space will be reserved for it in swap for future needs. If you don't have enough space to reserve for processes, then system can't bring up more processes. This doesn't play any role in performance.
2. For actual swapping (to hold pages): Used to hold pageouts in case of memory pressure and memory mapped files. Here is when the performance will come into picture. If the system is running out of memory and it starts to use the 'swap' area, then it can slow down the system.

There is no need to disable pseudoswap as it is used for only 'reservation' not 'page outs'.

If it is a production system, then it's better to add more memory than swap as 'pageouts' can impact the production. If it not a production system, then you can probably configure a secondary swap device on your EMC with the priority 0. That way page out/ins will be little faster. I have systems with such configuration and they are used for only functionality testing.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Swap performance

The general goal in systems administration today is no swapping at all. A little can be tolerated during peak periods, but if its happening all day long its time to get some more memory.

The strategy I currently use for swap is the modified A.Clay Stephenson method.

A small, fast swap area on one disk, usually equal to half RAM, which is the minimum in a HP-UX v1 install. That is highest priority. If possible, a seconday swap is set up on a different disk.

That may be larger, but either way it gets a different priority.

Your swap use is light. Its probably not impeding performance much. But if you've got a pair of memory slots free, why not make it stop swapping.

Its possible by doing some monitoring and tuning you can cut it down. Take a look at the SGA of your databases for example. Your DBA can push them up without adequate review and cause problems.

Usually talking to the DBA doesn't get me far. I make sure there is capital budget money every year for a mid year memory buy and that keeps me out of trouble.

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
Ivajlo Yanakiev
Respected Contributor

Re: Swap performance

Using 2 or more GB for your system is waste of space. If you see 50% swap space you have problem with software or realy heavy usige server that in practice not work :)
Ted Buis
Honored Contributor

Re: Swap performance

Swapmem_on=1 is only good if you have more RAM than device swap and NEVER have to do any page-outs. Good discussion in the book, "HP-UX 11i Internals" by Chris Cooper and Chris Moore. Pseudo-swap really means that some pages are bound to RAM. That's fast for those application pages that happen to be in that RAM area (pure luck), but means that the remaining pages of your applications in areas that can be paged out will get hit repeatedly (unfairly) if real memory is used up. Disk space is cheap, always have as much device swap as RAM.
Mom 6