[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: 80ms delay switching between worker threads
From:       Farzad Panahi <farzad.panahi () gmail ! com>
Date:       2015-10-31 6:11:13
Message-ID: CACueeY2ad-2gXEwr6zRqS1_MG_KEJx-LXNcMOx1o+igkhBhEFQ () mail ! gmail ! com
[Download RAW message or body]


Hi Chris - I am using a linux instance on amazon cloud.
On Oct 30, 2015 7:43 PM, "Christopher Schultz" <chris@christopherschultz.net>
wrote:

> Farzad,
>
> On 10/30/15 6:10 PM, Farzad Panahi wrote:
> > Thanks for the explanation David.
> >
> > I added System.nanoTime() to get high resolution numbers. Nano second
> > numbers are telling me the same thing. When thread changes we see a
> > difference of about 82ms (3082462134714 - 3082379268473 = 82866241).
> > Within the same thread the time difference is something between 84 to
> > 22 micros seconds (3082462218770  - 3082462134714 = 84056) ,
> > (3082462241008  - 3082462218770  = 22238).
> >
> > I think if it is a time resolution issue it should apply to all log
> > lines. Why is it the case that only when thread is switching we see
> > this huge hiccup? Thread context switch affects this but it cannot be
> > in order of milli seconds.
>
> What OS are you using? IIRC, the Windows timer has horrible resolution.
> you can call System.currentTimeNanos all you want, but you won't get
> anything meaningful lower than some threshold regardless of the actual
> least significant digits coming back from those calls.
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic