Giter Site home page Giter Site logo

oltpbenchmark / oltpbench Goto Github PK

View Code? Open in Web Editor NEW
396.0 396.0 268.0 125.16 MB

Database Benchmarking Framework

Home Page: http://oltpbenchmark.com/

License: Other

Shell 0.29% MATLAB 0.14% Python 7.94% Java 90.86% PLSQL 0.37% Batchfile 0.04% Perl 0.07% TSQL 0.28% Dockerfile 0.01%
benchmark database

oltpbench's People

Contributors

alandzq avatar alendit avatar apavlo avatar awajeet avatar bebopt avatar bohanjason avatar curino avatar davidlday avatar dedcode avatar dependabot[bot] avatar dvanaken avatar eribeiro avatar eric-haibin-lin avatar grooverdan avatar grundprinzip avatar kgrittn avatar kiarahmani avatar lazyplus avatar lmwnshn avatar lynus avatar michaelfruth avatar mpardesh avatar rijalati avatar robbiemckinstry avatar samehdi avatar simonkrenger avatar treilly-nuodb avatar uisyou avatar woonhak avatar xinjiacs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oltpbench's Issues

Wikipedia benchmark throws exception while loadpages() with DB2

Isolation: TRANSACTION_SERIALIZABLE
Scale Factor: 100.0

07:08:48,133 (DBWorkload.java:325) INFO - **********************************************************************************
07:08:48,153 (DBWorkload.java:375) INFO - Creating new WIKIPEDIA database...
07:08:52,536 (DBWorkload.java:377) INFO - Finished!
07:08:52,536 (DBWorkload.java:378) INFO - **********************************************************************************
07:08:52,537 (DBWorkload.java:401) INFO - Loading data into WIKIPEDIA database...
com.ibm.db2.jcc.am.BatchUpdateException: [jcc][t4][102][10040][3.62.56] Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch.
Use getNextException() to retrieve the exceptions for specific batched elements. ERRORCODE=-4229, SQLSTATE=null
at com.ibm.db2.jcc.am.fd.a(fd.java:404)
at com.ibm.db2.jcc.am.o.a(o.java:381)
at com.ibm.db2.jcc.am.kn.a(kn.java:4523)
at com.ibm.db2.jcc.am.kn.c(kn.java:4294)
at com.ibm.db2.jcc.am.kn.executeBatch(kn.java:2600)
at com.oltpbenchmark.benchmarks.wikipedia.WikipediaLoader.loadPages(WikipediaLoader.java:277)
at com.oltpbenchmark.benchmarks.wikipedia.WikipediaLoader.load(WikipediaLoader.java:92)
at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:285)
at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:269)
at com.oltpbenchmark.DBWorkload.runLoader(DBWorkload.java:567)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:402)

Exception when running SEATS against SQL Server

When running the SEATS benchmark against SQL Server 2008 R2, I get the following error:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The server failed to resume the transaction. Desc:3500000025.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:213)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:39)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$1ConnectionCommand.doExecute(SQLServerConnection.java:1775)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5574)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1734)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:1780)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:1983)
at com.oltpbenchmark.api.Worker.doWork(Worker.java:305)

Port TPC-E Benchmark from H-Store

We also have a 100% Java implementation of the TPC-E benchmark available in H-Store. This should also be ported to the OLTPBench framework. All of the stored procedures are implemented, but the MS student that worked on this for me a few years ago did not implement the client-side triggers. This is going to be a significant undertaking because the H-Store implementation is completely untested, unoptimized, and is unlikely in working condition at this point.

Source code is available here:

https://github.com/apavlo/h-store/tree/master/src/benchmarks/edu/brown/benchmark/tpce

Setting Terminals in Work Phases

Title might not be clear - what I want to do is run a benchmark in a series where userload increases. For instance, I want to run TPC-C for 100, 200, 300, 400, 500, and 600 terminals, 5 minutes each, one right after the other.

I can script this to run 6 different config files one right after the other, but I thought maybe this could also happen in phases in a single config file, such as:

  <works>
    <work>
      <scalefactor>10</scalefactor>
      <terminals>100</terminals>
      <time>60</time>
      <rate>100000</rate>
      <weights>45,43,4,4,4</weights>
    </work>
    <work>
      <scalefactor>20</scalefactor>
      <terminals>200</terminals>
      <time>60</time>
      <rate>100000</rate>
      <weights>45,43,4,4,4</weights>
    </work>
    <work>
      <scalefactor>30</scalefactor>
      <terminals>300</terminals>
      <time>60</time>
      <rate>100000</rate>
      <weights>45,43,4,4,4</weights>
    </work>
  </works>

So this didn't work (and I didn't really expect it to), but is there any reason I shouldn't consider updating to code to accept such a configuration?

Additional Thoughts:

  • Loading from such a config would take the largest scalefactor to accommodate all phases.
  • Test could still generate a single .raw file, but it would probably need to produce a .res per phase or provide a phase ID.

need more details about the traces

Hi. I'm searching for OLTP workload disk traces. And now I find your work here. Would mind if you could provide more detailed info about the configurations of these traces like the size of the database, the workload or how many operation performed during one traces. Thank you in advance.

LinkBench load references USERTABLE which isn't in schema

15:02:16,877 (DBWorkload.java:369) INFO  - Loading data into LINKBENCH database...
Exception in thread "main" java.lang.NullPointerException
    at com.oltpbenchmark.util.SQLUtil.getInsertSQL(SQLUtil.java:336)
    at com.oltpbenchmark.util.SQLUtil.getInsertSQL(SQLUtil.java:327)
    at com.oltpbenchmark.util.SQLUtil.getInsertSQL(SQLUtil.java:316)
    at com.oltpbenchmark.benchmarks.linkbench.LinkBenchLoader.load(LinkBenchLoader.java:31)
    at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:286)
    at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:270)
    at com.oltpbenchmark.DBWorkload.runLoader(DBWorkload.java:481)
    at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:370)

NullPointerException thrown when executing the wikipedia workload

First, in file config/sample_wiki_config.xml, the database name is ycsb.

Second, when executing the wikipedia using this config file with correct server address, username and password, a NullPointerException is thrown:

Exception in thread "main" java.lang.RuntimeException: Failed to create new instance of WikipediaBenchmark
        at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:182)
        at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:166)
        at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:231)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:180)
        ... 2 more
Caused by: java.lang.NullPointerException
        at java.io.File.<init>(File.java:277)
        at com.oltpbenchmark.benchmarks.wikipedia.WikipediaBenchmark.<init>(WikipediaBenchmark.java:65)
        ... 7 more

wikipedia error on postgres 9.3

Hello,
If you try to run wikipedia benchmark on postgres 9.3, the create statement of ipblock table is wrong:

Error executing: CREATE TABLE ipblocks ( ipb_id int NOT NULL auto_increment, ipb_address tinyblob NOT NULL, ipb_user int NOT NULL DEFAULT '0', ipb_by int NOT NULL DEFAULT '0', ipb_by_text varbinary(255) NOT NULL DEFAULT '', ipb_reason tinyblob NOT NULL, ipb_timestamp binary(14) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0', ipb_auto tinyint(1) NOT NULL DEFAULT '0', ipb_anon_only tinyint(1) NOT NULL DEFAULT '0', ipb_create_account tinyint(1) NOT NULL DEFAULT '1', ipb_enable_autoblock tinyint(1) NOT NULL DEFAULT '1', ipb_expiry varbinary(14) NOT NULL DEFAULT '', ipb_range_start tinyblob NOT NULL, ipb_range_end tinyblob NOT NULL, ipb_deleted tinyint(1) NOT NULL DEFAULT '0', ipb_block_email tinyint(1) NOT NULL DEFAULT '0', ipb_allow_usertalk tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (ipb_id), UNIQUE (ipb_address(255),ipb_user,ipb_auto,ipb_anon_only) )
Exception in thread "main" java.lang.RuntimeException: Unexpected error when trying to create the wikipedia database
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:242)
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:222)
at com.oltpbenchmark.DBWorkload.runCreator(DBWorkload.java:476)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:344)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "auto_increment"
Position: 47

EPINIONS with postgres

Hello,
I tried to execute a EPINIONS workload on postgres 9.3, and the result is 24 req/sec

The machine has in CPU at 100% USER, and no read/write happen on disk.

I did the test with the the following configuration:

workload:
postgres

org.postgresql.Driver
jdbc:postgresql://192.168.2.111:5432/epinions
epinions
postgres
thepassword
TRANSACTION_SERIALIZABLE

<!-- Scalefactor in Epinions scales by *2000 the number of users-->
<scalefactor>100</scalefactor>

<!-- The workload -->
<terminals>10</terminals>
<works>
    <work>
      <time>60</time>
      <rate>10000</rate>
      <weights>10,10,10,10,10,10,10,10,20</weights>
    </work>
</works>

....

postgres:
listen_addresses = '*'
max_connections = 300 # (change requires restart)
shared_buffers = 4GB # min 128kB
work_mem = 96MB # min 64kB
maintenance_work_mem = 160MB # min 1MB
wal_sync_method = fdatasync # the default is the first option
wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
checkpoint_segments = 250 # in logfile segments, min 1, 16MB each
checkpoint_timeout = 15min # range 30s-1h
checkpoint_completion_target = 0.8 # checkpoint target duration, 0.0 - 1.0
archive_mode = off # allows archiving to be done
effective_cache_size = 4GB
default_statistics_target = 100 # range 1-10000
constraint_exclusion = partition # on, off, or partition
logging_collector = off # Enable capturing of stderr and csvlog
default_transaction_isolation = 'repeatable read'
datestyle = 'iso, mdy'
lc_messages = 'en_US.UTF-8' # locale for system error message
lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
lc_numeric = 'en_US.UTF-8' # locale for number formatting
lc_time = 'en_US.UTF-8' # locale for time formatting
default_text_search_config = 'pg_catalog.english'

Small TPCC bug

FWD:
in the method PaymentTransaction, under "Good Credit", the statement
payUpdateCustBal.setFloat(3, c.c_payment_cnt);
should be
payUpdateCustBal.setInt(3, c.c_payment_cnt);

If it's ok, I can push the change into the master (or send a pullrequest).

Benchmark throw exception: Failed to retrieve class for com.oltpbenchmark.benchmarks.tpcc.procedures.AddWatchList

postgres@pg-test:~/oltpbench$ ant
Buildfile: /home/postgres/oltpbench/build.xml

build:
    [mkdir] Created dir: /home/postgres/oltpbench/build/META-INF
     [copy] Copying 1 file to /home/postgres/oltpbench/build/META-INF
    [javac] Compiling 362 source files to /home/postgres/oltpbench/build
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 warning
     [copy] Copying 89 files to /home/postgres/oltpbench/build
    [mkdir] Created dir: /home/postgres/oltpbench/build/tests
    [javac] Compiling 50 source files to /home/postgres/oltpbench/build/tests
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] 1 warning

BUILD SUCCESSFUL
Total time: 8 seconds
postgres@pg-test:~/oltpbench$ ./oltpbenchmark -b tpcc -c config/sample_wiki_config.xml --create=true --load=true
12:32:35,232 (DBWorkload.java:242) INFO  - **********************************************************************************

Benchmark:     TPCC {com.oltpbenchmark.benchmarks.tpcc.TPCCBenchmark}
Configuration: config/sample_wiki_config.xml
Type:          MYSQL
Driver:        com.mysql.jdbc.Driver
URL:           jdbc:mysql://server:3306/ycsb
Isolation:     TRANSACTION_SERIALIZABLE
Scale Factor:  100.0

12:32:35,233 (DBWorkload.java:243) INFO  - **********************************************************************************
Exception in thread "main" java.lang.RuntimeException: Failed to retrieve class for com.oltpbenchmark.benchmarks.tpcc.procedures.AddWatchList
        at com.oltpbenchmark.util.ClassUtil.getClass(ClassUtil.java:275)
        at com.oltpbenchmark.api.BenchmarkModule.initTransactionType(BenchmarkModule.java:360)
        at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:269)
Caused by: java.lang.ClassNotFoundException: com.oltpbenchmark.benchmarks.tpcc.procedures.AddWatchList
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at com.oltpbenchmark.util.ClassUtil.getClass(ClassUtil.java:273)
        ... 2 more
postgres@pg-test:~/oltpbench$ java -version
openjdk version "1.8.0_45-internal"
OpenJDK Runtime Environment (build 1.8.0_45-internal-b14)
OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

Run YCSB workload and received Java runtime exception

The following runtime exception was raised. Any suggestions? Thank you.

[cloud-user@novavm4qa oltpbench]$ ./oltpbenchmark -b tpcc -c ./config/yih_pgycsb_config.xml --create=true --load=true --execute=true -s 5 -o ./output/yih/ycsb/ycsb
10:28:40,029 (DBWorkload.java:242) INFO - **********************************************************************************

Benchmark: TPCC {com.oltpbenchmark.benchmarks.tpcc.TPCCBenchmark}
Configuration: ./config/yih_pgycsb_config.xml
Type: MYSQL
Driver: com.mysql.jdbc.Driver
URL: jdbc:mysql://192.168.30.61:3306/tpcDB
Isolation: TRANSACTION_SERIALIZABLE
Scale Factor: 1000.0

10:28:40,030 (DBWorkload.java:243) INFO - **********************************************************************************
Exception in thread "main" java.lang.RuntimeException: Failed to retrieve class for com.oltpbenchmark.benchmarks.tpcc.procedures.ReadRecord
at com.oltpbenchmark.util.ClassUtil.getClass(ClassUtil.java:275)
at com.oltpbenchmark.api.BenchmarkModule.initTransactionType(BenchmarkModule.java:360)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:269)
Caused by: java.lang.ClassNotFoundException: com.oltpbenchmark.benchmarks.tpcc.procedures.ReadRecord
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.oltpbenchmark.util.ClassUtil.getClass(ClassUtil.java:273)
... 2 more

When ran the following workload:
[cloud-user@novavm4qa oltpbench]$ cat ./config/yih_pgycsb_config.xml

mysql com.mysql.jdbc.Driver jdbc:mysql://192.168.30.61:3306/tpcDB dbuser eusjwkd@aA1
<!-- Scalefactor in YCSB is *1000 the number of rows in the USERTABLE-->
<scalefactor>1000</scalefactor>

<!-- The workload -->
<terminals>10</terminals>
<works>
    <work>
      <time>3000</time>
      <rate>unlimited</rate>
      <weights>50,50,0,0,0,0</weights>
    </work>
</works>

<!-- YCSB Procedures declaration -->
<transactiontypes>
    <transactiontype>
            <name>ReadRecord</name>
    </transactiontype>
    <transactiontype>
            <name>InsertRecord</name>
    </transactiontype>
    <transactiontype>
            <name>ScanRecord</name>
    </transactiontype>
    <transactiontype>
            <name>UpdateRecord</name>
    </transactiontype>
    <transactiontype>
            <name>DeleteRecord</name>
    </transactiontype>
    <transactiontype>
            <name>ReadModifyWriteRecord</name>
    </transactiontype>
</transactiontypes>

Running LinkBench against PostgreSQL

Hi.

I'm trying to run LinkBench against PostgreSQL.

But, the sample configuration file is provided only for MySQL.

Could anyone explain how to run LinkBench especially for PostgreSQL?

Thanks in advance.

Modifying LatencyRecord for more flexible stat types

I'm looking to add a floating-point column to the LatencyRecord (possibly only for my own purposes, but possibly eventually to be pushed as an optional feature). Presently, oltpbench records latency information in a bit of an odd way: everything is stored in large blocks of longs divided logically, then later converted to a list of LatencyRecord::Samples.

That seems like a hack to me: is there any reason why we don't just create Samples right off the bat? Doing so would give more flexibility in the types in the sample without having to resort to hacks (e.g. time values are currently stored in microseconds, then later divided by 1M to turn them into seconds, whereas simply storing a float/double would be a lot cleaner).

Results fields separator

Hey, I just wanna suggest to change the separator between fields in the output results to something else than a comma, because in some countries we use the comma as a decimal mark and this will ruin the display of the results. I find myself with a result file with more fields than the expected and only because my system is in Portuguese and put commas as a decimal mark and messed up the parsing of the file.

As you could see there are much more countries with this issue due to the use of that decimal mark.
http://en.wikipedia.org/wiki/Decimal_mark

Feel free to have a different opinion but I think that this could be improved.
Thanks for your work!

Case sensitivity issue DB2 LUW

When I try run the TPCC benchmark against a DB2 Linux database i get problems.
I run with the following command:
./oltpbenchmark -b tpcc -c config/tpcc_config_db2.xml --create=true --load=true --execute=true -s 5 -o outputfile

The problem arises during load, and what happens is that the inserts are using tablenamse surrounded by ". Since the tables are created without, DB2 stores them as uppercase. Whe you the try to do inserts and name them with lowercase in within "-chars, DB2 searches for the tables in lowercase, because that's how the are named in your TPCCConstants.

So, the load failes with SQLCODE -204(table not found.)

I managed to get by this by making sure the method getEscapedName never is used in SQLUtil.java, method getInsertStatement. Instead I replaced it with getName instead.

  • .append(escape_names ? catalog_tbl.getEscapedName() : catalog_tbl.getName());
  • .append(escape_names ? catalog_tbl.getName() : catalog_tbl.getName());

This needs to be sorted out to make sure you are being consistent on case in tablenames. either create them as lowercase in db2, or user uppercase all they way through.

Best regards, Martin

java.lang.RuntimeException: No orders

Hi
Sometimes benchmark fails with exception. I don't know why it occurs. what is the cause?
this appears at the middle of test, but sometimes doesn't appear

java.lang.RuntimeException: No orders for o_w_id=2 o_d_id=10 o_c_id=1956
at com.oltpbenchmark.benchmarks.tpcc.procedures.OrderStatus.orderStatusTransaction(OrderStatus.java:130)
at com.oltpbenchmark.benchmarks.tpcc.procedures.OrderStatus.run(OrderStatus.java:78)
at com.oltpbenchmark.benchmarks.tpcc.TPCCWorker.executeWork(TPCCWorker.java:102)
at com.oltpbenchmark.api.Worker.doWork(Worker.java:251)
at com.oltpbenchmark.api.Worker.run(Worker.java:206)
at java.lang.Thread.run(Thread.java:679)

Summary file generated is empty

Hi folks,

I think some recent changes broke the summary generation system. The generated "output.summary" and "output.db.cnf" files are empty in the latest commit. It was working fine at least till this commit - ecf85b7 (Aug 23). This is the command we use : ./oltpbenchmark -b ycsb -c ./config/ycsb_config.xml --create true --load true --execute true -s 1 -o output

ResourceStresser code not implemented

Not sure if this is a bug - I'm getting a "Code is not implemented" exception when running ResourceStresser against SQL Server:

15:20:19,070 (DBWorkload.java:296) INFO - **********************************************************************************
15:20:19,086 (DBWorkload.java:369) INFO - Loading data into RESOURCESTRESSER database...
Exception in thread "main" org.apache.commons.lang.NotImplementedException: Code is not implemented
at com.oltpbenchmark.benchmarks.resourcestresser.ResourceStresserBenchmark.makeLoaderImpl(ResourceStresserBenchmark.java:60)
at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:282)
at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:269)
at com.oltpbenchmark.DBWorkload.runLoader(DBWorkload.java:481)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:370)

TPC-C DDL missing Foreign Key Constraints

I finally had time to sit and review the TPC-C spec, and I noticed the DDL for tpcc (tpcc-ddl.sql) lacks all of the foreign keys from the spec. The foreign keys are also absent from all of the db-specific DDL files.

Before I go adding the constraints, I figured I should ask if this was intentional.

Move DDL files into separate sub-directory

Right now the benchmarks have all the DDL files strewn in the benchmark directories.

To clean things up, I propose that each benchmark directory should have a sub-directory called ddl. All of the DDL files should be moved into there. They should all be renamed to be <BenchmarkName>-<DatabaseType>.ddl. Not sure if we already enforce this last one.

Running TPCH Benchmark against MySQL gets stuck, no output

@ben-reilly
@dedcode
Hi, I'm trying to run the tpch benchmark against MySQL for a few days now and can't get it to work.
Loaded the tpc-h data into the database (see #69 (comment)) and used this config:

<parameters>
    <!-- Connection details -->
<dbtype>mysql</dbtype>
    <driver>com.mysql.jdbc.Driver</driver>
    <DBUrl>jdbc:mysql://localhost:3306/tpch-oltpbench</DBUrl>
    <username>root</username>
    <password>Kennwort1234</password>
    <isolation>TRANSACTION_READ_COMMITTED</isolation>
    <datadir>data/tpch1</datadir>

    <scalefactor>1</scalefactor>

    <!-- The workload -->
    <terminals>1</terminals>
    <works>
        <work>
          <serial>true</serial>
          <rate>unlimited</rate>
          <weights>all</weights>
        </work>
        <work>
          <serial>true</serial>
          <rate>unlimited</rate>
          <weights>even</weights>
        </work>
  <work>
    <serial>true</serial>
    <rate>unlimited</rate>
   <weights>odd</weights>
    </work>
    </works>

<transactiontypes>
  <groupings>
    <grouping>
     <name>odd</name>
    <weights>1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0</weights>
    </grouping>
    <grouping>
    <name>even</name>
    <weights>0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1</weights>
   </grouping>
  </groupings>
<transactiontype>.....

now, when I run using:

    ./oltpbenchmark -c config/mysql_tpch1.xml -b tpch --create=false --load=false --execute=true -o outputfile

I get a whole lot of output of which the last lines are:

16:54:23,188 (DBWorkload.java:703) INFO  - Launching the tpch Benchmark with 3 Phases...
16:54:23,227 (ThreadBench.java:287) INFO  - [Starting Phase] [Workload= tpch] [Serial= true] [Time= n/a] [Rate= unlimited] [Arrival= REGULAR] [Ratios= [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] [Active Workers=1]
16:54:23,265 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
16:54:24,247 (ThreadBench.java:428) INFO  - [Measure] Warmup complete, starting measurements.
16:54:24,280 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
16:55:20,555 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
16:56:14,458 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
16:57:04,303 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q2

now the test gets stuck for hours and I abort it. At the same time I get heavy CPU load but not much activity on my database.

When I try to run the benchmark using only Query 1 , the test completes, but produces some error I don't understand and no outputfile:

09:33:21,621 (ThreadBench.java:287) INFO  - [Starting Phase] [Workload= tpch] [Serial= true] [Time= n/a] [Rate= unlimited] [Arrival= REGULAR] [Ratios= [1.0]] [Active Workers=1]
09:33:21,664 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
09:33:22,647 (ThreadBench.java:428) INFO  - [Measure] Warmup complete, starting measurements.
09:33:22,679 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
09:34:15,735 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
09:35:07,379 (GenericQuery.java:58) DEBUG - class com.oltpbenchmark.benchmarks.tpch.queries.Q1
09:35:56,180 (Worker.java:272) INFO  - [Serial] Serial execution of all transactions complete.
09:35:56,623 (BenchmarkState.java:107) DEBUG - 1 workers are not done. Waiting until they finish
09:35:56,623 (ThreadBench.java:384) INFO  - [Terminate] Waiting for all terminals to finish ..
09:35:56,625 (BenchmarkState.java:107) DEBUG - 0 workers are not done. Waiting until they finish
09:35:56,661 (ThreadBench.java:233) INFO  - Starting WatchDogThread
09:35:56,669 (DBWorkload.java:709) INFO  - **********************************************************************************
09:35:56,669 (DBWorkload.java:710) INFO  - Rate limited reqs/s: Results(nanoSeconds=154001811817, measuredRequests=1) = 0.006493430098006235 requests/sec
Exception in thread "main" java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:454)
    at java.lang.Integer.parseInt(Integer.java:527)
    at com.oltpbenchmark.util.ResultUploader.<init>(ResultUploader.java:66)
    at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:562)

So the problem ist the test gets stuck or pruduces an error, plus there is no outputfile, that could help out.
I would realy appreciate if someone could help me out on this or give me a hint on how to properly run the tpch benchmark using oltp-bench.
Thank you very much!

sibench fails to create

Seems like its failing to file the ddl file or something. This is on a linux system, not sure if there's file system case sensitivity issues or something:

16:26:04,662 (BenchmarkModule.java:192) ERROR - Failed to find DDL file for SI
Exception in thread "main" java.lang.RuntimeException: Failed to create new instance of SIBenchmark
    at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:211)
    at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:195)
    at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:284)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at com.oltpbenchmark.util.ClassUtil.newInstance(ClassUtil.java:209)
    ... 2 more
Caused by: java.lang.NullPointerException
    at com.oltpbenchmark.util.FileUtil.readFile(FileUtil.java:184)
    at com.oltpbenchmark.catalog.Catalog.getOriginalTableNames(Catalog.java:293)
    at com.oltpbenchmark.catalog.Catalog.<init>(Catalog.java:98)
    at com.oltpbenchmark.api.BenchmarkModule.<init>(BenchmarkModule.java:94)
    at com.oltpbenchmark.benchmarks.sibench.SIBenchmark.<init>(SIBenchmark.java:22)
    ... 7 more

TPCC - Support memory optimized table(hekaton) for MS SQLServer 2014

Today I've tested tpcc memory optimized table(hekaton) for SQLServer 2014,
table creation and data loading are work correctly, (except 'history' table - because of there is no primary key)
but execution doesn't work because of failing 'NewOrder' and 'Payment' transactions.

Memory optimized table with serializable isolation in hekaton only works with stored procedure.

I think that one possible candidate is tpcc procedures in VoltDB.

Any thought?

package com.edb.jdbc2 does not exist

Hi
I am trying to compile OLTPBench and I am getting the following error (see below). Just checked the repository out from git and installed locally the oracle dependencies as specified in pom.xml. Any help greatly appreciated.

many thanks
best regards
/V

[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/DBWorkload.java:[44,20] error: package com.edb.jdbc2 does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[11,22] error: package org.apache.http does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[12,37] error: package org.apache.http.client.methods does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[13,37] error: package org.apache.http.client.methods does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[14,34] error: package org.apache.http.entity.mime does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[15,42] error: package org.apache.http.entity.mime.content does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[16,34] error: package org.apache.http.impl.client does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[17,34] error: package org.apache.http.impl.client does not exist
[ERROR] /home/projectx/oltpbench/oltpbench/src/com/oltpbenchmark/util/ResultUploader.java:[18,27] error: package org.apache.http.util does not exist

higher-level ordering between transactions/operations

I've got what is essentially an application-level trace of a set of operations that I'd like to turn into a benchmark. This benchmark should be pretty simple - the generator can just read a file and issue the "transactions" it finds there. It won't be generating a workload itself.

Some of the operations in the workload depend on previous operations. That's annotated in the trace, so I don't have to figure it out with any sort of deep magic or anything: if transaction 3 says it depends on transaction 2, wait until transaction 2 is complete before issuing transaction 3. If 4 doesn't say it depends on 2 or 3, go ahead and issue it. An operation can depend on multiple operations.

I'm planning just dropping in a scoreboard-like object and have nextTransaction() look through it for active transactions a candidate new transaction may depend on before returning it, and having executeWork() mark transactions completed, which seems straight forward. If nextTransaction() can't find anything, it's just going to go to sleep until a completed transaction wakes it up.

However - is there any interest in more formally supporting dependencies between transactions in the API - maybe adding something to the generator interface to be notified about completed operations, and adding a bit more meat to the abstract Operation API?

No DDL for JPAB

I get the following error when trying to run the JPAB benchmark:

08:47:12,588 (DBWorkload.java:296) INFO - **********************************************************************************
08:47:12,606 (DBWorkload.java:343) INFO - Creating new JPAB database...
08:47:13,935 (BenchmarkModule.java:192) ERROR - Failed to find DDL file for jpab
Exception in thread "main" java.lang.RuntimeException: Unexpected error when trying to create the jpab database
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:242)
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:222)
at com.oltpbenchmark.DBWorkload.runCreator(DBWorkload.java:476)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:344)
Caused by: java.lang.NullPointerException
at com.oltpbenchmark.util.ScriptRunner.runScript(ScriptRunner.java:95)
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:240)
... 3 more

I saw this was also reported on the google code site as an issue (13 - https://code.google.com/p/oltpbenchmark/issues/detail?id=13) but saw no comments or resolution.

Config: transaction types, weights and connection details are specified in each run config.

Each config has to specify a set of transaction types and it's weights. Since these do not tend to change much between the run, they are kind of dead weight, which has to be copied every time.

I think a more modular approach would be useful:

  • a separate file which specifies transaction types and weights for each transaction
  • a file with database connection details
  • a main config file, which can link to transaction and database connection config files and specifies phases (works). It can also override settings from the linked configs.

What are your thoughts?

Seat benchmark doesnt work with DB2

Hello
Seat benchmark doesnt work with DB2.
08:02:12,394 (DBWorkload.java:324) INFO -
08:02:12,397 (DBWorkload.java:325) INFO - **********************************************************************************
08:02:12,426 (DBWorkload.java:574) INFO - Creating 10 virtual terminals...
08:02:53,178 (DBWorkload.java:577) INFO - Launching the seats Benchmark with 1 Phases...
java.lang.RuntimeException: Unexpected error when initializing worker000
at com.oltpbenchmark.api.Worker.run(Worker.java:166)
at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.RuntimeException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=LIMIT;;FETCH FIRST ROWS ONLY, DRIVER=3.62.56
at com.oltpbenchmark.benchmarks.seats.SEATSWorker.initialize(SEATSWorker.java:294)
at com.oltpbenchmark.api.Worker.run(Worker.java:164)
... 1 more
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=LIMIT;;FETCH FIRST ROWS ONLY, DRIVER=3.62.56
at com.ibm.db2.jcc.am.fd.a(fd.java:676)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
at com.ibm.db2.jcc.am.fd.a(fd.java:127)
at com.ibm.db2.jcc.am.jn.c(jn.java:2614)
at com.ibm.db2.jcc.am.jn.d(jn.java:2602)
at com.ibm.db2.jcc.am.jn.a(jn.java:2094)
at com.ibm.db2.jcc.am.kn.a(kn.java:6720)
at com.ibm.db2.jcc.t4.cb.g(cb.java:141)
at com.ibm.db2.jcc.t4.cb.a(cb.java:41)
at com.ibm.db2.jcc.t4.q.a(q.java:32)
at com.ibm.db2.jcc.t4.rb.i(rb.java:135)
at com.ibm.db2.jcc.am.jn.gb(jn.java:2064)
at com.ibm.db2.jcc.am.kn.pc(kn.java:3214)
at com.ibm.db2.jcc.am.kn.b(kn.java:3999)
at com.ibm.db2.jcc.am.kn.cc(kn.java:709)
at com.ibm.db2.jcc.am.kn.executeQuery(kn.java:683)
at com.oltpbenchmark.benchmarks.seats.procedures.LoadConfig.run(LoadConfig.java:54)
at com.oltpbenchmark.benchmarks.seats.SEATSProfile.loadProfile(SEATSProfile.java:306)
at com.oltpbenchmark.benchmarks.seats.SEATSWorker.initialize(SEATSWorker.java:292)
... 2 more
java.lang.RuntimeException: Unexpected error when initializing worker007
at com.oltpbenchmark.api.Worker.run(Worker.java:166)
at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.RuntimeException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=LIMIT;;FETCH FIRST ROWS ONLY, DRIVER=3.62.56
at com.oltpbenchmark.benchmarks.seats.SEATSWorker.initialize(SEATSWorker.java:294)
at com.oltpbenchmark.api.Worker.run(Worker.java:164)
... 1 more
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=LIMIT;;FETCH FIRST ROWS ONLY, DRIVER=3.62.56
at com.ibm.db2.jcc.am.fd.a(fd.java:676)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
at com.ibm.db2.jcc.am.fd.a(fd.java:127)
at com.ibm.db2.jcc.am.jn.c(jn.java:2614)
at com.ibm.db2.jcc.am.jn.d(jn.java:2602)
at com.ibm.db2.jcc.am.jn.a(jn.java:2094)
at com.ibm.db2.jcc.am.kn.a(kn.java:6720)
at com.ibm.db2.jcc.t4.cb.g(cb.java:141)
at com.ibm.db2.jcc.t4.cb.a(cb.java:41)
at com.ibm.db2.jcc.t4.q.a(q.java:32)
at com.ibm.db2.jcc.t4.rb.i(rb.java:135)
at com.ibm.db2.jcc.am.jn.gb(jn.java:2064)
at com.ibm.db2.jcc.am.kn.pc(kn.java:3214)
at com.ibm.db2.jcc.am.kn.b(kn.java:3999)
at com.ibm.db2.jcc.am.kn.cc(kn.java:709)
at com.ibm.db2.jcc.am.kn.executeQuery(kn.java:683)
at com.oltpbenchmark.benchmarks.seats.procedures.LoadConfig.run(LoadConfig.java:54)
at com.oltpbenchmark.benchmarks.seats.SEATSProfile.loadProfile(SEATSProfile.java:306)
at com.oltpbenchmark.benchmarks.seats.SEATSWorker.initialize(SEATSWorker.java:292)
... 2 more
java.lang.RuntimeException: Unexpected error when initializing worker005
at com.oltpbenchmark.api.Worker.run(Worker.java:166)
at java.lang.Thread.run(Thread.java:736)
Caused by: java.lang.RuntimeException: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=LIMIT;;FETCH FIRST ROWS ONLY, DRIVER=3.62.56
at com.oltpbenchmark.benchmarks.seats.SEATSWorker.initialize(SEATSWorker.java:294)
at com.oltpbenchmark.api.Worker.run(Worker.java:164)
... 1 more
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=LIMIT;;FETCH FIRST ROWS ONLY, DRIVER=3.62.56
at com.ibm.db2.jcc.am.fd.a(fd.java:676)
at com.ibm.db2.jcc.am.fd.a(fd.java:60)
at com.ibm.db2.jcc.am.fd.a(fd.java:127)
at com.ibm.db2.jcc.am.jn.c(jn.java:2614)
at com.ibm.db2.jcc.am.jn.d(jn.java:2602)
at com.ibm.db2.jcc.am.jn.a(jn.java:2094)
at com.ibm.db2.jcc.am.kn.a(kn.java:6720)
at com.ibm.db2.jcc.t4.cb.g(cb.java:141)
at com.ibm.db2.jcc.t4.cb.a(cb.java:41)
at com.ibm.db2.jcc.t4.q.a(q.java:32)
at com.ibm.db2.jcc.t4.rb.i(rb.java:135)
at com.ibm.db2.jcc.am.jn.gb(jn.java:2064)
at com.ibm.db2.jcc.am.kn.pc(kn.java:3214)
at com.ibm.db2.jcc.am.kn.b(kn.java:3999)
at com.ibm.db2.jcc.am.kn.cc(kn.java:709)
at com.ibm.db2.jcc.am.kn.executeQuery(kn.java:683)
at com.oltpbenchmark.benchmarks.seats.procedures.LoadConfig.run(LoadConfig.java:54)
at com.oltpbenchmark.benchmarks.seats.SEATSProfile.loadProfile(SEATSProfile.java:306)
at com.oltpbenchmark.benchmarks.seats.SEATSWorker.initialize(SEATSWorker.java:292)
... 2 more

Refactor TPCCLoader to follow other benchmarks

The TPCCLoader has hard-coded INSERT statements to load all of its tables. This prevents us from using our automatic testing framework to test the data loading for the benchmark.

The code needs to be refactored to use SQLUtil.getInsertSQL() so that it can get the correct capitalization of table names in order to be able to use HSQLDB.

Periodic throughput reports not working with the Wikipedia benchmark

Throughput monitoring with -im option constantly reports 0 tps for the wikipedia benchmark. Sample output is pasted below. It seems working with the twitter benchmark.

$ ./oltpbenchmark -b wikipedia -c config/exp_wiki_config.xml --create=false --load=false --execute=true -im 1 -s 1 -o wikipedia.out
11:38:24,194 (DBWorkload.java:244) INFO - **********************************************************************************

Benchmark: WIKIPEDIA {com.oltpbenchmark.benchmarks.wikipedia.WikipediaBenchmark}
Configuration: config/exp_wiki_config.xml
Type: MYSQL
Driver: com.mysql.jdbc.Driver
URL: jdbc:mysql://my.server.address.here:3306/wikipedia
Isolation: TRANSACTION_SERIALIZABLE
Scale Factor: 20.0

11:38:24,196 (DBWorkload.java:245) INFO - **********************************************************************************
11:38:24,212 (DBWorkload.java:699) INFO - Creating 100 virtual terminals...
11:38:24,214 (WikipediaBenchmark.java:140) INFO - Initializing 100 WikipediaWorker using 'config/traces/longtrace_1k.txt' as the input trace file
11:38:24,533 (WikipediaBenchmark.java:144) INFO - Total Number of Sample Operations: 14506
11:38:26,322 (DBWorkload.java:702) INFO - Launching the wikipedia Benchmark with 1 Phases...
11:38:27,464 (ThreadBench.java:321) INFO - [Starting Phase] [Workload= wikipedia] [Serial= false] [Time= 10] [Rate= 1000] [Arrival= REGULAR] [Ratios= [0.07, 0.07, 7.6725, 91.2656, 0.9219]] [Active Workers=100]
11:38:27,465 (ThreadBench.java:262) INFO - Starting MonitorThread Interval[1 seconds]
11:38:27,466 (ThreadBench.java:468) INFO - [Measure] Warmup complete, starting measurements.
11:38:28,470 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:29,470 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:30,471 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:31,472 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:32,473 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:33,473 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:34,474 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:35,474 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:36,475 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:37,467 (ThreadBench.java:424) INFO - [Terminate] Waiting for all terminals to finish ..
11:38:37,480 (ThreadBench.java:279) INFO - Throughput: 0.0 Tps
11:38:37,521 (DBWorkload.java:708) INFO - **********************************************************************************
11:38:37,522 (DBWorkload.java:709) INFO - Rate limited reqs/s: Results(nanoSeconds=10000535262, measuredRequests=0) = 0.0 requests/sec
11:38:37,522 (ThreadBench.java:234) INFO - Starting WatchDogThread
11:38:37,538 (DBWorkload.java:574) INFO - Output into file: wikipedia.26.out
11:38:37,539 (DBWorkload.java:578) INFO - Output Raw data into file: wikipedia.27.out
Our result uploadercom.oltpbenchmark.util.ResultUploader@5cdc09e9
11:38:37,540 (DBWorkload.java:583) INFO - Output summary data into file: wikipedia.28.out
11:38:37,552 (DBWorkload.java:589) INFO - Output db config into file: wikipedia.29.out
11:38:37,588 (DBWorkload.java:595) INFO - Output benchmark config into file: wikipedia.30.out
11:38:37,652 (DBWorkload.java:604) INFO - Grouped into Buckets of 1 seconds

twitter sample config file points to wrong tracefiles

Current trace file names:

<tracefile>config/traces/tweets.txt</tracefile>
<tracefile2>config/traces/users.txt</tracefile2>

should point to ?
config/traces/twitter_tweetids.txt
config/traces/twitter_user_ids.txt

YCSB Loads are single threaded which is sub-optimal

Much faster loads could be achieved with multiple loading threads. Should the "terminals" config be re-used for this or should it be a separate config parameter I wonder? I haven't looked at all benchmarks but ycsb certainly is single threaded. The canonical YCSB implementation from yahoo has this feature which is nice.

Framework API is not compatiable with Java7

We need to fix our overridden implementations of PreparedStatement to conform to the new JDBC API in Java7.

    [javac] Compiling 277 source files to /var/lib/jenkins/jobs/OLTPBench/workspace/build
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] /var/lib/jenkins/jobs/OLTPBench/workspace/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java:124: error: FastPreparedStatement is not abstract and does not override abstract method isCloseOnCompletion() in Statement
    [javac]     public static class FastPreparedStatement implements PreparedStatement {
    [javac]                   ^
    [javac] /var/lib/jenkins/jobs/OLTPBench/workspace/src/com/oltpbenchmark/jdbc/AutoIncrementPreparedStatement.java:28: error: AutoIncrementPreparedStatement is not abstract and does not override abstract method isCloseOnCompletion() in Statement
    [javac] public class AutoIncrementPreparedStatement implements PreparedStatement {
    [javac]        ^

    [javac] 2 errors
    [javac] 1 warning```

I have already done this in H-Store, so I think it's a simple fix. It should also be backwards compatible with Java6.

Regression: test testLoad error

The test tests/com/oltpbenchmark/api/AbstractTestLoader:testLoad throws an error java.sql.SQLException: statement is not in batch mode. This is often caused by the batch being empty (no addBatch call prior to the executeBatch call).

It seems the reason is that the variable numWarehouses in TPCCLoader defaults to 0 in line 74. I am not quite sure what is the correct behaviour here.

Low TPS and High Latency for TPC-C Benchmark

I've been trying to run the TPC-C benchmark on a clean oracle database installation. The benchmark results are being reported with about 30s of latency and the database begins thrashing at 150 TPS.

The server has 112 2.2 GHz Xeon CPUs, 1 TB RAM, 9 TB storage, running Red Hat 7.1. We're running TPC-C with 100 terminals and a scale factor of 20 and the benchmark is being run from a different machine.

When I ran the benchmark previously, I was seeing very low latency and about 700 TPS, but I do not know what the settings of the database at the time was. We had to remove the database and have recently reinstalled it. Are there certain database settings in oracle that we need to change for the benchmark to work such as process limit?

auctionmark workload for oracle throws exception

02:26:38,823 (AuctionMarkLoader.java:222) INFO - *** START ITEM_ATTRIBUTE
02:26:46,280 (AuctionMarkLoader.java:281) INFO - *** FINISH USERACCT - 100000 tuples - [5 / 16]
02:26:46,280 (AuctionMarkLoader.java:222) INFO - *** START ITEM
02:26:46,857 (AuctionMarkLoader.java:262) WARN - ITEM_IMAGE - ORA-01400: cannot insert NULL into ("TPCC"."ITEM_IMAGE"."II_SATTR0")

java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("TPCC"."ITEM_IMAGE"."II_SATTR0")

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:58)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:943)
at oracle.jdbc.driver.OraclePreparedStatement.executeForRowsWithTimeout(OraclePreparedStatement.java:10932)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:11043)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:244)
at com.oltpbenchmark.benchmarks.auctionmark.AuctionMarkLoader.generateTableData(AuctionMarkLoader.java:257)
at com.oltpbenchmark.benchmarks.auctionmark.AuctionMarkLoader$AbstractTableGenerator.run(AuctionMarkLoader.java:418)
at java.lang.Thread.run(Thread.java:736)

java.lang.RuntimeException: Unexpected error while generating table data for 'ITEM_IMAGE'
at com.oltpbenchmark.benchmarks.auctionmark.AuctionMarkLoader$AbstractTableGenerator.run(AuctionMarkLoader.java:421)
at java.lang.Thread.run(Thread.java:736)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("TPCC"."ITEM_IMAGE"."II_SATTR0")

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:215)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:58)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:943)
at oracle.jdbc.driver.OraclePreparedStatement.executeForRowsWithTimeout(OraclePreparedStatement.java:10932)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:11043)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:244)
at com.oltpbenchmark.benchmarks.auctionmark.AuctionMarkLoader.generateTableData(AuctionMarkLoader.java:257)
at com.oltpbenchmark.benchmarks.auctionmark.AuctionMarkLoader$AbstractTableGenerator.run(AuctionMarkLoader.java:418)
... 1 more

SEATS throws RunTimeException loading 615 scale factor for postgres

Ran into this against commit 2777170 and PostgreSQL 9.6devel when executing:

./oltpbenchmark -b seats -c pgsql_seats_config.xml -d /tmp/seats --create=true --load=true --execute=false -s 5 -o seats-load

This is the exception:

Exception in thread "main" java.lang.RuntimeException: Failed to load data files for scaling-sized table 'FLIGHT'
at com.oltpbenchmark.benchmarks.seats.SEATSLoader.loadScalingTables(SEATSLoader.java:233)
at com.oltpbenchmark.benchmarks.seats.SEATSLoader.load(SEATSLoader.java:128)
at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:284)
at com.oltpbenchmark.api.BenchmarkModule.loadDatabase(BenchmarkModule.java:268)
at com.oltpbenchmark.DBWorkload.runLoader(DBWorkload.java:690)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:522)
Caused by: java.lang.RuntimeException: Failed to load table FLIGHT
at com.oltpbenchmark.benchmarks.seats.SEATSLoader.loadTable(SEATSLoader.java:381)
at com.oltpbenchmark.benchmarks.seats.SEATSLoader.loadScalingTables(SEATSLoader.java:231)
... 5 more
Caused by: java.sql.BatchUpdateException: Batch entry 3,578 INSERT INTO "FLIGHT" VALUES ('6263054459143207', '1063', '252', '2044-03-05 13:17:09.982000 +01:00:00', '220', '2044-04-16 06:17:09.982000 +02:00:00', '0', '399.0', '150', '147', '119473961', '522234765', '245083163', '1037492404', '965290148', '194851978', '498910712', '918737513', '25793002', '351066013', '916316086', '838095445', '222076132', '172059223', '647491246', '499935012', '163659104', '243064984', '677258309', '658175328', '777683295', '1007205247', '385051778', '564646543', '192302227', '360680948', '556245924', '586060419', '450169993', '805591215') was aborted. Call getNextException to see the cause.
at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2621)
at org.postgresql.core.v3.QueryExecutorImpl$1.handleError(QueryExecutorImpl.java:459)
at org.postgresql.core.v3.QueryExecutorImpl$ErrorTrackingResultHandler.handleError(QueryExecutorImpl.java:348)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1837)
at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1091)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:398)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2754)
at com.oltpbenchmark.benchmarks.seats.SEATSLoader.loadTable(SEATSLoader.java:367)
... 6 more

This is the config used:

<!-- Connection details -->
<dbtype>postgres</dbtype>
<driver>org.postgresql.Driver</driver>
<DBUrl>jdbc:postgresql://localhost:5432/seats</DBUrl>
<username>user</username>
<password>password</password>
<isolation>TRANSACTION_SERIALIZABLE</isolation>

<!-- Scalefactor in SEATS scales by *1000 the number of customers-->
<scalefactor>615</scalefactor>

<!-- The workload -->
<terminals>10</terminals>
<works>
    <work>
      <time>300</time>
      <rate>10000</rate>
      <weights>10, 10, 35, 20, 10, 15</weights>
    </work>
</works>

<!-- SEATS Procedures declaration -->
<transactiontypes>
    <transactiontype>
            <name>DeleteReservation</name>
    </transactiontype>
    <transactiontype>
            <name>FindFlights</name>
    </transactiontype>
    <transactiontype>
            <name>FindOpenSeats</name>
    </transactiontype>
    <transactiontype>
            <name>NewReservation</name>
    </transactiontype>
    <transactiontype>
            <name>UpdateCustomer</name>
    </transactiontype>
    <transactiontype>
            <name>UpdateReservation</name>
    </transactiontype>
</transactiontypes>

clearDatabase() is final in BenchmarkModule

Currently OLTPBench assumes that every database uses SQL as the standard way to talk to the database. While I can handle using a JDBC wrapper for my connections, my DB does not speak SQL.

Loading and execution works fine, however, clearing the database assumes that a SQL statement can be executed. Since the method is final I cannot override it, but I think it would make sense to allow overriding.

The best approach would be to add a method to the Loader that allows unloading, so that the encapsulation of the Benchmark module and the DB stays intact.

Multi Loader in TPCC

Current tpcc loader is single-threaded.
So I'm making tpcc multi-loader now.
I will make a pull request when it test passed.

Ambiguous mixed benchmark syntax

The work configuration syntax could be enhanced. Now, to specify an unlimited rate one has still to specify a non zero rate value.
I suggest a versatile value for a work, disabled unlimited int_value for the <rate> entry, for example:
1- Applies to all benchmarks:
<rate>100</rate>
<rate>unlimited</rate>
<rate>disabled</rate>

2- Applies to a specific benchmark (and overrides the global rate):
<rate bench="tpcc">disabled</rate>

Improve the developers guide

The Developer's Guide on the wiki is unfortunately mostly empty.

Now, adding a benchmark isn't too hard - add three new classes to extend Loader, Worker, and Procedure, and add a subclass of BenchmarkModule to tie it together, and whip up a config file. Add whatever other code you need to support your benchmark and you're set.

There are just a few things that I didn't think were immediately clear:

  1. -dialects.xml was a little bit of magic, and it was a surprise to discover that under the covers the SQL in the procedure code might get swapped out. It's a good way to do it, but it really needs to be documented.
  2. Is there anything non-obvious that I have to worry about in my worker code to be sure that I'm running at full speed? I want to be sure that I'm benchmarking the database, and not my code :)
  3. There's some code to pull remote stats from hosts (and some results reported for CPU and memory usage in the experiments section of the website), but I don't see how to invoke those stats.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.