You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Trustin Lee <tr...@gmail.com> on 2007/12/07 03:03:22 UTC

Re: High speed data transfer

On Dec 7, 2007 2:34 AM, Rajiv Kalapala <rk...@gmail.com> wrote:
> Hi Trustin,
>
> This is Rajiv from St. Louis, USA. I am a newbie to Mina. The project I have
> in my mind is to write a network efficiency testing client-server app. I
> have attached the source code. The main idea is, the client sends request to
> server and then the server starts sending data packets at a desired data
> rate. Then at client side I can calculate the latency and jitter. I started
> by sending data at a rate of 1000 Mbps (acheived by sending 1kbyte packet
> 1000*125 times) and I am stuck. Although its not guaranteed that the
> underlying network preserves the integrity of the packets being sent atleast
> it facilitates a data transfer rate of 1000 Mbps. Is mina capable of
> handling 1000 Mbps? I am unable to retrieve all the sent objects on client
> side. Also the server is not able to send packets at 1000 Mbps. Typically
> its taking 3-4 seconds to transfer 1 megabits. I doubt it might be due to
> hardware limitations. I am running the program on windows xp, 3gb ram, p4 ht
> @ 3.2Ghz and with jvm options -server -Xms256m -Xmx256m. Are there any
> settings in Mina so as to facilitate desired data rate? I tried to read
> through the documentation but unfortunately I didnt come across what I was
> looking for.
>
> Please let me know what you think and I appreciate any sort of help or
> pointers you give. Pardon me if I mailed to your wrong email id or if I am
> not clear enough.

1) You didn't switch to heap buffer.  Please insert the following statements.

ByteBuffer.setUseDirectBuffer(false);
ByteBuffer.setAllocator(new SimpleByteBufferAllocator());

This is explicitly specified in our getting started guide.

2) You didn't disable ThreadModel.

service.setThreadModel(ThreadModel.MANUAL);

This is also explicitly specified in out thread model configuration tutorial.

3) The size of the response message is 12, but you don't decode until
1036 bytes are received.

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