Re: [OT] RE: 80ms delay switching between worker threads

2015-11-05 Thread Farzad Panahi
Chris - I am running a mac book pro. I will try to setup a simple test case when I get a chance and post the results. On Wed, Nov 4, 2015 at 11:54 AM, Christopher Schultz wrote: > Farzad, > > On 11/3/15 2:45 PM, Farzad Panahi wrote: >> I wish I could get my hands on a real serv

Re: [OT] RE: 80ms delay switching between worker threads

2015-11-03 Thread Farzad Panahi
That's correct André. That is my point. On Tue, Nov 3, 2015 at 8:18 AM, André Warnier (tomcat) wrote: > On 02.11.2015 21:23, David kerber wrote: >> >> On 11/2/2015 3:09 PM, Farzad Panahi wrote: >>> >>> Quoting from David Holme's blog: >>>

Re: [OT] RE: 80ms delay switching between worker threads

2015-11-03 Thread Farzad Panahi
I wish I could get my hands on a real server : ) On Mon, Nov 2, 2015 at 12:23 PM, David kerber wrote: > On 11/2/2015 3:09 PM, Farzad Panahi wrote: >> >> Quoting from David Holme's blog: >> >>> The nanoTime method uses the highest resolution clock available

Re: [OT] RE: 80ms delay switching between worker threads

2015-11-02 Thread Farzad Panahi
Quoting from David Holme's blog: > The nanoTime method uses the highest resolution clock available on the > platform, and while its return value is in nanoseconds, the update resolution > is typically only microseconds. https://blogs.oracle.com/dholmes/entry/inside_the_hotspot_vm_clocks I think

Re: 80ms delay switching between worker threads

2015-10-30 Thread Farzad Panahi
Hi Chris - I am using a linux instance on amazon cloud. On Oct 30, 2015 7:43 PM, "Christopher Schultz" wrote: > Farzad, > > On 10/30/15 6:10 PM, Farzad Panahi wrote: > > Thanks for the explanation David. > > > > I added System.nanoTime() to get high resolu

Re: 80ms delay switching between worker threads

2015-10-30 Thread Farzad Panahi
82709376459, sessionId: 0, request: 113718448 On Fri, Oct 30, 2015 at 12:36 PM, David kerber wrote: > On 10/30/2015 3:23 PM, Farzad Panahi wrote: >> >> Mark - Could you elaborate a bit more on what you mean by "resolution >> of the timestamps for the log messages"? I

Re: 80ms delay switching between worker threads

2015-10-30 Thread Farzad Panahi
why is it happening on thread switch only and is so consistent? In your opinion what is a good way to monitor or measure the performance of tomcat websocket message processing? Cheers Farzad On Fri, Oct 30, 2015 at 3:16 AM, Mark Thomas wrote: > On 30/10/2015 00:03, Farzad Panahi wrote: >

Re: 80ms delay switching between worker threads

2015-10-30 Thread Farzad Panahi
André - I like your humour :D On Fri, Oct 30, 2015 at 1:38 AM, André Warnier (tomcat) wrote: > On 30.10.2015 01:03, Farzad Panahi wrote: >> >> Hi, >> >> I am using tomcat 8.0.23 to terminate my websocket connections. I was >> looking at my trace logs and notic

80ms delay switching between worker threads

2015-10-29 Thread Farzad Panahi
Hi, I am using tomcat 8.0.23 to terminate my websocket connections. I was looking at my trace logs and noticed that when tomcat worker thread responsible for processing websocket messages switches to a different thread, there is about 80ms delay. In my OnMessage implementation I let the work done

Re: Tomcat throws IllegalStateException “The remote endpoint was in state [BINARY_FULL_WRITING] …” when calling RemoteEndpoint.Async.sendBinary concurrently on the same session

2015-10-27 Thread Farzad Panahi
Thanks Mark for your quick response. But how do I know the previous message is finished? RemoteEndpoint does not expose the state. On Tue, Oct 27, 2015 at 7:30 PM, Mark Thomas wrote: > On 27/10/2015 19:15, Farzad Panahi wrote: >> Hi, >> >> I am using tomcat 8.0.23 to t

Tomcat throws IllegalStateException “The remote endpoint was in state [BINARY_FULL_WRITING] …” when calling RemoteEndpoint.Async.sendBinary concurrently on the same session

2015-10-27 Thread Farzad Panahi
Hi, I am using tomcat 8.0.23 to terminate my websocket connections. I have the following code to take care of the incoming messages: @OnMessage public void onMsg(Session session, byte[] request) { executorService.execute(() -> session.getAsyncRemote().sendBinary(