Hi,
>> The stress test was made with two different setup one being a MacBookPro
2011 with our software running under Mac OS 19.1. And a windows laptop
with a virtual machine running a linux application, doing the same task,
as our implementation. (Our application shall replace the linux one).

And the device we are talking to is a printer, later a bit more
information.
The linux app performed twice as any request per minutes, than our.
So i don't think the network setup is the bottleneck (yet)
It shuld not be. Now, have you tried to run your app on a server which
mimic the printer ?

No yet, it is one of next tasks.


I donn't even think the different OSes are a cause. It have to do
somethink with my code and/or how i uses mina. See below.

FYI, I'm able to handle more than 13 000 LDAP message per second on a
100 Mb/s network, on a 2011 MacBookPro...

I only have to reach 8000 messages per / *minute* :-) So should be
a task doable.

A little Background:

The printer send upon each print cycle the following command:

  Print Triggered -> Started -> Ended

Upon receiving Started, our app has to to respond with a new
set of data to print. The processing of this takes about ~2ms.
(NioPreccossor recievedMessage -> session.write).

you mean it takes 2ms to process a message on your server ? What are you
doing during the processing (2ms is a very long period)

Calculating the next set of data for the printer including some database
queries.

As state already
session.write -> NioPorcessor messageSent takes about 70ms.

Have you enabled the Nagle algorithm ? Are you using half-duplex network ?


Full Duplex. setTcpNoDelay is set to true


Additional some background how our IoHandler is implemented.
In the messageReceived we check if the message is send to us
as result upon command send to the printer or if it is a message
send to us triggered by a print cycle. If it is from the print cycle
we use another thread to dispatch an internal event in our event.
This thread process the message and prepares the next set of data
to print and writes it with session.write out.
After digging a lot around i have a feeling thats the cause of the
long delay? Because (IMHO) i think during preparing the reponse, the
NioPreccssor Thread keep going, doesn't see anything to write, goes to
check for reading next message and doesn't get the desired attention
when the writeQueue gets filled.

As soon as you write something, this will trigger an event which will be
processed. There is no delay here.

What you should do at this point is to use Wireshark to see what's
really going on at the network level. You should be able to see how long
it takes to write a response after a request has been received.

One of the next task this week to check :-)

But as it seems, at least i'm using mina correctly.

regards

Max Larsson


--
------------------------------------------------------
http://facilityboss.biz
http://facebook.com/facilityboss
------------------------------------------------------
facilityboss GmbH
Rheinstraße 75
64295 Darmstadt / Germany
Handelsregister Darmstadt, HRB 86193
Geschäftsführer: Dipl.-Inform. Max Lars Robert Larsson

Mobil: +49 179 218 4428
Email: [email protected]

Reply via email to