Hi Folks,

I am experiencing some performance issues with Apache Mina 2.0. 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.

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).

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 );
mediaAcceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE, 30 );


We are using 64 bit Linux with 8 core CPU and 32 GB of memory.
Please help as i am stuck on this issue.

Thanks.

Reply via email to