[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] disk labeling




On Mar 14, 2007, at 6:08 PM, Helge Rohde wrote:

On Wednesday 14 March 2007 16:31, Matt Simerson wrote:
You need at least as much disk swap as you have RAM. The reasons
should be obvious, but if you don't know, I recommend heading over to
Berkeley iTunes University and downloading one of their CS courses
like CS162.  Did I mention it's free?   http://itunes.berkeley.edu/
The other way to learn is wait until one of your machines is
overloaded and starts swapping heavily. The "why" gets real clear,
real fast. :-)
First, its not necessary to grow the Swap partition, you can simply swapon a 
second one should the need arise.

That presumes you [will] have a second disk available to add when you decide to upgrade your RAM down the road. As mentioned earlier, that is not a safe presumption.

IIRC there is even a decent performance 
gain when you distribute swap over more then one drive.

Yes, but that's all relative. It's still several orders of magnitude slower than real RAM.  Some folks argue for putting the swap partition on the outer edges of the disk, the inner, or near the data as well. Thanks, but I'll take my advice from the guys who wrote the implementation I'm using.

And then, since i don't have itunes the link you provided is useless to me and 
and googling only yields a set of pdf. Apperantly CS162 is a complete course 
on OS programming. 

Yes, delivered on mp3, for convenient listening while driving, riding, or other mindless tasks when you'd like to feed your brain. 

I lack the time to read all that, so could you please elaborate on why you 
think one needs atleast as much swap as RAM, because it really doesnt strike 
me as obvious. AFAIK the 2*RAM rule of thumb is from the dark ages of 
Megabyte-measured RAM.

I'd really be grateful for some pointers regarding the issue, its not that i 
dont wanna learn if i am incorrect, Its just that i cannot read all the pdf 
of a whole Course to find an answer.

Thanks in advance,
Helge

I don't think you'll find a a simple answer because its not a simple question. The short answer is, because the FreeBSD handbook says so:

As a rule of thumb, the swap partition should be about double the size of system memory (RAM).... The kernel's VM paging algorithms are tuned to perform best when the swap partition is at least two times the size of main memory. Configuring too little swap can lead to inefficiencies in the VM page scanning code and might create issues later if more memory is added.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-initial.html

Since I'm certain the short answer isn't going to satisfy you, I'll point out that the longer answer is much longer. Take the CS162 course for free, or go buy the book "The Design and Implementation of the 4.4 BSD Operating System" and pay special attention to chapter 5. 

Matt

Attachment: smime.p7s
Description: S/MIME cryptographic signature