TPC-Council / HammerDB

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

How to prevent Error: Virtual Users exist, destroy with vudestroy before changing settings #621

Closed jsrz closed 9 months ago

jsrz commented 9 months ago

Guidance Bug reports are for when HammerDB is not behaving as expected. Bug reports should not be submitted for help in understanding database performance related questions. General questions on database performance or HammerDB usability should be submitted under Discussions.

Describe the bug I'm running TPROC-C against a PostgreSQL DB. I'm using a TCL script to do 6 runs with varying number of virtual user. The first 2-3 runs complete, but then I get errors. Unclear to me how I can prevent this virtual user error. Is something wrong with the script? I've used this same script in the past in older version of HammerDB and PostgreSQL. Not sure what is different.

Complete output of one of these failed runs:

`HammerDB CLI v4.8 Copyright (C) 2003-2023 Steve Shaw Type "help" for a list of commands Initialized Jobs on-disk database /tmp/hammer.DB using existing tables (7,135,232 KB) Database set to PostgreSQL

Benchmark set to TPROC-C for PostgreSQL

Value 10.2.108.3 for connection:pg_host is the same as existing value 10.2.108.3, no change made

Value 5432 for connection:pg_port is the same as existing value 5432, no change made

Value disable for connection:pg_sslmode is the same as existing value disable, no change made

Value true for tpcc:pg_timeprofile is the same as existing value true, no change made

Value true for tpcc:pg_storedprocs is the same as existing value true, no change made

Value 1000 for tpcc:pg_count_ware is the same as existing value 1000, no change made

Value 128 for tpcc:pg_num_vu is the same as existing value 128, no change made

Value timed for tpcc:pg_driver is the same as existing value timed, no change made

Value 3 for tpcc:pg_rampup is the same as existing value 3, no change made

Value 15 for tpcc:pg_duration is the same as existing value 15, no change made

Value true for tpcc:pg_raiseerror is the same as existing value true, no change made

Value 1000000000 for tpcc:pg_total_iterations is the same as existing value 1000000000, no change made

Value false for tpcc:pg_connect_pool is the same as existing value false, no change made

Script loaded, Type "print script" to view

Start Test(s) Testing with 8 users Vuser 1 created MONITOR - WAIT IDLE

Vuser 2 created - WAIT IDLE

Vuser 3 created - WAIT IDLE

Vuser 4 created - WAIT IDLE

Vuser 5 created - WAIT IDLE

Vuser 6 created - WAIT IDLE

Vuser 7 created - WAIT IDLE

Vuser 8 created - WAIT IDLE

Vuser 9 created - WAIT IDLE

Logging activated to /tmp/hammerdb_6526EA5E607703E263137343.log

9 Virtual Users Created with Monitor VU

Vuser 1:RUNNING

Vuser 1:Initializing xtprof time profiler

Vuser 1:Beginning rampup time of 3 minutes

Vuser 2:RUNNING

Vuser 2:Initializing xtprof time profiler

Vuser 2:Processing 1000000000 transactions with output suppressed...

Vuser 3:RUNNING

Vuser 3:Initializing xtprof time profiler

Vuser 3:Processing 1000000000 transactions with output suppressed...

Vuser 4:RUNNING

Vuser 4:Initializing xtprof time profiler

Vuser 4:Processing 1000000000 transactions with output suppressed...

Vuser 5:RUNNING

Vuser 5:Initializing xtprof time profiler

Vuser 5:Processing 1000000000 transactions with output suppressed...

Vuser 6:RUNNING

Vuser 6:Initializing xtprof time profiler

Vuser 6:Processing 1000000000 transactions with output suppressed...

Vuser 7:RUNNING

Vuser 7:Initializing xtprof time profiler

Vuser 7:Processing 1000000000 transactions with output suppressed...

Vuser 8:RUNNING

Vuser 8:Initializing xtprof time profiler

Vuser 8:Processing 1000000000 transactions with output suppressed...

Vuser 9:RUNNING

Vuser 9:Initializing xtprof time profiler

Vuser 9:Processing 1000000000 transactions with output suppressed...

Vuser 1:Rampup 1 minutes complete ...

Vuser 1:Rampup 2 minutes complete ...

Vuser 1:Rampup 3 minutes complete ...

Vuser 1:Rampup complete, Taking start Transaction Count.

Vuser 1:Timing test period of 15 in minutes

Vuser 1:1 ...,

Vuser 1:2 ...,

Vuser 1:3 ...,

Vuser 1:4 ...,

Vuser 1:5 ...,

Vuser 1:6 ...,

Vuser 1:7 ...,

Vuser 1:8 ...,

Vuser 1:9 ...,

Vuser 1:10 ...,

Vuser 1:11 ...,

Vuser 1:12 ...,

Vuser 1:13 ...,

Vuser 1:14 ...,

Vuser 1:15 ...,

Vuser 1:Test complete, Taking end Transaction Count.

Vuser 1:8 Active Virtual Users configured

Vuser 1:TEST RESULT : System achieved 196722 NOPM from 453665 PostgreSQL TPM

Vuser 1:Gathering timing data from Active Virtual Users...

Vuser 8:FINISHED SUCCESS

Vuser 3:FINISHED SUCCESS

Vuser 4:FINISHED SUCCESS

Vuser 5:FINISHED SUCCESS

Vuser 9:FINISHED SUCCESS

Vuser 2:FINISHED SUCCESS

Vuser 7:FINISHED SUCCESS

Vuser 6:FINISHED SUCCESS

Vuser 1:Calculating timings...

Vuser 1:Writing timing data to /tmp/hdbxtprofile_6526EE9C607703E293638373.log

Vuser 1:FINISHED SUCCESS

ALL VIRTUAL USERS COMPLETE

vudestroy success

Testing with 16 users Vuser 1 created MONITOR - WAIT IDLE

Vuser 2 created - WAIT IDLE

Vuser 3 created - WAIT IDLE

Vuser 4 created - WAIT IDLE

Vuser 5 created - WAIT IDLE

Vuser 6 created - WAIT IDLE

Vuser 7 created - WAIT IDLE

Vuser 8 created - WAIT IDLE

Vuser 9 created - WAIT IDLE

Vuser 10 created - WAIT IDLE

Vuser 11 created - WAIT IDLE

Vuser 12 created - WAIT IDLE

Vuser 13 created - WAIT IDLE

Vuser 14 created - WAIT IDLE

Vuser 15 created - WAIT IDLE

Vuser 16 created - WAIT IDLE

Vuser 17 created - WAIT IDLE

Logging activated to /tmp/hammerdb_6526EEB7607703E213535303.log

17 Virtual Users Created with Monitor VU

Vuser 1:RUNNING

Vuser 1:Initializing xtprof time profiler

Vuser 1:Beginning rampup time of 3 minutes

Vuser 2:RUNNING

Vuser 2:Initializing xtprof time profiler

Vuser 2:Processing 1000000000 transactions with output suppressed...

Vuser 3:RUNNING

Vuser 3:Initializing xtprof time profiler

Vuser 3:Processing 1000000000 transactions with output suppressed...

Vuser 4:RUNNING

Vuser 4:Initializing xtprof time profiler

Vuser 4:Processing 1000000000 transactions with output suppressed...

Vuser 5:RUNNING

Vuser 5:Initializing xtprof time profiler

Vuser 5:Processing 1000000000 transactions with output suppressed...

Vuser 6:RUNNING

Vuser 6:Initializing xtprof time profiler

Vuser 6:Processing 1000000000 transactions with output suppressed...

Vuser 7:RUNNING

Vuser 7:Initializing xtprof time profiler

Vuser 7:Processing 1000000000 transactions with output suppressed...

Vuser 8:RUNNING

Vuser 8:Initializing xtprof time profiler

Vuser 8:Processing 1000000000 transactions with output suppressed...

Vuser 9:RUNNING

Vuser 9:Initializing xtprof time profiler

Vuser 9:Processing 1000000000 transactions with output suppressed...

Vuser 10:RUNNING

Vuser 10:Initializing xtprof time profiler

Vuser 10:Processing 1000000000 transactions with output suppressed...

Vuser 11:RUNNING

Vuser 11:Initializing xtprof time profiler

Vuser 11:Processing 1000000000 transactions with output suppressed...

Vuser 12:RUNNING

Vuser 12:Initializing xtprof time profiler

Vuser 12:Processing 1000000000 transactions with output suppressed...

Vuser 13:RUNNING

Vuser 13:Initializing xtprof time profiler

Vuser 13:Processing 1000000000 transactions with output suppressed...

Vuser 14:RUNNING

Vuser 14:Initializing xtprof time profiler

Vuser 14:Processing 1000000000 transactions with output suppressed...

Vuser 15:RUNNING

Vuser 15:Initializing xtprof time profiler

Vuser 15:Processing 1000000000 transactions with output suppressed...

Vuser 16:RUNNING

Vuser 16:Initializing xtprof time profiler

Vuser 16:Processing 1000000000 transactions with output suppressed...

Vuser 17:RUNNING

Vuser 17:Initializing xtprof time profiler

Vuser 17:Processing 1000000000 transactions with output suppressed...

Vuser 1:Rampup 1 minutes complete ...

Vuser 1:Rampup 2 minutes complete ...

Vuser 1:Rampup 3 minutes complete ...

Vuser 1:Rampup complete, Taking start Transaction Count.

Vuser 1:Timing test period of 15 in minutes

Vuser 1:1 ...,

Vuser 1:2 ...,

Vuser 1:3 ...,

Vuser 1:4 ...,

Vuser 1:5 ...,

Vuser 1:6 ...,

Vuser 1:7 ...,

Vuser 1:8 ...,

Vuser 1:9 ...,

Vuser 1:10 ...,

Vuser 1:11 ...,

Vuser 1:12 ...,

Vuser 1:13 ...,

Vuser 1:14 ...,

Vuser 1:15 ...,

Vuser 1:Test complete, Taking end Transaction Count.

Vuser 1:16 Active Virtual Users configured

Vuser 1:TEST RESULT : System achieved 379697 NOPM from 877211 PostgreSQL TPM

Vuser 1:Gathering timing data from Active Virtual Users...

Vuser 2:FINISHED SUCCESS

Vuser 10:FINISHED SUCCESS

Vuser 6:FINISHED SUCCESS

Vuser 5:FINISHED SUCCESS

Vuser 4:FINISHED SUCCESS

Vuser 11:FINISHED SUCCESS

Vuser 8:FINISHED SUCCESS

Vuser 7:FINISHED SUCCESS

Vuser 12:FINISHED SUCCESS

Vuser 3:FINISHED SUCCESS

Vuser 13:FINISHED SUCCESS

Vuser 16:FINISHED SUCCESS

Vuser 17:FINISHED SUCCESS

Vuser 9:FINISHED SUCCESS

Vuser 1:Calculating timings...

Vuser 14:FINISHED SUCCESS

Vuser 1:Writing timing data to /tmp/hdbxtprofile_6526F2F8607703E253230373.log

Vuser 15:FINISHED SUCCESS

Virtual Users remain running in background or shutting down, retry

Testing with 32 users Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before creating

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

Testing with 64 users Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before creating

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

Testing with 128 users Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before creating

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

Testing with 256 users Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before changing settings Error: Virtual Users exist, destroy with vudestroy before creating

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

Tests complete`

To Reproduce

  1. Setup PostgreSQL DB
  2. Run buildschema script (see screenshots). This runs ok.
  3. Run test script (see screenshots)

Expected behavior 6 test runs completed with different numbers of virtual users (8, 16, 32, 64, 128, 256)

Screenshots Build Schema Script:

#!/bin/tclsh dbset db pg dbset bm TPROC-C diset connection pg_host 10.2.108.3 diset connection pg_port 5432 diset connection pg_sslmode disable diset tpcc pg_timeprofile true diset tpcc pg_storedprocs true diset tpcc pg_count_ware 1000 diset tpcc pg_num_vu 128 diset tpcc pg_driver timed diset tpcc pg_rampup 3 diset tpcc pg_duration 15 diset tpcc pg_raiseerror true diset tpcc pg_total_iterations 1000000000 diset tpcc pg_connect_pool false buildschema

Test run script: `#!/bin/tclsh dbset db pg dbset bm TPROC-C diset connection pg_host 10.2.108.3 diset connection pg_port 5432 diset connection pg_sslmode disable diset tpcc pg_timeprofile true diset tpcc pg_storedprocs true diset tpcc pg_count_ware 1000 diset tpcc pg_num_vu 128 diset tpcc pg_driver timed diset tpcc pg_rampup 3 diset tpcc pg_duration 15 diset tpcc pg_raiseerror true diset tpcc pg_total_iterations 1000000000 diset tpcc pg_connect_pool false loadscript

puts "Start Test(s)" foreach z { 8 16 32 64 128 256 } { puts "Testing with $z users" vuset vu $z vuset iterations 1 vuset logtotemp 1 vuset unique 1 vucreate vurun vudestroy after 5000 } puts "Tests complete" `

HammerDB Version (please complete the following information):

HammerDB Interface (please complete the following information):

Operating System (please complete the following information):

Database Server (please complete the following information):

Database Client (please complete the following information):

Additional context Add any other context about the problem here.