[MUD-Dev] Text Parsing
Matthew Mihaly
diablo at best.com
Wed Jun 9 20:13:58 CEST 1999
On Wed, 9 Jun 1999, Chris Gray wrote:
> [Matthew Mihaly:]
>
> > Can anyone tell me if this seems normal to you?
>
> 100 seems low to me. What kind of machine do you run on? What language
> is your server written in? Are you sure its not a communications problem,
> in that your link to the internet isn't fast enough?
Machine has k6 400 processor, w/128 megs RAM. The server is written in C,
I believe, but I didn't write the server (I may not have an exact
understanding of what constitutes the server, but what I mean by it is the
thing that handles the low-level connection stuff).
The game itself (from the main loop which polls connections to see if
anything is happening) is all written in the language (which I'm told is
C-like...I don't know C) that comes with the server.
I am positive it isn't the size of our pipe that is the problem. We have
individual tasks (delayed events) that slow down when we get overloaded.
>
> The main advice that has been given here in the past is to profile your
> code. If it's C or C++ code, compile it with -p or -pg flags, and run it
> for a while. Collect the results and see where all of your time is going.
> Let us know the results, and I'm sure lots of further advice will
> follow from there.
Yeah, I profiled it all. Mob ai is taking up about 20% of processor time,
and player movement is quite slow, taking up to .07 seconds when malloc is
low (our server has an irritating little memory leak, which we're working
to fix).
Currently, mob AI is broken up into three main tasks. One handles mobiles
that randomly wander about (quite a few of those. Butterflies to net and
the like). One handles mobiles that are involved in a fight. The final one
handles everything else (healing, gathering items, etc).
So really, at most, that accounts for, on the high end, say, 35% of
processor time. The other 65% seems to be reasonably well-distributed
among everything else.
--matt
_______________________________________________
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