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

Re: Swap partition and fdisk



In reply to Lars Wirzenius's message:
> A R Abid:
> > I have got 16MB of RAM on my machine. Could someone tell me if it would
> > still be necessary for me to create a Linux swap partition. 
> 
> The terse form of the formula is:
> 
> 	swap needed = total memory need - physical memory size
> 	
> (Forget everything about "twice physical size". That is an evil
> prank that people play on the uneducated rich who have bouth
> 512 MB of RAM.)

Thank you for finally getting that right!  Actually the 'twice
physical memory' formula is about right for some Unix systems, HP-UX
in particular.  HP-UX pre-allocates swap space for physical memory,
and then pre-allocates swap space for every job when it starts or
malloc memory.  Your formula is definitely the right one for Linux,
though.

> First you need to estimate your total memory need. This depends
> very heavily on what you do and what programs you run at the
> same time. I need about 30-40 MB to run a mailer, Mosaic,
> xpat2, up to a dozen or so xterms and editors, a HTTP server,
> a news server, a mail server, compilers, makes, the X server,
> window manager, a clock, xload, desktop pager, window list,
> and a few other niceties.

Gcc also needs several megabytes for compiling, and I recently
discovered the Java compiler needs 8-10 megabytes to compile a
program.  On the other hand, if you are only using virtual consoles
with simple programs, then 8 MB total *might* be enough.  If the
original person is going to be running X11, then he probably wants
to add at least 8-16 MB of swap.

> For a somewhat more detailed explanation, read the memory
> management chapter in the System Administrators' Guide. The
> current version is 0.3, but 0.4 is imminent (I need to see
> how it looks on paper, but if there aren't any big problems 
> with the that, I will release it in a couple of days).

Thanks,  glad to hear that.




Reply to: