Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusThread should wake up when the test has completed and exit. #316

Closed
allanbank opened this issue Jun 22, 2015 · 0 comments
Closed

StatusThread should wake up when the test has completed and exit. #316

allanbank opened this issue Jun 22, 2015 · 0 comments
Assignees

Comments

@allanbank
Copy link
Collaborator

Pre 0.2.0-rc2 the YCSB benchmark would exit as soon as all of the operations had completed. This allowed users to use the wall clock time as a coarse grain benchmark across runs. For instance I have several scripts to run YCSB across changes in the MongoDB driver. I use the wallclock time for each run to know if there are any regressions. Now all runs finish in 20 seconds regardless of the actual time to complete operations.

With 0.2.0-rc2 the StatusThread is keeping the ycsb client alive until the StatusThread does a poll after the all of the operations had completed. Thread dump below that show the only two remaining threads are the main which is in a Thread.join and the StatusThread which is in a sleepUnitl().

$ jstack 10828
2015-06-21 21:03:53
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode):

"Attach Listener" #30 daemon prio=9 os_prio=0 tid=0x00007f1300001000 nid=0x2aa3 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Thread-16" #26 prio=5 os_prio=0 tid=0x00007f1354163000 nid=0x2a61 runnable [0x00007f131adc9000]
   java.lang.Thread.State: RUNNABLE
    at sun.misc.Unsafe.park(Native Method)
    at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:338)
    at com.yahoo.ycsb.ClientThread.sleepUntil(Client.java:287)
    at com.yahoo.ycsb.StatusThread.run(Client.java:125)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007f13540ca800 nid=0x2a5e runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007f13540bd800 nid=0x2a5d waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007f13540bb000 nid=0x2a5c waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007f13540b9000 nid=0x2a5b waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007f13540b6000 nid=0x2a5a waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f13540b4000 nid=0x2a59 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f1354084000 nid=0x2a58 in Object.wait() [0x00007f131b5d1000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006c5d33f18> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:142)
    - locked <0x00000006c5d33f18> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:158)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f1354080000 nid=0x2a57 in Object.wait() [0x00007f131b6d2000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006c5d40f48> (a java.lang.ref.Reference$Lock)
    at java.lang.Object.wait(Object.java:502)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
    - locked <0x00000006c5d40f48> (a java.lang.ref.Reference$Lock)

"main" #1 prio=5 os_prio=0 tid=0x00007f1354009000 nid=0x2a4d in Object.wait() [0x00007f135b70c000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x00000006c5d87b70> (a com.yahoo.ycsb.StatusThread)
    at java.lang.Thread.join(Thread.java:1245)
    - locked <0x00000006c5d87b70> (a com.yahoo.ycsb.StatusThread)
    at java.lang.Thread.join(Thread.java:1319)
    at com.yahoo.ycsb.Client.main(Client.java:806)

"VM Thread" os_prio=0 tid=0x00007f135407b000 nid=0x2a56 runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f135401e800 nid=0x2a4e runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f1354020000 nid=0x2a4f runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f1354022000 nid=0x2a50 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f1354023800 nid=0x2a51 runnable 

"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007f1354025800 nid=0x2a52 runnable 

"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007f1354027800 nid=0x2a53 runnable 

"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007f1354029000 nid=0x2a54 runnable 

"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007f135402b000 nid=0x2a55 runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f13540d5800 nid=0x2a5f waiting on condition 

JNI global references: 93
allanbank added a commit to allanbank/YCSB that referenced this issue Jul 16, 2015
@allanbank allanbank self-assigned this Jul 16, 2015
allanbank added a commit to allanbank/YCSB that referenced this issue Jul 17, 2015
client (worker) thread completing via a CountDownLatch.

Fixes brianfrankcooper#316
allanbank added a commit to allanbank/YCSB that referenced this issue Jul 17, 2015
client (worker) thread completing via a CountDownLatch.

Fixes brianfrankcooper#316
allanbank added a commit that referenced this issue Jul 18, 2015
Shutdown the status thread as soon as clients complete (Issue #316)
jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016
client (worker) thread completing via a CountDownLatch.

Fixes brianfrankcooper#316
jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016
Shutdown the status thread as soon as clients complete (Issue brianfrankcooper#316)
jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016
client (worker) thread completing via a CountDownLatch.

Fixes brianfrankcooper#316
jaricftw pushed a commit to jaricftw/YCSB that referenced this issue Jul 19, 2016
Shutdown the status thread as soon as clients complete (Issue brianfrankcooper#316)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant