Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 99753 invoked from network); 21 Apr 2007 16:18:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Apr 2007 16:18:32 -0000 Received: (qmail 24143 invoked by uid 500); 21 Apr 2007 16:18:37 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 24130 invoked by uid 500); 21 Apr 2007 16:18:37 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 24121 invoked by uid 99); 21 Apr 2007 16:18:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2007 09:18:37 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [207.97.245.161] (HELO smtp161.iad.emailsrvr.com) (207.97.245.161) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Apr 2007 09:18:29 -0700 Received: from UberQuad (CPE-69-76-227-228.kc.res.rr.com [69.76.227.228]) (Authenticated sender: mike@electrotank.com) by relay6.relay.iad.emailsrvr.com (SMTP Server) with ESMTP id 3EF12662954 for ; Sat, 21 Apr 2007 12:18:08 -0400 (EDT) Message-ID: From: "Michael Grundvig" To: References: <4627795D.9070107@webcogs.com> <9166C436-C4AB-4147-B372-720EEE9E5057@apache.org> <46279329.4090902@webcogs.com> <9f066ee90704190917w4a5102b6w34185fc3589f19df@mail.gmail.com> <46279C27.7080103@webcogs.com> <45a054f50704190949y1368d67bx5ee3079ac38ecfee@mail.gmail.com> <4627A61C.8010803@webcogs.com> <768dcb2e0704191708l679691dbt79ce2cfd17d18937@mail.gmail.com> <768dcb2e0704191715k1b84b2c5g4f6d14eac47af853@mail.gmail.com> <462A1879.708@webcogs.com> In-Reply-To: Subject: Re: 1000+ simultaneous connections with data transfer? Date: Sat, 21 Apr 2007 11:16:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6000.16386 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16386 X-Virus-Checked: Checked by ClamAV on apache.org I'm using Trove for a large project currently. It's faster at times and slower at others with the newest JDK. Overall though, if you can get away with a primitive as the key, it works quite well. The licensing is a problem though as it's GPL. Mike ----- Original Message ----- From: "Ming Fang" To: Sent: Saturday, April 21, 2007 11:09 AM Subject: Re: 1000+ simultaneous connections with data transfer? > Has anyone try using the Trove HashMap implementation(http:// > trove4j.sourceforge.net/)? > For some tests it is many times faster than the JDK one. > > On Apr 21, 2007, at 9:58 AM, Richard Lowe wrote: > >> I found that HashMap lookups with this amount of packets can be >> particularly expensive, as can creating byte arrays (even tiny ones). I >> find that Mina session attributes are very useful. I know all of that >> sounds obvious, but you'd be surprised how simple little operations can >> stack up. >> >> If you have to write a byte array to the IoHandler adapter, use >> ByteBuffer.wrap(b) - this seems pretty fast. >> >> I hope that might be useful for anybody else trying to do anything >> similar! >> >> Cheers, >> Richard. >> -- >> >> Trustin Lee wrote: >>> Additionally, did you try to turn on 'tcp no delay' option? (this >>> doesn't affect CPU utilization but might improve throughput) >>> >>> ((SocketSessionConfig) cfg.getSessionConfig()).setTcpNoDelay(true); >>> >>> and... It would be nice to see your IoHandler implementation code. >>> >>> HTH, >>> Trustin >> >