<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ) --> <!--X-From-R13: XQ Znjerapr <pynjNhaqre.Sat.Eha.QA[> --> <!--X-Date: Sat, 10 Jan 1998 03:38:15 +0000 --> <!--X-Message-Id: 199801100338.TAA01149#under,Eng.Sun.COM --> <!--X-Content-Type: text/plain --> <!--X-Reference: Pine.PMDF.3.95.980108113739.543180857A-100000#nova,wright.edu --> <!--X-Head-End--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>MUD-Dev message, Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ)</title> <!-- meta name="robots" content="noindex,nofollow" --> <link rev="made" href="mailto:claw#under,Eng.Sun.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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00165.html">Previous</a> | <a href="msg00168.html">Next</a> ] Thread: [ <a href="msg00214.html">Previous</a> | <a href="msg00211.html">Next</a> ] Index: [ <A HREF="author.html#00167">Author</A> | <A HREF="#00167">Date</A> | <A HREF="thread.html#00167">Thread</A> ] <!--X-TopPNI-End--> <!--X-MsgBody--> <!--X-Subject-Header-Begin--> <H1>Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ)</H1> <HR> <!--X-Subject-Header-End--> <!--X-Head-of-Message--> <UL> <LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI> <LI><em>Subject</em>: Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ) </LI> <LI><em>From</em>: JC Lawrence <<A HREF="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</A>></LI> <LI><em>Date</em>: Fri, 09 Jan 1998 19:38:09 -0800</LI> <LI><em>Reply-to</em>: <A HREF="mailto:claw#null,net">claw#null,net</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 Thu, 8 Jan 1998 08:52:08 PST8PDT s001gmu <s001gmu#nova,wright.edu> wrote: > heck, I could prolly pretty easily add a command to allow admin to > add some threads to the pool on the fly, but I prefer to minimize > the cost of thread creation, localizing it to a boot-time expense. Notes: Thread creation is typically far cheaper than process creation. Threads can also be blocked. I vary the thread pool size dynamically. It grows under load, and shrinks in time of extended drought. The system is a little more complex than this as there is a minimum thread count for the Event Pool, and if traffic falls enough that some threads in the Event Pool are left work-less I block them instead of killing them. Thus, if traffic loads later increas and those threads would be useful again, I merely unblock them for them to get back in the fray. The expense? A little increased swap image and possibly a slightly increased scheduler load depending on your system's thread model. > For the lockless v. locked model, my main concern was/is how many > threads, executing at the same tick, are going to be handling events > targeting the same data? Its a tough and nasty call. The reason is that it is utterly load dependant, and that is affected by the stylistic approaches of your world coders, the activity characteristics of your players. etc etc etc etc. Suffice to say that I see the problem to a huge degree at times (suddenly the rate at which events fail C&C goes thru the roof), but its erratic, unpredictable, and often seems to be mollified by ensure than events are as short as possible, and affect as few objects as posssible. > What happens if it takes more than one tick to process all the > events in the secondary queue? This says either that there are not > enough threads to process all the events quickly enough, or that > there are too many events! :) I'm thinking I'll just put the events > in the same secondary queue, and have the threads do a bit of > prioritizing... only if there are no threads executing events for > the previous tick will they start processing the new tick's > events... dunno. I need to think about it some more. :) Depending on how hard a given attempted event execution is finding it to C&C successfully, and depending on what its effrot setting is (how hard it tries to succeed in the face of C&C failures (some events are flagged that they must execute)), I will gradually degrade the server down to single threaded just to allow a given event to compleat. Performance during that degredation suffers of course. > I haven't spent much time on gracefull shut-down of the queue, or > storing of the event list to rebuild a queue, but they are next on > the hit parade. I store all the relevent queses and lists are objects within the DB so they are saved (and available for rollbacks) just as anything else is. Happily event queue and list objects are *really* small for my disk space limits. -- J C Lawrence Internet: claw#null,net Internet: coder#ibm,net ----------(*) Internet: jc.lawrence#sun,com ...Honourary Member of Clan McFud -- Teamer's Avenging Monolith... </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="00211" HREF="msg00211.html">Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ)</A></strong> <ul compact><li><em>From:</em> Vadim Tkachenko <vadimt#4cs,com></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00117" HREF="msg00117.html">request for comments (was: Mud-Dev FAQ)</A></STRONG> <UL><LI><EM>From:</EM> s001gmu#nova,wright.edu</LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00165.html">Re: [MUD-Dev] Commercial value of RP</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00168.html">Re: [MUD-Dev] Commercial value of RP</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00214.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00211.html">Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ)</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00167"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00167"><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>Event handling (was: request for comments)</STRONG>, <EM>(continued)</EM> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <ul compact> <LI><strong><A NAME="00210" HREF="msg00210.html">Event handling (was: request for comments)</A></strong>, s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 12 Jan 1998, 15:13 GMT </LI> <LI><strong><A NAME="00220" HREF="msg00220.html">Event handling (was: request for comments)</A></strong>, s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 12 Jan 1998, 22:12 GMT </LI> </ul> </ul> </ul> </ul> <LI><strong><A NAME="00169" HREF="msg00169.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sat 10 Jan 1998, 03:53 GMT <UL> <LI><strong><A NAME="00214" HREF="msg00214.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Mon 12 Jan 1998, 17:54 GMT </LI> </UL> </LI> </ul> <LI><strong><A NAME="00167" HREF="msg00167.html">Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ)</A></strong>, JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sat 10 Jan 1998, 03:38 GMT <UL> <LI><strong><A NAME="00211" HREF="msg00211.html">Re: [MUD-Dev] request for comments (was: Mud-Dev FAQ)</A></strong>, Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Mon 12 Jan 1998, 16:30 GMT </LI> </UL> </LI> </ul> </ul> <LI><strong><A NAME="00077" HREF="msg00077.html">Re: [MUD-Dev] Mud-Dev FAQ</A></strong>, JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Wed 07 Jan 1998, 00:39 GMT </LI> </ul> <LI><strong><A NAME="00022" HREF="msg00022.html">Re: [MUD-Dev] Mud-Dev FAQ</A></strong>, Adam Wiggins <a href="mailto:nightfall#user2,inficad.com">nightfall#user2,inficad.com</a>, Sun 04 Jan 1998, 19:43 GMT </LI> </ul> </LI> <LI><strong><A NAME="00011" HREF="msg00011.html">Re: [MUD-Dev] The impact of the web on muds</A></strong>, Mike Sellers <a href="mailto:mike#online-alchemy,com">mike#online-alchemy,com</a>, Fri 02 Jan 1998, 21:21 GMT </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>