Showing results for 
Search instead for 
Did you mean: 

Your favorite SWAP Question

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% ??

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:


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

Afew of these should bring any box to its knees.

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