You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@mina.apache.org by Pablo Palazon <pp...@dsi.uclm.es> on 2008/05/12 20:00:25 UTC

Improve Receive Throughput

Hi!!, I'm Pablo Palazón and I'm developing network server and I use
Apache MINA for server/client connection.

This program need listen all messages from many clients. Messages are
register and send to another server. There are rules that redelivery
messages to another server when the program see the message's content.

I don't need establish communication between client and server, client
only send message and he forget and don't need any response. 

Gateway (Client) -> Router (Server/Client) -> Manager (Another Server)

Gateway send message and forget, and router need to redelivery to
another manager and forget too. 

This program is like a content-based router. The first problem is that I
can't read more than 1000 messages/s. I used MINA like a client (I
produce and send messages) and like a server. The gateway produce
messages and send it to Router, but this is collapse (memory overflow)
before Router. 

I suppose that the client don't send another messages until server can
receive, and client produce the message and stay in memory until it can
send the message, and in few time, memory is overflow. Do you think that
the problem is in server or client?. Do I need to magnify receive memory
buffer?.

And, do you know another test-client where I can send any message with
any structure and only send message and don't stay expect response?.
Only send and forget.

For improve receive buffer, I use heap buffer with tcpnodelay disable.
In protocol decoder I don't use CumulativeProtocol (Don't use Nagle's
Algorithm), I use logging filter (for register in/out messages).

Thank you for all.

-- 
Pablo Palazón Sánchez <pp...@dsi.uclm.es>
I3A - Instituto de Investigación en Informática de Albacete
SIDIS - Sistemas de Información Distribuida e Ingeniería del Software
UCLM - Universidad de Castilla-La Mancha


Re: Improve Receive Throughput

Posted by Pablo Palazon <pp...@dsi.uclm.es>.
I'm using MINA 2.0.0-M1 in java JDK 1.5.0 update 12 over Ubuntu
GNU/Linux 7.04.

I run java without any options (it run with 64MB RAM in java). I'm try
to improve it with this sentence:

-server -Xms512m -Xmx512m -Xss128k -XX:+AggressiveOpts -XX:
+UseParallelGC -XX:+UseBiasedLocking -XX:NewSize=64m

but I'm have problem with global velocity, and it don't improve. I was
trying another combinations with it didn't improve.

The program is run in dual-processor Pentium-IV 32 bits with 2GB RAM.

Between client and server there is a link with 10Mbps (direct link)

Thank you for all your help.

El lun, 12-05-2008 a las 20:28 +0200, Emmanuel Lecharny escribió:
> Hi Pablo,
> 
> what would be intersting is to get the version you are using, plus some 
> more info like the java version, the OS you are running the server on, 
> the memory you set for your JVM, etc.
> 
> FYI, On Apache Directory Server, we are able to deal with more than 5000 
> messages per second (even if those messages are not that big) on a laptop.

-- 
Pablo Palazón Sánchez <pp...@dsi.uclm.es>
I3A - Instituto de Investigación en Informática de Albacete
SIDIS - Sistemas de Información Distribuida e Ingeniería del Software
UCLM - Universidad de Castilla-La Mancha


Re: Improve Receive Throughput

Posted by Emmanuel Lecharny <el...@apache.org>.
Hi Pablo,

what would be intersting is to get the version you are using, plus some 
more info like the java version, the OS you are running the server on, 
the memory you set for your JVM, etc.

FYI, On Apache Directory Server, we are able to deal with more than 5000 
messages per second (even if those messages are not that big) on a laptop.

Pablo Palazon wrote:
> Hi!!, I'm Pablo Palazón and I'm developing network server and I use
> Apache MINA for server/client connection.
>
> This program need listen all messages from many clients. Messages are
> register and send to another server. There are rules that redelivery
> messages to another server when the program see the message's content.
>
> I don't need establish communication between client and server, client
> only send message and he forget and don't need any response. 
>
> Gateway (Client) -> Router (Server/Client) -> Manager (Another Server)
>
> Gateway send message and forget, and router need to redelivery to
> another manager and forget too. 
>
> This program is like a content-based router. The first problem is that I
> can't read more than 1000 messages/s. I used MINA like a client (I
> produce and send messages) and like a server. The gateway produce
> messages and send it to Router, but this is collapse (memory overflow)
> before Router. 
>
> I suppose that the client don't send another messages until server can
> receive, and client produce the message and stay in memory until it can
> send the message, and in few time, memory is overflow. Do you think that
> the problem is in server or client?. Do I need to magnify receive memory
> buffer?.
>
> And, do you know another test-client where I can send any message with
> any structure and only send message and don't stay expect response?.
> Only send and forget.
>
> For improve receive buffer, I use heap buffer with tcpnodelay disable.
> In protocol decoder I don't use CumulativeProtocol (Don't use Nagle's
> Algorithm), I use logging filter (for register in/out messages).
>
> Thank you for all.
>
>   


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org