Please Help, i am still facing same issue.
On 12/3/2013 8:39 PM, Muhammad Farooq wrote:
Dear Emmanuel,
Thank you for your response. Please see my comments in line.
On 12/2/2013 10:24 PM, Emmanuel Lécharny wrote:
Le 12/2/13 5:22 PM, Muhammad Farooq a écrit :
Hi Folks,
I am experiencing some performance issues with Apache Mina 2.0.
Which exact version ?
exact version is 2.0.4
The problem
is when more then 400 Mina client sends media data (around 300kb) to
Mina
Server.
On full load Server receive messages too much late around 15-20
minutes late messages received at Server end.
What is your network bandwith ? Java version ?
i am testing this scenario in our LAN enviourment 100 mbps. Java
version is "1.6.0_22"
The more strange thing is server's messageRecieved method still called
and
receive data even after all clients stop sending data.
Seems like mina cache client's data somewhere.
(Don't know why and where it cache data).
In the client's buffers. If the server can't read fast enough, then the
client will not be able to write until the socket get's ready, so that's
pretty normal.
I am using Mina 2.0 and Spring 3.0 both at Server and client end.
I have applied all Mina related performance setting in Server
application
but no success. Below are some applied settings in server application.
<bean id="mediaCodecFilter"
class="org.apache.mina.filter.codec.ProtocolCodecFilter">
<constructor-arg>
<bean
class="org.apache.mina.filter.codec.serialization.ObjectSerilizationCodFactry">
<property name="encoderMaxObjectSize" value="52428800"
/> <!-- 50 MB -->
<property name="decoderMaxObjectSize"
value="52428800" />
</bean>
</constructor-arg>
</bean>
<bean id="minaThreadPool"
class="org.apache.mina.filter.executor.ExecutorFilter"
scope="prototype">
<constructor-arg name="corePoolSize" index="0"
value="2000" />
<constructor-arg name="maximumPoolSize" index="1"
value="3000" />
<constructor-arg name="keepAliveTime" index="2" value="30" />
<constructor-arg name="unit" index="3" value="SECONDS"
type="java.util.concurrent.TimeUnit" />
</bean>
<bean id="mediaFilterChainBuilder"
class="org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder">
<property name="filters">
<map>
<entry key="loggingFilter"
value-ref="loggingFilter" />
<entry key="codecFilter"
value-ref="mediaCodecFilter" />
<entry key="executorFilter"
value-ref="minaThreadPool" />
</map>
</property>
</bean>
NioSocketAcceptor mediaAcceptor =
(NioSocketAcceptor)SpringUtilities.getInstance().getBean("mediaIoAcceptor");
mediaAcceptor.getSessionConfig().setReceiveBufferSize( 8192 );
Way to small. Set it to something like 64Kb. That will allow your server
to read bigger chunks of data in one shot.
I will surely try after increasing size.
Also are you CPU bounded ? Or is your processor doing nothing while
processing the requests ?
No my application is not CPU bounded and CPU remians around 50% idle
while
processing requests.