<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Alec,<DIV><BR><DIV><DIV>On Aug 8, 2007, at 7:50 PM, Alec Flett wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Hey folks - <BR>So we're using stacklessocket with an app that is somewhat CPU intense, but also does I/O. We're trying to use stackless socket, but what we're actually finding is that overall performance is suffering because of the somewhat long wait time in the asynccore runner tasklet. ( 0.05) - if we block for more than 0.05 seconds, this ends up wasting about 5% of of our CPU.<BR></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Could you please supply exact reference to what implementation</DIV><DIV>you are using? I'm not exactly up to date.</DIV><BR><BLOCKQUOTE type="cite">We can certainly play with that number to find out what's optimal for our particular application, but I'm curious if anyone has thought about taking the same approach that stacklessfile does of having a pool of worker threads so that real hardware threads can go into a more effective blocking state? <BR></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>Is this superior to select/poll solutions, or kqueue?</DIV><DIV><BR><BLOCKQUOTE type="cite">And in that case, I wonder if some generalized socket/file replacement would be even more helpful.<BR><BR>I'm especially curious how well the stacklessfile approach has worked for people? Does it perform?<BR class="khtml-block-placeholder"></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>Having been inactive for quite a while, I'm wondering about asyncore.<BR>I remember that Sam Rushing, it's author, has said long time ago,<BR></DIV><DIV>that with Stackless he could have written it in half the size, and</DIV><DIV>very much reactive to computation bound applications.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>While I think the file issue is quite platform dependent.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>What I would like to initiate is trying to find a set of best possible</DIV><DIV>solutions, adjusting to what the OS supports.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I don't believe that it is necessary to loose measurable time.</DIV><DIV>The only problem I understand right now without using real</DIV><DIV>threads seems to be loosing packets with UDP if I remember.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>cheers - chris</DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Christian Tismer             :^)   &lt;<A href="mailto:tismer@stackless.com">mailto:tismer@stackless.com</A>&gt;</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">tismerysoft GmbH             :     Have a break! Take a ride on Python's</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Johannes-Niemeyer-Weg 9A     :    *Starship* <A href="http://starship.python.net">http://starship.python.net</A>/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">14109 Berlin                 :     PGP key -&gt; <A href="http://wwwkeys.pgp.net">http://wwwkeys.pgp.net</A>/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">      whom do you want to sponsor today?   <A href="http://www.stackless.com">http://www.stackless.com</A>/</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></BODY></HTML>