1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: lurker emerges -->
<!--X-From-R13: Quevf Uenl <ptNnzv&#45;pt.UenlEntr.Sqzbagba.OP.QO> -->
<!--X-Date: Sun, 9 Aug 1998 19:18:58 &#45;0700 -->
<!--X-Message-Id: 199808100115.TAA02833@ami&#45;cg.GraySage.Edmonton.AB.CA -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: lurker emerges</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">
</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="msg00601.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00603.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00603.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00612.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00602">Author</A>
&nbsp;|&nbsp;<A HREF="#00602">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00602">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: lurker emerges</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: lurker emerges</LI>
<LI><em>From</em>: Chris Gray &lt;<A HREF="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</A>&gt;</LI>
<LI><em>Date</em>: Sun, 9 Aug 1998 19:15:50 -0600</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>
[James Wilson:]

 &gt;I for one have only a vague idea of what this technique consists of.
 &gt;Could you maybe give some details, or a url describing it? Why would
 &gt;one need non-blocking i/o if select() tells you which sockets are
 &gt;ready for reads and writes? That is, assuming you bound the size of
 &gt;your output chunks appropriately, if the socket's ready for i/o shouldn't
 &gt;blocking be moot?

The system only has a limited number of buffers that it will use for
messages it has accepted, but cannot yet deliver. So, it is possible
for a socket to be marked as available for output, but the system still
doesn't have enough buffers to accept the entire message you are
trying to write to it. This could be because you have a very large
message, or perhaps because some other process grabbed all the socket
buffers first. More likely, it could be because a bunch of packets
arriving over your network connection has filled them up. So, making
all sockets non-blocking means that you will never block on a send
or receive, and so will maximize your throughput. The system may have
some resource allocation strategies such that it won't allocate too
many buffers to one IP address or something.

 &gt;I am curious as to how one could speed up this process - can you
 &gt;avoid doing a search through the set of all active sockets to find
 &gt;those that are ready for i/o? Could you split up the fd_sets somehow
 &gt;to bound the number that would have to be checked? It seems like
 &gt;when one gets to thousands of simultaneous connections this 
 &gt;could become a bottleneck.

This should be in the archives, from about 2 weeks back. One point
was that if you have a native implementation of the 'poll' interface,
then you can use multiple threads, each with a subset of the sockets,
and thus cut down on the order-of-magnitude of the fd scans that both
you and the system have to do.

Another approach is possible if you have a custom protocol (i.e. not
just telnet). You can use UDP sockets instead of TCP sockets (which
requires you to handle the non-reliability), and then just have one
socket, and use 'sendto' and 'recvfrom' over it.

-- 
Chris Gray     cg#ami-cg,GraySage.Edmonton.AB.CA


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00601.html">[MUD-Dev] Re: ADMIN: Advertising on MUD-Dev</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00603.html">[MUD-Dev] Re: lurker emerges</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00603.html">[MUD-Dev] Re: lurker emerges</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00612.html">[MUD-Dev] Re: lurker emerges</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00602"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00602"><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>[MUD-Dev] Re: lurker emerges</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00654" HREF="msg00654.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Tue 11 Aug 1998, 06:48 GMT
</LI>
</ul>
</ul>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00615" HREF="msg00615.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Petri Virkkula <a href="mailto:pvirkkul#iki,fi">pvirkkul#iki,fi</a>, Mon 10 Aug 1998, 05:57 GMT
</LI>
</ul>
</ul>
<LI><strong><A NAME="00600" HREF="msg00600.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
James Wilson <a href="mailto:jwilson#rochester,rr.com">jwilson#rochester,rr.com</a>, Sun 09 Aug 1998, 23:54 GMT
<UL>
<LI><strong><A NAME="00603" HREF="msg00603.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
T. Alexander Popiel <a href="mailto:popiel#snugharbor,com">popiel#snugharbor,com</a>, Mon 10 Aug 1998, 02:19 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00602" HREF="msg00602.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 10 Aug 1998, 02:18 GMT
</LI>
<LI><strong><A NAME="00612" HREF="msg00612.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 10 Aug 1998, 05:28 GMT
<UL>
<LI><strong><A NAME="00614" HREF="msg00614.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Vadim Tkachenko <a href="mailto:vt#freehold,crocodile.org">vt#freehold,crocodile.org</a>, Mon 10 Aug 1998, 05:57 GMT
</LI>
<LI><strong><A NAME="01055" HREF="msg01055.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Thu 17 Sep 1998, 00:57 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="01058" HREF="msg01058.html">[MUD-Dev] Re: lurker emerges</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 17 Sep 1998, 02:19 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>