mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawie Malan" <dawie.ma...@mxit.com>
Subject RE: Interesting blog entry about synchronized vs ReentrantLock
Date Wed, 16 May 2007 09:20:18 GMT
*******************************************************************
Click here to view our e-mail legal notice: 
http://www.mxit.co.za/pdfs/mxit_legal.pdf or call: +27 21 888 7000
*******************************************************************
KJ,

We're using CenTOS (2.6.9-34.ELsmp 64-bit) running on Dell 1955 blade servers.
They have dual Intel Xeon 5148 CPUs and 4G RAM. The VM is Sun's jdk1.5.0_11 with
epolling on
(-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider),
this is very important when running on Linux.

Dawie

-----Original Message-----
From: Tan Ka Ju [mailto:kjtan@comintel.com.my] 
Sent: Wednesday, May 16, 2007 10:27 AM
To: dev@mina.apache.org
Subject: RE: Interesting blog entry about synchronized vs ReentrantLock

Hi Dawie,

May I know what is the platform and machine specification that your
mina 1.1 is
sitting on?

Thanks.
Rgds,
KJ.

>>> "Dawie Malan" <dawie.malan@mxit.com> 16/05/2007 15:57 >>>
*******************************************************************
Click here to view our e-mail legal notice:
http://www.mxit.co.za/pdfs/mxit_legal.pdf or call: +27 21 888 7000
*******************************************************************

We've replaced all 'synchronized' keywords with ReentrantLock in our
proxy
server code after extensive profiling, and it did have a performance
benefit
(for our application's conditions anyway).

While the synchronized keyword was optimized quite a lot, this is only
true for
JDK6. Until JBoss5 is released we can't move to JDK6.

However, we are achieving 20K socket connections and 60K packets per
second (per
server) with Mina 1.1, and profiling has shown that Mina is still not
the
bottleneck - if we can process packets faster with less CPU overhead we
will
achieve even higher throughput.

In my opinion changing Mina to use ReentrantLock will have benefits for
JDK5
users, but whether it will make enough of a difference to justify the
effort is
doubtful, unless not much effort is required to make the change.

Dawie

-----Original Message-----
From: Trustin Lee [mailto:trustin@gmail.com] 
Sent: Wednesday, May 16, 2007 8:46 AM
To: dev@mina.apache.org 
Subject: Interesting blog entry about synchronized vs ReentrantLock

Hi,

I found an interesting blog entry:

http://blogs.sun.com/dave/entry/java_util_concurrent_reentrantlock_vs 

It seems like Sun engineers have done a lot of optimization on
'synchronized' keyword.  I just have been thinking that ReentrantLock
performs better than synchronized like this article points out:

http://www-128.ibm.com/developerworks/library/j-jtp10264/ 

So, should we stick to synchronized as long as we don't need advanced
features of ReentrantLock for MINA?

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/ 
--
PGP Key ID: 0x0255ECA6



Mime
View raw message