[MUD-Dev] Re: Disk v. Mem

Jeff Kesselman jeffk at tenetwork.com
Tue May 13 20:50:56 New Zealand Standard Time 1997

At 08:01 PM 5/13/97 PST8PDT, you wrote:
>ashen at pixi.com:
>| erh, at the risk of getting bounced out of
>| here for asking a fourth-grade question... ;)
>| what are the advantages of swapping out objects
>| to disk as opposed to keeping them in memory?
>Excellent question -- and the follow-on excellent question
>is "Ok, so why not just let the host virtual memory hardware
>do it for you?" :)

Answer: because the hsot isnt optimized for your situation. It doesnt knwo
about how you organize your obejcts and thus cannot do any optimization
beyond LRU.  Also the swap size of the system is generally a fixed block
size which does not map exactly into your objects.  lastly, a real Db has
far more sophisticated indexing and retrieval capabilities.
>| do you really need to save that much memory?
>| do you need it for something else?
>At today's ram prices, depending on your budget, you may well not need

Depends on how alrge a world you beleive you will need to support... memory
== speed. the mreo memory you have available for legitimate uses the mroe
work yo uwill be able to laod onto your processor and the more user you can

ALSO a totally different issue is MUD stability in the case of a crash. A
Disk absed system with write-through cashing is very recoiverable from
srashes, a memory based system isnt.

>| isn't it more costly in speed to write to disk?
>Absolutely -- a factor of a million or so.  (Milliseconds

Which is why you use write-through caching for output, and cache obejcst in
memory for input.

These are all really fundemental OS issues disguised and specialized. A
edecent intro to machine organization wil lanswer alot of your questions
betetr thenwe can ehre (I personally like Tannenbaum's book alot...)

More information about the MUD-Dev mailing list