[MUD-Dev] Sockets
Adam Wiggins
adam at angel.com
Mon May 17 13:16:56 CEST 1999
On Fri, 14 May 1999, Caliban Tiresias Darklock wrote:
> On 03:24 AM 5/13/99 -0500, Cynbe ru Taren said:
> >We all learned to program when CPU bandwidth was much more expensive
> >than it is now: We're habituated to credit it with far more importance
> >than it now deserves.
>
> This is the realisation which migrated me to Windows in the mid-nineties. I
> didn't like Windows for the longest time, because it was wasting a lot of
> time and effort on drawing the screen when it could have been actually
> sorting and searching and servicing the 16 modems I had hooked up.
> Well, these days, my system uses most of its RAM and most of its CPU. Sure,
> it's mostly used to draw pretty pictures, but at least it's being used.
> Remember the virtual memory systems that used to swap things out of memory
> just because you didn't use it for a while, leaving lots of empty memory
> but taking two minutes to swap your graphics program back into RAM when you
> task switched back to it? What a waste!
It depends what you're going to do with it. I, as a developer, work on
projects with hundreds of thousands of lines of source code. It compiles
five to ten times faster when my compiler, debugger, and all the source are in
the RAM cache. It's possible to do this, but *only* if most of my RAM is
not wasted on superfluous stuff like pretty pictures. (Well, okay, I *do*
have a nice 1280x1024x24 background and transparent xterms, but that's a
minor indulgence :))
My brother, who is not at all a technie, but maintains a very simple homepage
for himself, often asks me - "Why am I still waiting on computers?" He wants
to know why, on his Pentium-class system with 32 megs of RAM, he has to wait
ten to twenty seconds for his paint program to load. He wants to know why,
when he loads a 3-megabyte paint program executable, and a 1-megabyte bitmap
image to manipulate, it constantly hits the disk when he scrolls around the
image, and especially if he minimizes the app for a few minutes. "I'm not
good at math," he says, "but isn't 3+1 less than 32?"
I don't want to wander off-topic here, but I would like to offer a word of
caution. I think it's largely this attitude that "we've got the resources,
so let's squander them" that causes this sort of bloated software. I for one
won't put up with software written that way. I *do* have uses for all
the CPU power I have, and then some, and the amount of resources I'm willing
to waste on fluff is a very small percentage of that.
Actually, I suppose I owe a bit of thanks to all those folks writing bloated
software: they force people to upgrade to faster computers, which drivers the
prices down. In the meantime I will continue to avoid bloated software
whenever possible (Netscape is my one exception to this rule, unfortunately)
and enjoy the benefits of dropping hardware prices. Sort of the same way we
all owe thanks to all the porn-fiends out there for creating an immediate need
for more internet bandwidth...
Anyhow, programming is the same as it always ways. You identify your
bottleneck and try to trim it down as small as possible. As has been pointed
out already, a typical MUD serving less than 1000 connections at a time is
probably not going to have CPU problems, and select() certainly is no
signifigant bottleneck. Memory and disk are probably your number one concerns
as your world database gets large.
Adam W.
_______________________________________________
MUD-Dev maillist - MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list