Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.