tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Fernandez <oliver.fernan...@marfeel.com>
Subject Re: Thread.sleep CPU time
Date Wed, 10 May 2017 08:02:19 GMT
Sorry about the image. Here's in text format

<All Threads>

 - org.apache.tomcat.utils.trheads.TaskThreadWrappingRunnable.run() --->
42% CPU. This is my webapp code. It's OK

 - org.apache.coyote.AbstractProtocol$AsyncTimeout.run()
    - AbstractProtocol.java:1138 [Wall Time] java.lang.Thread.sleep(long)
----> 38% CPU

 - org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run()
    - ContainerBase.java:1355 [Wall Time] java.lang.Thread.sleep(long)
------> 19%


I'm not sure what this means. is it just that the CPU is IDLE waiting for
other tasks to complete?


On 10 May 2017 at 09:53, Stevo Slavić <sslavic@gmail.com> wrote:

> Maybe sleep call is in a loop - busy waiting, and sleeping too short. Sleep
> longer, observe latency after the change. In Java 9 there will be extra
> option
> http://download.java.net/java/jdk9/docs/api/java/lang/
> Thread.html#onSpinWait--
>
> On Wed, May 10, 2017 at 9:44 AM, Oliver Fernandez <
> oliver.fernandez@marfeel.com> wrote:
>
> > While profiling my Tomcat app using YourKit, I noticed two Threads,
> > consuming 57% of total CPU, in the method Thread.sleep()
> >
> > [image: Inline images 1]
> >
> > What's this Thread.sleep() about?
> >
> >
> >
>



-- 

*Óliver Fernández*

Principal Architect

[image: Inline image 2]


Marfeel Solutions S.L.

Rambla Catalunya 35, Principal 2ª

08007 Barcelona, Spain




ES: (+34) 93 178 59 50 ext. 106

US: (+1) 917-341-2540 ext. 106

UK: (+44) 207-048-37-28 <%28%2B44%29%20704-837-28> ext. 106


www.marfeel.com

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message