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

Re: RAM & Swap(was:Hibernation)



>:> programs being paged to it which means copying data to/from the memory 
>:> area which 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. 

If you never use these, rip them out of your startup.  I only run two gettys
by default, run no lpd til I plug into a printer (which has happened so far,
exactly once, when the desktop was undergoing an upgrade, but someone else
in the house needed its passthru print services).  If you don't use it - don't
run it at all!

(Two gettys is enough to login on one, realize I'll need a few more, and use 
 the other one to run a bunch of openvt commands.  Since they aren't running
 from inittab they will not respawn when they're not needed anymore.  Maybe
 you could even get away with only one.)

(Actually I can almost flip a coin on the case of nearly gutted kernel plus
 lots of modules, versus a kernel with everything reasonable in it, so it
 doesn't have to hit disk to reach sometimes-needed kernel services.)

If it's your laptop (and even if not, you kinda have administrative control
while you've got it) create a login script that jumps to X when you get in.
If you really do need text mode, use the only other getty (or have it 
'startx &' so its getty is still free).  Stuff xdm and its cousins.

> They get swapped out and never get swapped back in again.  Every system 
> has such programs.

I'll look, but I'm not sure my system agrees with you :)  syslogd might be
kinda bored though.

>> 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.

Please let us encourage you, and brave souls with Neomagic to give your 
results a try, when you have them.
 
-* Heather Stern * Starshine Technical Services * star@starshine.org *-


Reply to: