On Monday 08 July 2002 09:30 pm, Chuck Robey wrote:
| Nowadays, what with the price of fast memory at such low levels, I'm
| buying more memory than I really need, just because it's *so* cheap, the
| price has gone up before, and it's possible (maybe likely) that next
| year's popular new app will need the memory.  I'm probably not alone in
| doing this.  It's causing me to wonder about how much swap to allocate.
|
| I used to follow the rule that I dedicate twice as much disk memory to
| swap as I have RAM.  Now, with my new system, I'm getting a gig of RAM,
| but it seems ridiculous to dedicate 2G of disk to swap.  Under these
| conditions, what's the real bottom limit (if you have one gig of RAM) for
| how much swap you can get away with?  One Gig?  Less?

The bottom limit is zero.

I ran with zero swap for a while; the only problem is that if an app goes 
nuts and starts allocating unlimited memory it gets *all* the memory before 
you can possibly intervene, so now I allocate some swap space just so that I 
can see problems in xosview before they happen.  If any swap is ever 
allocated, then I know something's wrong and I have time to intervene before 
the system is completely locked up.

I allocate 256M of swap.  In fact, I think that a pretty good formula for a 
workstation is probably

    swap = MIN(2*RAM, 256M)

unless you have really massive applications for multiple users or something.

The only big drawback that I know of with this scheme is that if your system 
panics you can't get a kmem dump because there's not enough space to hold it.


|
| ---------------------------------------------------------------------------
|- Chuck Robey         | Interests include C & Java programming, FreeBSD,
| [EMAIL PROTECTED]   | electronics, communications, and signal processing.
|
| New Year's Resolution:  I will not sphroxify gullible people into looking
| up fictitious words in the dictionary.
| ---------------------------------------------------------------------------
|-
|
|
| To Unsubscribe: send mail to [EMAIL PROTECTED]
| with "unsubscribe freebsd-hackers" in the body of the message

-- 
Brian, the man from Babble-On . . . .   [EMAIL PROTECTED] (personal)
                                        http://www.babbleon.org

http://www.eff.org                      http://www.programming-freedom.org 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to