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

Re: RAM & Swap(was:Hibernation)

On Fri, 19 Nov 1999, Wichmann, Viggo wrote:
>Russell wrote:
>	So you create a 1M partition for swap then.  Using RAM as swap will
>not gain
>	you anything.  At best it won't be used and will just be a waste of
>	that could otherwise be used for disk cache.  At worst you will have
>	being paged to it which means copying data to/from the memory area
>	wastes CPU time.
>	With 64bit memory it will take 512 reads and 512 writes to copy a 4K
>page of
>	memory.  If the memory is 10ns then it'll be 10*1024 == 10240ns to
>copy the
>	page.  That's 4096 clock cycles on a modern CPU.
>I think you're missing a calculation here: how long time will it take to
>copy, say 4k, from memory to disk?

We are not talking about comparing a disk copy to a memory copy.  We are
talking about the comparison of memory copy to no copy!  If you use RAM as
RAM-disk then you have less available system memory and page more.  Using
that RAM-disk for paging makes no sense, better to just have the extra memory
and not page.
There are (were?) bugs related to having no swap space at all.  The solution
is to use a small swap space.  There are always processes that aren't used.
On this system I have programs which are normally never used such as lpd,
gettys on text consoles (usually use X), kdm (stay logged in for days at a
time), vmnet-bridge (haven't even got Vmware setup at the moment), etc.  They
get swapped out and never get swapped back in again.  Every system has such

>Sounds like a really good idea to try to utilize whatever co-proc you may
>have on your graphics-card. Please let us know how the progress is.

It'll take lots of time.  Don't expect anything before January.

>Btw, you must have a quite exotic use of your laptop to want raid?!
>Most people seem to use their laptop for working on-the-move and have a
>desktop for heavy storage/processing at home. But maybe the line between
>laptops and desktops are fading away...

My laptop is my main machine.  I do everything on it.  One thing I like to do
is make million dollar Sun and IBM machines look slow by comparison.  That's
not as difficult as it should be, but it would be easier if I had RAID-10.

Electronic information tampers with your soul.

Reply to: