Re: SWAP priority

2006-10-02 Thread Chuck Swiger

Bob wrote:
It became obvious after a short while, that I had too little physical memory 
(1GB), and I was using swap often. While swapping, things slowed down. So, I 
added an additional 1GB of swap space (via swap file) on the secondary file 
system. I did this as per the manual.


I now have more swap; my question is this: How can I tell the OS to use the 
new swap file BEFORE using the old one? Is there a way to tell the system to 
prioritize the use of multiple swaps?


The swap system knows how to interleave data between the additional swap areas 
relatively efficiently, but if your current workload is so demanding that you 
need to use more than 2GB of swapspace on a machine with 1GB of RAM, you 
should add more RAM, not more swapspace


--
-Chuck
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SWAP priority

2006-10-02 Thread Bob
On Monday 02 October 2006 09:14, Chuck Swiger wrote:

 The swap system knows how to interleave data between the additional swap
 areas relatively efficiently, 

Yes I discovered that. The additional swap space was instantly used as soon as 
I activated it; and the added swap improved things measurably. Does the swap 
system take into account current disk activity when it decides to use a 
particular swap?

 that you need to use more than 2GB of swapspace on a machine with 1GB of
 RAM, you should add more RAM, not more swapspace
 
It is on order. 

The basis for my question about swap priority was based on an observation that 
the slowdown was due to swapping AND heavy disk usage. I noticed that when 
snapshots were being made on the main drive (the one I am using all the 
time), all other processes went to slow-mode. You see, the lack of enough 
memory caused the system to swap, and it swapped to the heaviest used raid 
array. I thought if I could force the system to swap to the other raid array 
(much less used) with the new swapfile, things would improve even more.

All will be cured when more ram is installed, but I thought it would be 
interesting playing with swap priority.
 
Bob
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SWAP priority

2006-10-02 Thread Charles Swiger

On Oct 2, 2006, at 2:06 PM, Bob wrote:

On Monday 02 October 2006 09:14, Chuck Swiger wrote:
The swap system knows how to interleave data between the  
additional swap

areas relatively efficiently,


Yes I discovered that. The additional swap space was instantly used  
as soon as
I activated it; and the added swap improved things measurably. Does  
the swap
system take into account current disk activity when it decides to  
use a

particular swap?


Sort of.  The syncer process runs at idle priority, so normal I/O  
initiated by your processes will take priority over paging/swapping  
idle pages of RAM out.  There may be additional logic involved to  
help balance I/O in terms of which swapfile is being used if one  
drive remains busier than another, but I am not completely familiar  
with FreeBSD's implementation.


that you need to use more than 2GB of swapspace on a machine with  
1GB of

RAM, you should add more RAM, not more swapspace


It is on order.

The basis for my question about swap priority was based on an  
observation that
the slowdown was due to swapping AND heavy disk usage. I noticed  
that when
snapshots were being made on the main drive (the one I am using all  
the
time), all other processes went to slow-mode. You see, the lack of  
enough
memory caused the system to swap, and it swapped to the heaviest  
used raid
array. I thought if I could force the system to swap to the other  
raid array
(much less used) with the new swapfile, things would improve even  
more.


Well, you might try benchmarking the system with both arrays used for  
swapping and with only the less-busy RAID array being used for  
swapping, and see which one does better.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SWAP priority

2006-10-02 Thread Bob
On Monday 02 October 2006 14:23, Charles Swiger wrote:


 Well, you might try benchmarking the system with both arrays used for
 swapping and with only the less-busy RAID array being used for
 swapping, and see which one does better.

Yes, this is what I will do; if not benchmark, at least get a subjective feel 
for which is faster.

Sorry to be a pest, but how can I do what you suggest? My SWAP0 is a 
_partition_  on the  raid0 volume , and SWAP1 is a swapfile on raid1 created 
as a Vnode; and activated in rc.conf by swapfile=/raid1/swap1 
 
How can I tell FreeBSD to ignore the primary swap partition?  I set that 
partition  up during the online install process if I recall, and none of 
my /etc/ files seem to reference it directly :-(

I will also want to double the size of SWAP1 to 2GB, so the experiment is 
comparing the same swap space; but that part is simplistic.

Bob
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SWAP priority

2006-10-02 Thread Norberto Meijome
On Mon, 2 Oct 2006 16:31:47 -0400
Bob [EMAIL PROTECTED] wrote:

 Sorry to be a pest, but how can I do what you suggest? My SWAP0 is a 
 _partition_  on the  raid0 volume , and SWAP1 is a swapfile on raid1 created 
 as a Vnode; and activated in rc.conf by swapfile=/raid1/swap1 
  
 How can I tell FreeBSD to ignore the primary swap partition?  I set that 
 partition  up during the online install process if I recall, and none of 
 my /etc/ files seem to reference it directly :-(

comment out the line swapfile in rc.conf .

B

_
{Beto|Norberto|Numard} Meijome

Science Fiction...the only genuine consciousness expanding drug
  Arthur C. Clarke

I speak for myself, not my employer. Contents may be hot. Slippery when wet.
Reading disclaimers makes you go blind. Writing them is worse. You have been
Warned.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


SWAP priority

2006-10-01 Thread Bob
 
Hi:

OK, I have 2 swaps, one on the  main raid (4 20GB hot-swap drives) 1/0 and 
another on the secondary (2 20GB hot-swap drives) raid 1. All hardware raid 
via dell PERC2 Controllers.  This is on my personal work-station, which I am 
now using multi-tasking more then I have ever done.

When I first installed the system I allocated SWAP as a seperate partition on 
the main (logical) drive equal to 2X my phisical memory.

It became obvious after a short while, that I had too little physical memory 
(1GB), and I was using swap often. While swapping, things slowed down. So, I 
added an additional 1GB of swap space (via swap file) on the secondary file 
system. I did this as per the manual.

I now have more swap; my question is this: How can I tell the OS to use the 
new swap file BEFORE using the old one? Is there a way to tell the system to 
prioritize the use of multiple swaps?
 
Bob
  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]