Operating System - HP-UX
1753909 Members
8802 Online
108810 Solutions
New Discussion

Re: Your favorite SWAP Question

 
Q4you
Regular Advisor

Your favorite SWAP Question

On one our systems we have 20G swap mirrored and with proprity set as follows :

lvol2 8 G Priority : 0
lv_swap1 12 G Priority : 1

If system starts swapping, which will be used first ?

Is there any program or method or utility by which I can bring the system to its knees and start swapping heavy say upto 60 to 80% ??

1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: Your favorite SWAP Question

All priority 0 will be used first; then all 1's ; then 2's .... If devices share an equal priority, swap will be interleaved among them.

All you need to do to get the machine swapping is to launch many processes - assuming nproc/maxuprc is large enough so that you don't hit that limit first. Something as simple as:

#!/usr/bin/sh

I=1
while [[ ${I} -lt 1000 ]]
do
sh &
I=$((${I} + 1))
done

Afew of these should bring any box to its knees.

If it ain't broke, I can fix that.