1999Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: processors -->
<!--X-From-R13: <qvnoybNorfg.pbz> -->
<!--X-Date: Sat, 30 Jan 1999 19:00:21 &#45;0800 -->
<!--X-Message-Id: Pine.BSF.4.05.9901301831390.16840&#45;100000#shell9,ba.best.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: E106mSU&#45;00051H&#45;00#koala,kanga.nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: processors</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:diablo#best,com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00330.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00332.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00329.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00336.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00331">Author</A>
&nbsp;|&nbsp;<A HREF="#00331">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00331">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: processors</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: [MUD-Dev] Re: processors </LI>
<LI><em>From</em>: &lt;<A HREF="mailto:diablo#best,com">diablo#best,com</A>&gt;</LI>
<LI><em>Date</em>: Sat, 30 Jan 1999 19:00:11 -0800 (PST)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
J C Lawrence wrote:
&gt; diablo &lt;diablo#best,com&gt; wrote:
&gt; 
&gt; 
&gt; You are barking up the wrong tree in the wrong forest, but are on the
&gt; right continent.  Sorry to be so blunt, but I used to do this sort of
&gt; stuff for a living.

Not a problem.

 
&gt;   I've seen too many performance have faster systems thrown at them,
&gt; resulting in ___zero___ performance increase because the real
&gt; performance bottleneck was in disk IO or some such, and that aspect
&gt; didn't change at all in the new system despite the fact that the new
&gt; CPU was 20 times faster.  A really bad example of this BTW was where
&gt; the real problem was the striping size used on the RAID arrays.  Once
&gt; we bumped the stripe size up to around 8Meg, performance went thru the
&gt; roof.

It's definitely not disk access. We barely access the disk at all. Nearly
everything is held in memory. 

&lt;many undoubtedly erudite questions snipped&gt; 

I snipped those questions above because I wouldn't know how to answer
them.

I am guessing the problem is processor-related becuase I was able to solve
most of the problem by reducing the number of calls per second our main
mobile ai routine gets. This fixed the problem we were having, which was
that our tasks (timed events) were taking WAY too long to go off. A 3
second task would take 20 seconds, but this only happened with a heavy
player load. Our tasks are held in a table indexed to some number (some
sort of ticker in linux? I don't know the proper names for anything). That
table is polled every time the game searches for player input (it cycles
through all our player lines constantly), and if a task is found to be
either overdue or ready to go off, it goes off. The problem comes when
those tasks start taking too long. This of course causes a cascading
effect as more and more tasks build up.

Generally, the way the author of our language/engine explained it to us is
that the engine and language are not Object Oriented in order to be
faster, and in order to allow for more proactivity (as opposed to
reactivity). We will try reduce the drain that things like mobile ai put
on the processor, but it's a pretty heavy task, complete with string
manipulation and interpreting a mini-programming language we have inside
the game.

Could someone like yourself, or someone similarly erudite about such
matters speed things up by recoding? Probably, but there's a lot of code,
and probably a _lot_ that needs doing. We'll certainly try to do it, but
we will also be buying the fastest processor we can afford. I know it goes
against the programmers ethic to dismiss a problem by saying "buy more
memory" or "buy a new processor" but I've committed worse sins I suppose
(though my new coder starts foaming at the mouth everytime I
suggest it. I'm a little frightened that upgrading instead of optimizing 
will kill him.)

&gt; Unfortunately this whole area is a bit of an art.  Very very tiny
&gt; changes made to systems can have massive performance returns (or
&gt; penalties).

In that case, consider me the Thomas Kincaide of programming.

 
&gt; I'm going to generically bet that your system is suffering from almost
&gt; all of the following as they are what I usually see:
&gt; 
&gt;   1) IO bandwidth (likely disk, unlikely RAM, possibly network, very
&gt; possibly IPC).  NB Excessive heap fragmentation can massively
&gt; exacerbate this problem.  'sar' and all the other system analysis and
&gt; report tools, especially the live-system ones are your friends.

Like I said above, it really doesn't seem like it, given that slowing down
mobile ai (which doesn't access the disk at all) speeded things up quite a
bit. 

&gt; 
&gt;   2) Busywork -- just bad algorithm implemenation with pathological
&gt; performance characteristics.  Yeah, it happens, even when we try not
&gt; to.  Profilers are your friends.

Oh yeah, this is definitely part of the problem. I still find big lists of
if-then instead of if-then-else statements in my old code. Do profilers
have to be written for specific languages? My code is written in a
language written and maintained by a friend of mine. Not marketed.

 
&lt;Had to snip more things so that I didn't embarass myself admitting I
didn't know what they mean&gt;

Thanks for your help, JC.
We shall try to optimize, but I'll still install a new processor behind my
coder's back. 
--matt



</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00342" HREF="msg00342.html">[MUD-Dev] Re: processors</A></strong>
<ul compact><li><em>From:</em> Petri Virkkula &lt;pvirkkul#iki,fi&gt;</li></ul>
<li><strong><A NAME="00340" HREF="msg00340.html">[MUD-Dev] Re: processors</A></strong>
<ul compact><li><em>From:</em> J C Lawrence &lt;claw#kanga,nu&gt;</li></ul>
<li><strong><A NAME="00336" HREF="msg00336.html">[MUD-Dev] Re: processors</A></strong>
<ul compact><li><em>From:</em> Mik Clarke &lt;mikclrk#ibm,net&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00329" HREF="msg00329.html">[MUD-Dev] Re: processors</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#kanga,nu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00330.html">[MUD-Dev] Re: combat</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00332.html">[MUD-Dev] Re: Mud reviewing</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00329.html">[MUD-Dev] Re: processors</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00336.html">[MUD-Dev] Re: processors</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00331"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00331"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><strong><A NAME="00317" HREF="msg00317.html">[MUD-Dev] processors</A></strong>, 
diablo <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 28 Jan 1999, 16:58 GMT
<UL>
<LI><strong><A NAME="00319" HREF="msg00319.html">[MUD-Dev] Re: processors</A></strong>, 
Laurel Fan <a href="mailto:lf25+@andrew.cmu.edu">lf25+@andrew.cmu.edu</a>, Thu 28 Jan 1999, 20:35 GMT
<UL>
<LI><strong><A NAME="00323" HREF="msg00323.html">[MUD-Dev] Re: processors</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Sat 30 Jan 1999, 12:26 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00329" HREF="msg00329.html">[MUD-Dev] Re: processors</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Sun 31 Jan 1999, 02:18 GMT
<UL>
<LI><strong><A NAME="00331" HREF="msg00331.html">[MUD-Dev] Re: processors</A></strong>, 
diablo <a href="mailto:diablo#best,com">diablo#best,com</a>, Sun 31 Jan 1999, 03:00 GMT
<UL>
<LI><strong><A NAME="00336" HREF="msg00336.html">[MUD-Dev] Re: processors</A></strong>, 
Mik Clarke <a href="mailto:mikclrk#ibm,net">mikclrk#ibm,net</a>, Sun 31 Jan 1999, 18:50 GMT
</LI>
<LI><strong><A NAME="00340" HREF="msg00340.html">[MUD-Dev] Re: processors</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Mon 01 Feb 1999, 06:22 GMT
<UL>
<LI><strong><A NAME="00341" HREF="msg00341.html">[MUD-Dev] Re: processors</A></strong>, 
Marc Hernandez <a href="mailto:marc#ias,jb.com">marc#ias,jb.com</a>, Mon 01 Feb 1999, 07:08 GMT
</LI>
<LI><strong><A NAME="00344" HREF="msg00344.html">[MUD-Dev] Re: processors</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Mon 01 Feb 1999, 18:53 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>