Re: Seda/NIO and the Idle Loop
Quartz <[email protected]> Mon, 8 Sep 2003 08:10:28 -0700 (PDT)
| Newsgroups | gmane.comp.java.seda.user |
|---|---|
| Message-ID | <[email protected]> |
It's polling... (!) Sorry to state the obvious, but you just found that tomcat has its own SelectorProvider, and that you are not using sun's original ServerSocketChannel selector. I'm not surprised that tomcat's selector implementation (behind org.apache.ajp.tomcat4.Ajp13Processor.run) is doing more backflips and consumes more cpu than you expected. Polling is a poor choice to circumvent blocking calls and to emulate events. Maybe you want to pool less frequently by increasing the aSocket stage timeout to much higher value. I see, in aSocketConst: /** Time in ms to sleep waiting for select */ public static final int SELECT_TIMEOUT = 1000; /** Time in ms to sleep waiting on event queue */ public static final int EVENT_QUEUE_TIMEOUT = 1000; used in aSocketThreadManager$aSocketThread.run() Maybe you want to externalize these to the SandStormConfig and try longer values. --- Tim Walker <[email protected]> wrote: > like 8%) a fair amount is in java.nio and sandstorm.core as shown below. What the heck is it > doing, when it's > doing nothing? My config file follows signature. Any thoughts, very much appreciated. All the > best! > > 21.7% - 284251 ms - 5 inv. org.apache.ajp.tomcat4.Ajp13Processor.run > 16.5% - 216083 ms - 202 inv. java.nio.channels.Selector.select > 16.5% - 216083 ms - 202 hot spot inv. > seda.sandStorm.lib.aSocket.nio.NIOSelectSource.doPoll > 16.5% - 216083 ms - 202 hot spot inv. > seda.sandStorm.lib.aSocket.nio.NIOSelectSource.blocking_dequeue > 16.5% - 216083 ms - 202 hot spot inv. > seda.sandStorm.lib.aSocket.aSocketThreadManager$aSocketThread.run __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf