thanks,I will try another solution, A thread is responsible for receiving UDP 
messages, one thread is responsible for writing documents, through the queue 
communication between threads. 

At 2013-03-26 16:44:00,"Jeff MAURY" <[email protected]> wrote:
>Even if you running on a single processor, as you are writing into file, I
>would recommand to use a pool of threads to write onto files.
>You current setting prevents MINA from reading the socket while writing the
>previous packet to the file.
>
>Jeff
>
>
>On Tue, Mar 26, 2013 at 2:59 AM, pongjy123 <[email protected]> wrote:
>
>> with no packet loss,Mina UDP server receives packet can reach 100000/s?
>> Only receive packets and sequential write files, do not do anything else.
>> 10000/s cannot be achieved in my test environment,
>>
>>
>> DatagramSessionConfig dcfg = acceptor.getSessionConfig();
>> dcfg.setReceiveBufferSize(64*1024);
>> single processor,single thread.
>>
>>
>> my environment:
>> win7 64bit,cpu:i3 4core,memory:4G,jdk1.6.0.37(64bit),udp server(mina
>> 2.0.7) run in eclipse.
>
>
>
>
>-- 
>Jeff MAURY
>
>
>"Legacy code" often differs from its suggested alternative by actually
>working and scaling.
> - Bjarne Stroustrup
>
>http://www.jeffmaury.com
>http://riadiscuss.jeffmaury.com
>http://www.twitter.com/jeffmaury

Reply via email to