oltpbench icon indicating copy to clipboard operation
oltpbench copied to clipboard

Loading data into SmallBank database at scale-factor 1.0 hangs

Open arunmarathe opened this issue 6 years ago • 4 comments

Attempting to load data into SmallBank database at scale factor 1.0 on Linux/MySQL setup hangs. Please see below.

Thanks, Arun

[arunm@vm-arunm oltpbench]$ ./oltpbenchmark -b smallbank -c ./config/sample_smallbank_config.xml --create=true --load=true --execute=true -s 5 -o outputfile 11:32:43,341 (DBWorkload.java:262) INFO - ======================================================================

Benchmark: SMALLBANK {com.oltpbenchmark.benchmarks.smallbank.SmallBankBenchmark} Configuration: ./config/sample_smallbank_config.xml Type: MYSQL Driver: com.mysql.jdbc.Driver URL: jdbc:mysql://127.0.0.1:4006/smallbank Isolation: TRANSACTION_SERIALIZABLE Scale Factor: 1.0

11:32:43,343 (DBWorkload.java:263) INFO - ====================================================================== 11:32:43,358 (DBWorkload.java:522) INFO - Creating new SMALLBANK database... 11:32:43,964 (DBWorkload.java:524) INFO - Finished! 11:32:43,964 (DBWorkload.java:525) INFO - ====================================================================== 11:32:43,964 (DBWorkload.java:548) INFO - Loading data into SMALLBANK database...

arunmarathe avatar Mar 27 '19 15:03 arunmarathe

I cannot reproduce this:

pavlo@trajan:~/Documents/OLTPBenchmark/oltpbench$ ./oltpbenchmark -b smallbank -c ./config/sample_smallbank_config.xml --create=true --load=true --execute=true -s 5 -o outputfile
12:20:31,486 (DBWorkload.java:262) INFO  - ======================================================================

Benchmark:     SMALLBANK {com.oltpbenchmark.benchmarks.smallbank.SmallBankBenchmark}
Configuration: ./config/sample_smallbank_config.xml
Type:          MYSQL
Driver:        com.mysql.jdbc.Driver
URL:           jdbc:mysql://localhost:3306/smallbank
Isolation:     TRANSACTION_READ_COMMITTED
Scale Factor:  1.0

12:20:31,488 (DBWorkload.java:263) INFO  - ======================================================================
12:20:31,502 (DBWorkload.java:522) INFO  - Creating new SMALLBANK database...
12:20:31,777 (DBWorkload.java:524) INFO  - Finished!
12:20:31,777 (DBWorkload.java:525) INFO  - ======================================================================
12:20:31,778 (DBWorkload.java:548) INFO  - Loading data into SMALLBANK database...
12:22:05,865 (DBWorkload.java:550) INFO  - Finished!
12:22:05,865 (DBWorkload.java:551) INFO  - ======================================================================
12:22:05,866 (DBWorkload.java:820) INFO  - Creating 1 virtual terminals...
12:22:05,883 (DBWorkload.java:825) INFO  - Launching the SMALLBANK Benchmark with 1 Phase...
12:22:05,888 (ThreadBench.java:327) INFO  - PHASE START :: [Workload=SMALLBANK] [Serial=false] [Time=20] [WarmupTime=0] [Rate=100] [Arrival=REGULAR] [Ratios=[15.0, 15.0, 15.0, 25.0, 15.0, 15.0]] [ActiveWorkers=1]
12:22:05,898 (ThreadBench.java:478) INFO  - MEASURE :: Warmup complete, starting measurements.
12:22:25,898 (ThreadBench.java:433) INFO  - TERMINATE :: Waiting for all terminals to finish ..
12:22:25,899 (ThreadBench.java:233) INFO  - Starting WatchDogThread
12:22:25,904 (DBWorkload.java:831) INFO  - ======================================================================
12:22:25,904 (DBWorkload.java:832) INFO  - Rate limited reqs/s: Results(nanoSeconds=20000457165, measuredRequests=2000) = 99.99771422724876 requests/sec
12:22:25,905 (DBWorkload.java:686) INFO  - Output Raw data into file: results/outputfile.csv
12:22:25,984 (DBWorkload.java:743) INFO  - Output into file: results/outputfile.res
12:22:25,984 (DBWorkload.java:746) INFO  - Grouped into Buckets of 5 seconds

When it hangs, check to see whether the ACCOUNT table is growing:

mysql> SELECT COUNT(*) FROM ACCOUNTS;
+----------+
| COUNT(*) |
+----------+
|   870000 |
+----------+
1 row in set (0.46 sec)

mysql> SELECT COUNT(*) FROM ACCOUNTS;
+----------+
| COUNT(*) |
+----------+
|   890000 |
+----------+
1 row in set (0.23 sec)

apavlo avatar Mar 27 '19 16:03 apavlo

Yes, all 3 tables were growing. The following error happened. The final row counts of the three tables were as follows.

MySQL [smallbank]> show tables; +---------------------+ | Tables_in_smallbank | +---------------------+ | ACCOUNTS | | CHECKING | | SAVINGS | +---------------------+ 3 rows in set (0.001 sec)

MySQL [smallbank]> select count() from ACCOUNTS; +----------+ | count() | +----------+ | 800000 | +----------+ 1 row in set (0.135 sec)

MySQL [smallbank]> select count() from CHECKING; +----------+ | count() | +----------+ | 800000 | +----------+ 1 row in set (0.083 sec)

MySQL [smallbank]> select count() from SAVINGS; +----------+ | count() | +----------+ | 800000 | +----------+ 1 row in set (0.086 sec)

If the row-counts are correct, then I suppose the loading worked. Here is the exception, however.

[arunm@vm-arunm oltpbench]$ ./oltpbenchmark -b smallbank -c ./config/sample_smallbank_config.xml --create=true --load=true --execute=true -s 5 -o outputfile 12:53:46,962 (DBWorkload.java:262) INFO - ======================================================================

Benchmark: SMALLBANK {com.oltpbenchmark.benchmarks.smallbank.SmallBankBenchmark} Configuration: ./config/sample_smallbank_config.xml Type: MYSQL Driver: com.mysql.jdbc.Driver URL: jdbc:mysql://127.0.0.1:4006/smallbank Isolation: TRANSACTION_SERIALIZABLE Scale Factor: 1.0

12:53:46,964 (DBWorkload.java:263) INFO - ====================================================================== 12:53:46,980 (DBWorkload.java:522) INFO - Creating new SMALLBANK database... 12:53:47,748 (DBWorkload.java:524) INFO - Finished! 12:53:47,748 (DBWorkload.java:525) INFO - ====================================================================== 12:53:47,749 (DBWorkload.java:548) INFO - Loading data into SMALLBANK database... 12:58:27,361 (SmallBankLoader.java:123) ERROR - Failed to load data com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.StatementImpl.checkClosed(StatementImpl.java:465) at com.mysql.jdbc.PreparedStatement.clearBatch(PreparedStatement.java:1143) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1471) at com.oltpbenchmark.benchmarks.smallbank.SmallBankLoader$Generator.loadTables(SmallBankLoader.java:130) at com.oltpbenchmark.benchmarks.smallbank.SmallBankLoader$Generator.load(SmallBankLoader.java:114) at com.oltpbenchmark.api.Loader$LoaderThread.run(Loader.java:65) at com.oltpbenchmark.util.ThreadUtil$LatchRunnable.run(ThreadUtil.java:343) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Exception in thread "main" java.lang.RuntimeException: Failed to execute threads: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. at com.oltpbenchmark.util.ThreadUtil.run(ThreadUtil.java:309) at com.oltpbenchmark.util.ThreadUtil.runNewPool(ThreadUtil.java:275) at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:333) at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:302) at com.oltpbenchmark.DBWorkload.runLoader(DBWorkload.java:813) at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:549) Caused by: java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. at com.oltpbenchmark.benchmarks.smallbank.SmallBankLoader$Generator.load(SmallBankLoader.java:124) at com.oltpbenchmark.api.Loader$LoaderThread.run(Loader.java:65) at com.oltpbenchmark.util.ThreadUtil$LatchRunnable.run(ThreadUtil.java:343) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed. at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.Util.getInstance(Util.java:386) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) at com.mysql.jdbc.StatementImpl.checkClosed(StatementImpl.java:465) at com.mysql.jdbc.PreparedStatement.clearBatch(PreparedStatement.java:1143) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1471) at com.oltpbenchmark.benchmarks.smallbank.SmallBankLoader$Generator.loadTables(SmallBankLoader.java:130) at com.oltpbenchmark.benchmarks.smallbank.SmallBankLoader$Generator.load(SmallBankLoader.java:114) ... 5 more

arunmarathe avatar Mar 27 '19 17:03 arunmarathe

What MySQL version?

apavlo avatar Mar 27 '19 18:03 apavlo

[arunm@vm-arunm ~]$ mysql -h 127.0.0.1 -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MySQL connection id is 10 Server version: 5.7.23-1 Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

========= Please note that is't HWSQL, Huawei's flavor of MySQL.

arunmarathe avatar Mar 27 '19 19:03 arunmarathe