On Jul 10, 2007, at 3:31 AM, Trustin Lee wrote:
I found writing messages very fast from many threads sometimes doesn't scale because the internal implementation of Seletor.wakeup() acquires an exclusive lock. We could minimize the wakeup() calls in SocketIoProcessor.flush(), but I don't have any good idea to do so.I thought about improving SocketIoProcessor.flush() like the following,void flush(SocketSessionImpl session) { boolean needsWakeup = flushingSessions.isEmpty(); scheduleFlush(session); if (needsWakeup) { Selector selector = this.selector; if (selector != null) { selector.wakeup(); } } }but I doubt it might not wake the selector up when it needs to be waken up.
Seems reasonable at first glance.. make the change and re-run your tests?
-pete -- [EMAIL PROTECTED] - http://fotap.org/~osi
smime.p7s
Description: S/MIME cryptographic signature
