2000Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] IO Speed Suggestions -->
<!--X-From-R13: X Q Znjerapr <pynjNxnatn.ah> -->
<!--X-Date: Tue, 08 Feb 2000 14:13:19 &#45;0800 -->
<!--X-Message-Id: 18779.950047993#kanga,nu -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 38A04A0E.3E927211#mail,uccs.edu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] IO Speed Suggestions</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:claw#kanga,nu">
</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="msg00283.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00286.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00282.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00274.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00284">Author</A>
&nbsp;|&nbsp;<A HREF="#00284">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00284">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] IO Speed Suggestions</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>: Re: [MUD-Dev] IO Speed Suggestions </LI>
<LI><em>From</em>: J C Lawrence &lt;<A HREF="mailto:claw#kanga,nu">claw#kanga,nu</A>&gt;</LI>
<LI><em>Date</em>: Tue, 08 Feb 2000 14:13:13 -0800</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#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>
On Tue, 08 Feb 2000 11:53:34 -0500 
Christopher Kohnert &lt;cjkohner#brain,uccs.edu&gt; wrote:

&gt; I'm looking for any suggestions on how to speed up IO for the
&gt; socket backend of the engine I'm working with.  I'm forced into a
&gt; polling situation and would like to see if anyone has any ideas
&gt; for speeding up the task.  

There are some heavy OS dependencies in there.  Check to see if your
host OS implements Asynch IO, Event Queues, or some similar
construct.  You can remove the thundering herd problem with such
tools.  .

&gt; Namely I've considered things like queing up all outgoing data and
&gt; sending it all at once to sockets that are ready for writing, but
&gt; is this advantageous at all over just sending data right away if
&gt; the socket is already ready for writing... things like that? 

There are several considerations that can come into play:

  -- You don't want to send a new packet for every byte sent, so
some queueing and spooling is advantageous.  

  -- You don't want to spend more time managing your IO spools and
queues than you save in packet and protocol overhead.

  -- The bigger your packets, the more infrequent they are, and the
cheaper your data streams are for you in terms of volume.

  -- Your players want and may need (system design) timely reponses.
This suggests small frequent packets.

  -- You need a system whose complexity is easily understandable and
maintainable.

Exactly where you want to put the graining for how you handle IO, or
even if you implement multiple IO strategies with different patterns
applied to wach, is dependent on your loads and what you want to do.
You're probably going to want some level of spooling on the host,
even if its only line based (which can be quite a gain FWLIW).

I cheat in this regard as my IO is already bundled and spooled
automatically by the process model (its released only upon sucessful
C&amp;C), so I get nice IO chunks pre-canned for me in player-sensitive
sized units.  I also finally gave up on a telnet interface and run
several parallel connection streams (most TCP, a few UDP), for
different classifications of data (character-local data, world data,
state data, inter-player data, etc) in an attempt to alleviate some
of the packet retransmit waits when using a single pipe.  eg:

  You lose a packet on say a channel, and local game data receipt
  rates are not affected.  

This spreads the lag due to packet drops over multiple data streams,
making the incidence of it occuring on a critical stream that much
lower.  I did this when after counting a 25 second lag while playing
a game in the UK (from California) waiting for a single missing TCP
packet which contained nothing more significant than the exclam at
the end of the a room's name string.

There are a couple documents in the Library that may interest:

  <A  HREF="http://www.kanga.nu/library.php3?viewCat=10">http://www.kanga.nu/library.php3?viewCat=10</A>
  <A  HREF="http://www.kanga.nu/library.php3?redirect=168">http://www.kanga.nu/library.php3?redirect=168</A>
  <A  HREF="http://www.kanga.nu/library.php3?redirect=169">http://www.kanga.nu/library.php3?redirect=169</A>

-- 
J C Lawrence                                 Home: claw#kanga,nu
----------(*)                              Other: coder#kanga,nu
--=| A man is as sane as he is dangerous to his environment |=--


_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00282" HREF="msg00282.html">[MUD-Dev] IO Speed Suggestions</A></STRONG>
<UL><LI><EM>From:</EM> Christopher Kohnert &lt;cjkohner#brain,uccs.edu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00283.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00286.html">Re: [MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00282.html">[MUD-Dev] IO Speed Suggestions</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00274.html">[MUD-Dev] Event Scheduling</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00284"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00284"><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="00292" HREF="msg00292.html">[MUD-Dev] OT: Soliciting advice from Canadians</A></strong>, 
Alex Oren <a href="mailto:alexo#bigfoot,com">alexo#bigfoot,com</a>, Thu 10 Feb 2000, 06:57 GMT
<LI><strong><A NAME="00288" HREF="msg00288.html">[MUD-Dev] Couple of articles</A></strong>, 
Koster, Raph <a href="mailto:rkoster#origin,ea.com">rkoster#origin,ea.com</a>, Wed 09 Feb 2000, 17:44 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00291" HREF="msg00291.html">RE: [MUD-Dev] Couple of articles</A></strong>, 
Dr Richard A. Bartle <a href="mailto:richard#mud,co.uk">richard#mud,co.uk</a>, Wed 09 Feb 2000, 19:20 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00282" HREF="msg00282.html">[MUD-Dev] IO Speed Suggestions</A></strong>, 
Christopher Kohnert <a href="mailto:cjkohner#brain,uccs.edu">cjkohner#brain,uccs.edu</a>, Tue 08 Feb 2000, 19:07 GMT
<UL>
<LI><strong><A NAME="00284" HREF="msg00284.html">Re: [MUD-Dev] IO Speed Suggestions</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 08 Feb 2000, 22:13 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00274" HREF="msg00274.html">[MUD-Dev] Event Scheduling</A></strong>, 
Phillip Lenhardt <a href="mailto:philen#funky,monkey.org">philen#funky,monkey.org</a>, Mon 07 Feb 2000, 18:43 GMT
<UL>
<LI><strong><A NAME="00275" HREF="msg00275.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
Miroslav Silovic <a href="mailto:silovic#zesoi,fer.hr">silovic#zesoi,fer.hr</a>, Tue 08 Feb 2000, 15:08 GMT
<UL>
<LI><strong><A NAME="00277" HREF="msg00277.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Tue 08 Feb 2000, 18:19 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00276" HREF="msg00276.html">Re: [MUD-Dev] Event Scheduling</A></strong>, 
Hans-Henrik Staerfeldt <a href="mailto:hhs#cbs,dtu.dk">hhs#cbs,dtu.dk</a>, Tue 08 Feb 2000, 15:08 GMT
</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>