Swap Space - hijack?

Gary Gatten Ggatten at waddell.com
Wed Jan 5 23:46:53 UTC 2011


> Correct me if I'm wrong, but if necessary one could add (and
> activate) a secondary / additional swap file if necessary without
> rebooting.  So maybe start with a few gig and add an additional swap
> file if necessary?

Swapping to a file is really slow and should only be done if absolutely
necessary since every read/write has to go through the filesystem code
which it doesn't do if done via a swap slice.
Good point.  It's been several years and back on v5 or 6 when I did something like this.  If there's unpartitioned space on the drive, can one add a secondary swap partition real-time?  I forget what I did here - I'm sure I followed what's in the handbook re swap space.  Probably did a swap file...

 Yes you can do that with swapon(1)

It's been said though that FreeBSD memory paging algorithms take into account the system's entire available VM for deciding on when to act in low memory conditions and these parameters are tuned expect some of that to be swap space.  That is why one reason there *should* be a least some swap space even on a system w/ plenty of RAM.

Sorry for the probable hijack... Speaking of swapping algorithms, is there a way to force a parent and all child processes to NOT be swapped - period - and always remain 100% in "real" memory?  And if so, is it discouraged or completely up to the sysadmin?







<font size="1">
<div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 1.0pt 0in'>
</div>
"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."
</font>



More information about the freebsd-questions mailing list