[MUD-Dev] Disk v. Mem

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Tue May 13 23:16:42 New Zealand Standard Time 1997

[John A:]
:what are the advantages of swapping out objects
:to disk as opposed to keeping them in memory?
:let me stab in the dark:
:do you really need to save that much memory?
:do you need it for something else?
:are objects so large that 40,000 of them fill mem quickly?
:does too full a mem size inhibit the driver speed?
:isn't it more costly in speed to write to disk?
:what kind of savings do you get versus this extra cost?

Yes, you can use "too much memory". Sites which host MUDs often put limits
on how much virtual memory the MUD is allowed to consume. So, if you
need more than that for the whole database, you have to do some managing
of it.

Most UNIX boxes (anything with VM, really), will have more file-store
disk space than swap space. So, if you push the limits of memory too
much, you *can* run out, so doing your own managing can let you have
more stuff in your total DB.

OS paging uses various algorithms for which pages to swap out, and often
also which ones to pre-read in. Those algorithms are generic, designed
to work well with a "typical" mix of programs. If the MUD doesn't match
that mix, doing the disk I/O manually in the program can be more
efficient, since the MUD can have a better idea of what is likely to
be needed soon. Note that I say "can". :-/

In my case, my OS doesn't have VM, so if I run out of physical RAM, I
am stuck. So, I make the system try to have reasonable limits on how
much it will use.

I vaguely recall some posts in the newsgroups indicating that some big
MUDs (mostly LP's?) could easily use 20Meg or more of memory.

Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA

More information about the MUD-Dev mailing list