You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Julien Vermillard <jv...@archean.fr> on 2006/04/13 09:02:53 UTC
stupid latency test
Hi,
I had a discussion with Trustin about latency and I wrote a little test
(based of reserver example). The values looks pretty low (1ms). I wonder
if my test is correct.
Julien
Re: stupid latency test
Posted by Julien Vermillard <jv...@archean.fr>.
Le jeudi 13 avril 2006 à 16:11 +0900, Trustin Lee a écrit :
> On 4/13/06, Julien Vermillard <jv...@archean.fr> wrote:
> Hi,
>
> I had a discussion with Trustin about latency and I wrote a
> little test
> (based of reserver example). The values looks pretty low
> (1ms). I wonder
> if my test is correct.
>
> It seems like you didn't set any thread model. You need to set the
> thread model to ThreadModel.MANUAL so it run in a single thread.
>
> And is there any reason you spawn a new thread? You could just store
> the current nanotime as a session attribute and then calculate the
> latency when messageReceived is invoked later. It will decrease
> latency much more.
>
> BTW 1 ms latency sounds very good.
Yep I wanted ot test with default thread model config. I'll try with
ThreadPool
I use to spawn a thread because in some case calling session.write(); in
the IoHandler used to create deadlocks. I think it's fixed in MINA now,
but it's an old habbit :)
Well I think Java precision is too low for mesure the real latency.
For me it's look low enougth :)
Julien
Re: stupid latency test
Posted by Trustin Lee <tr...@gmail.com>.
On 4/13/06, Julien Vermillard <jv...@archean.fr> wrote:
>
> Hi,
>
> I had a discussion with Trustin about latency and I wrote a little test
> (based of reserver example). The values looks pretty low (1ms). I wonder
> if my test is correct.
It seems like you didn't set any thread model. You need to set the thread
model to ThreadModel.MANUAL so it run in a single thread.
And is there any reason you spawn a new thread? You could just store the
current nanotime as a session attribute and then calculate the latency when
messageReceived is invoked later. It will decrease latency much more.
BTW 1 ms latency sounds very good.
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6