Re: [Winstone-devel] Idle Winstone server consuming 50% CPU
Status: Beta
Brought to you by:
rickknowles
From: Rick K. <ri...@kn...> - 2007-02-13 23:12:17
|
Martin, According to the thread dump, one thread seems to be locked in a loop of trying to extract war file contents. Could you ask your friend to check if manually exploding the warfile makes the problem goes away ? If it does then maybe I have something to fix in the warfile explosion code. Thanks, Rick Martin Cordova wrote: > Hi, a friend of mine is testing Winstone on his Fedora core (kernel > 2.6.18), and observed that when idle, the java process consumes a lot > of cpu, according to "top". > > Here is the thread dump, in case it can shed some light. The same db > pools and applications running on resin 2.1.17 and tomcat 5.x, on the > same machine with the same JDK do not expose this CPU consumption. > That's why we suspected the high cpu utilization may be related to > Winstone. > > He is using the latest Winstone JAR you sent me (0.9.7), but previous > versions behave identically regarding cpu utilization, on his machine. > > I cannot reproduce this problem on my OpenSUSE server, using the same > versions of Winstone and Java. > > Can someone give us a clue please? any help appreciated! > > 2007-02-13 17:52:23 > Full thread dump Java HotSpot(TM) Server VM (1.6.0-b105 mixed mode): > > "DestroyJavaVM" prio=10 tid=0xa04ef800 nid=0x79bb waiting on condition > [0x00000000..0xb7f74110] > java.lang.Thread.State: RUNNABLE > > "LauncherControlThread[ControlPort=-1]" prio=10 tid=0xa04f9800 > nid=0x79ca waiting on condition [0xa015c000..0xa015ce40] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at winstone.Launcher.run(Launcher.java:277) > at java.lang.Thread.run(Thread.java:619) > > "ConnectorThread:[http-8080]" daemon prio=10 tid=0xa04f1400 nid=0x79c9 > runnable [0xa01ad000..0xa01adec0] > java.lang.Thread.State: RUNNABLE > at java.net.PlainSocketImpl.socketAccept(Native Method) > at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) > - locked <0xa2d5f780> (a java.net.SocksSocketImpl) > at java.net.ServerSocket.implAccept(ServerSocket.java:450) > at java.net.ServerSocket.accept(ServerSocket.java:421) > at winstone.HttpListener.run(HttpListener.java:127) > at java.lang.Thread.run(Thread.java:619) > > "WinstoneHostConfigurationMgmt:default" daemon prio=10 tid=0xa04f3c00 > nid=0x79c8 waiting on condition [0xa01ff000..0xa01ff140] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at winstone.HostConfiguration.run(HostConfiguration.java:176) > at java.lang.Thread.run(Thread.java:619) > > "WinstoneClassLoader Reloading Monitor Thread" daemon prio=10 > tid=0xa044b800 nid=0x79c7 runnable [0xa03ad000..0xa03ae1c0] > java.lang.Thread.State: RUNNABLE > at java.util.zip.ZipFile.getNextEntry(Native Method) > at java.util.zip.ZipFile.access$400(ZipFile.java:29) > at java.util.zip.ZipFile$2.nextElement(ZipFile.java:313) > - locked <0xa0e77fb0> (a java.util.jar.JarFile) > at java.util.zip.ZipFile$2.nextElement(ZipFile.java:299) > at java.util.jar.JarFile$1.nextElement(JarFile.java:223) > at java.util.jar.JarFile$1.nextElement(JarFile.java:218) > at winstone.classLoader.ReloadingClassLoader.searchJarPath(ReloadingClassLoader.java:193) > at winstone.classLoader.ReloadingClassLoader.run(ReloadingClassLoader.java:127) > at java.lang.Thread.run(Thread.java:619) > > "DBConnectionPool management thread" prio=10 tid=0xa043b000 nid=0x79c6 > waiting on condition [0xa03fe000..0xa03ff040] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at winstone.jndi.resourceFactories.WinstoneDataSource.run(WinstoneDataSource.java:329) > at java.lang.Thread.run(Thread.java:619) > > "WinstoneObjectPoolMgmt" daemon prio=10 tid=0x09242000 nid=0x79c5 > waiting on condition [0xa05d8000..0xa05d90c0] > java.lang.Thread.State: TIMED_WAITING (sleeping) > at java.lang.Thread.sleep(Native Method) > at winstone.ObjectPool.run(ObjectPool.java:107) > at java.lang.Thread.run(Thread.java:619) > > "Low Memory Detector" daemon prio=10 tid=0x09171400 nid=0x79c3 > runnable [0x00000000..0x00000000] > java.lang.Thread.State: RUNNABLE > > "CompilerThread1" daemon prio=10 tid=0x0916fc00 nid=0x79c2 waiting on > condition [0x00000000..0xa072b498] > java.lang.Thread.State: RUNNABLE > > "CompilerThread0" daemon prio=10 tid=0x0916e800 nid=0x79c1 waiting on > condition [0x00000000..0xa07ac518] > java.lang.Thread.State: RUNNABLE > > "Signal Dispatcher" daemon prio=10 tid=0x0916d400 nid=0x79c0 runnable > [0x00000000..0x00000000] > java.lang.Thread.State: RUNNABLE > > "Finalizer" daemon prio=10 tid=0x0915d800 nid=0x79bf in Object.wait() > [0xa0a4f000..0xa0a4f1c0] > java.lang.Thread.State: WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > - waiting on <0xa2a9fdb0> (a java.lang.ref.ReferenceQueue$Lock) > at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) > - locked <0xa2a9fdb0> (a java.lang.ref.ReferenceQueue$Lock) > at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132) > at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159) > > "Reference Handler" daemon prio=10 tid=0x09159c00 nid=0x79be in > Object.wait() [0xa0a9f000..0xa0aa0040] > java.lang.Thread.State: WAITING (on object monitor) > at java.lang.Object.wait(Native Method) > - waiting on <0xa2a9fe40> (a java.lang.ref.Reference$Lock) > at java.lang.Object.wait(Object.java:485) > at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116) > - locked <0xa2a9fe40> (a java.lang.ref.Reference$Lock) > > "VM Thread" prio=10 tid=0x09157000 nid=0x79bd runnable > > "VM Periodic Task Thread" prio=10 tid=0x09173000 nid=0x79c4 waiting on > condition > > JNI global references: 894 > > Heap > def new generation total 3264K, used 718K [0xa0e00000, 0xa1180000, > 0xa2a70000) > eden space 2944K, 24% used [0xa0e00000, 0xa0eb1e20, 0xa10e0000) > from space 320K, 2% used [0xa10e0000, 0xa10e1ad0, 0xa1130000) > to space 320K, 0% used [0xa1130000, 0xa1130000, 0xa1180000) > tenured generation total 29184K, used 3037K [0xa2a70000, > 0xa46f0000, 0xb0e00000) > the space 29184K, 10% used [0xa2a70000, 0xa2d67690, 0xa2d67800, 0xa46f0000) > compacting perm gen total 16384K, used 6782K [0xb0e00000, > 0xb1e00000, 0xb4e00000) > the space 16384K, 41% used [0xb0e00000, 0xb149fa80, 0xb149fc00, 0xb1e00000) > No shared spaces configured. > > Regards, > Martin Cordova > -- Servlet v2.5 container in a single 166KB jar file ? Try Winstone (http://winstone.sourceforge.net/) |