Re: relatively simple hack to lookup login-names (fwd)

From: Katzlberger Thomas (cat@vuse.vanderbilt.edu)
Date: 12/18/95


You wrote:
> > > I can't wait, no more lag from gethostbyaddr *bounce*.
> >
> > Profile those fork() calls though, its one of the slowest system
> > calls! If your platform supports vfork() use that, but plain old
> > fork() is a major performance hit.
> >
> Fork is EVIL. Our head coder has threatened to kill anyone who uses
> it :P.

Very understandable !

man page:
The new process (child process) is an EXACT COPY of the calling  
process ... (including a copy of all memory)

If your MUD uses 10MB RAM or Virtual Memory you will end up running
2 MUD's on your machine after a fork and use up to 20MB.
This is a major problem of WWW servers although those beasts
are just 400KB big!

> My understanding is what we will have, is that upon starting the
> mud server will spawn a seperate process (just one). This 2nd
> process, will be a daemon which will pass characters on to the main
> process after all the login BS. A lot of the discussion I've seen
> on here is sentered around starting a process for every new
> connection. We'll only have 2 processes and never more for the mud.

Starting new processes is ok if you use threads, but might give you
horrible synchronisation problems the way circle is written.

Cat.



This archive was generated by hypermail 2b30 : 12/07/00 PST