TPC-Council / HammerDB

HammerDB Database Load Testing and Benchmarking Tool
http://www.hammerdb.com
GNU General Public License v3.0
542 stars 115 forks source link

Increase default CLI timeouts #667

Closed sm-shaw closed 4 months ago

sm-shaw commented 4 months ago

Is your feature request related to a problem? Please describe. It has been raised a few times when tests have longer running actions such as checkpoints after a test, the CLI main thread can be killed by the timer before all actions are complete e.g.

16 VU TEST
Error: Virtual Users exist, destroy with vudestroy before changing settings
Error: Virtual Users exist, destroy with vudestroy before creating
Transaction Counter thread already running with threadid:tid0x7f95077fe700
Transaction Counter thread running with threadid:tid0x7f95077fe700
Virtual Users still active in background
Wait for Virtual Users to finish?
Enter yes or no: replied yes
Error: can't read "threadscreated(0)": no such variable
Virtual Users remain running in background or shutting down, retry
Transaction Counter thread running with threadid:tid0x7f95077fe700
Stopping Transaction Counter
16 TEST COMPLETE
TRANSACTION RESPONSE TIMES
Jobid {} for virtual user 0 does not exist

Describe the solution you'd like We should increase the default timeouts set in generic.xml - initially from 10 to 60 seconds to allow tests a minute to complete. keepalive_margin is for the main thread, xt_gather_timeout is for collecting statistics.

    <commandline>
        <keepalive_margin>60</keepalive_margin>
    </commandline>
    <timeprofile>
           <xt_gather_timeout>60</xt_gather_timeout>
    </timeprofile>

Describe alternatives you've considered We already explain here https://github.com/TPC-Council/HammerDB/discussions/622 how to set the values manually i.e.

hammerdb>dict set genericdictdb timeprofile xt_gather_timeout 60
hammerdb>dict set genericdictdb commandline keepalive_margin 60

And we have added a giset command to do this in a more formal way: Add giset command to set generic dictionary settings https://github.com/TPC-Council/HammerDB/pull/646 and also updated the error messages: Add check to vurun for pre-existing threads https://github.com/TPC-Council/HammerDB/pull/644

Additional context 60 seconds seems like a good middle ground, however the solutions above can increase still further if needed.