On 07/20/2011 11:19 PM, Jon Brisbin wrote:
> So is that CPU load reported as the result of my doing the actual work?
The report you posted shows amount of time spent by CPU in different
methods (most probably it's including sleep).
So amount of time spent in getTask() is 33% of total, but it doesn't
mean CPU is busy at that time.
For example:
Thread.sleep(10000);
will show you 100% of time spent in sleep(), but CPU doesn't do anything
at that time so it can not affect other threads and processes.
Thanks.
WBR,
Alexey.
>
>
> Thanks!
>
> Jon Brisbin
> http//jbrisbin.com
>
>
> ------------------------------------------------------------------------
>
> *From: *"Oleksiy Stashok" <oleksiy.stashok_at_oracle.com>
> *To: *users_at_grizzly.java.net
> *Sent: *Wednesday, July 20, 2011 4:15:31 PM
> *Subject: *Re: performance of Grizzly FixedThreadPool
>
> On 07/20/2011 11:08 PM, Jon Brisbin wrote:
>
> I'm seeing a ton of CPU usage in
> org.glassfish.grizzly.threadpool.FixedThreadPool$BasicWorker.getTask()
> in my profiling (34%).
>
> This method can not slow down the server, it just waits for a new
> task to execute.
> If you don't run any load, you can find the server spending almost
> 100% of time in that method.
>
> WBR,
> Alexey.
>
>
> I'm doing 200,000 PUTs of 1MB of data within an 8 second time
> span (200 simultaneous users).
>
> Here's a CSV of the profile results for this run:
>
> "Name","Time (ms)","Samples"
> "<All threads>","5931","100"
> "java.lang.Thread.run()","5901","80"
> "org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run()","5890","60"
> "org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork()","5890","60"
> "org.glassfish.grizzly.threadpool.FixedThreadPool$BasicWorker.getTask()","4292","34"
> "org.glassfish.grizzly.utils.LinkedTransferQueue.take()","4292","34"
> "org.glassfish.grizzly.utils.LinkedTransferQueue.xfer(Object,
> int, long)","4292","34"
> "org.glassfish.grizzly.utils.LinkedTransferQueue.awaitFulfill(LinkedTransferQueue$QNode,
> LinkedTransferQueue$QNode, Object, int, long)","4292","34"
> "java.util.concurrent.locks.LockSupport.park(Object)","4292","34"
> "org.glassfish.grizzly.nio.SelectorRunner.run()","736","20"
> "org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$1.run()","717","5"
> "org.glassfish.grizzly.threadpool.AbstractThreadPool.onTaskDequeued(Runnable)","145","1"
> "org.glassfish.grizzly.utils.DelayedExecutor$DelayedRunnable.run()","10","5"
> "java.lang.Object.wait(long)","10","5"
> "java.lang.ref.Finalizer$FinalizerThread.run()","22","5"
> "java.lang.ref.Reference$ReferenceHandler.run()","7","5"
> "com.mongodb.Mongo$DBCleanerThread.run()","0","5"
> "com.intellij.rt.execution.application.AppMain.main(String[])","0","5"
>
> The last two columns are time in ms and CPU%.
>
> This is limiting my tests as the CPU usage is slowing down my
> server.
>
>
>
> Thanks!
>
> Jon Brisbin
> http//jbrisbin.com
>
>
>
>