Download the Benchmark

Download the benchmark source and extract the archive contents:

  • the source code of the benchmark,
  • MySQL stored procedures for this benchmark,
  • a utility script to reset the InfoPlus.21 database.

Configuration

All common parameters for this benchmark are defined in the header config.h:

  • CFG_ANA_TAGS: number of analog tags,
  • CFG_TOR_TAGS: number of boolean tags,
  • CFG_R0_1_CNT: number of Q0.1 queries (insert),
  • CFG_R0_2_CNT: number of Q0.2 queries (insert),
  • CFG_R1_1_CNT: number of Q1.1 queries (update),
  • CFG_R1_2_CNT: number of Q1.2 queries (update),
  • CFG_R2_1_CNT: number of Q2.1 queries,
  • CFG_R2_2_CNT: number of Q2.2 queries,
  • CFG_R3_1_CNT: number of Q3.1 queries,
  • CFG_R3_2_CNT: number of Q3.2 queries,
  • CFG_R4_CNT: number of Q4 queries,
  • CFG_R5_CNT: number of Q5 queries,
  • CFG_R6_CNT: number of Q6 queries,
  • CFG_R7_CNT: number of Q7 queries,
  • CFG_R8_CNT: number of Q8 queries,
  • CFG_R9_CNT: number of Q9 queries,
  • CFG_R10_CNT: number of Q10 queries,
  • CFG_R11_1_CNT: number of Q11.1 queries,
  • CFG_R11_2_CNT: number of Q11.2 queries,
  • CFG_SELECT_CNT: everage number of tuples accessed by range queries,
  • CFG_SELECT_ONLY: set to 1 to disable Q0 and Q1 queries,
  • CFG_SEED: seed for the random number generator,
  • CFG_STARTDATE: value of the first inserted timestamp,
  • CFG_CREATEDATE: minimum value of creation dates,
  • CFG_TSINCR_MIN: minimum increment between two consecutive timestamps (in ms),
  • CFG_TSINCR_MAX: maximum increment between two consecutive timestamps (in ms),
  • CFG_UNIT: maximum value of units,
  • CFG_PERIOD: maximum value of intervals,
  • CFG_LABEL_LEN: maximum length of labels.

Since configuration variables are written in a header, the benchmark must be recompiled to take any change into account:

$ make clean && make target

Output

The output of this benchmark is used to:

  • get the duration of each phase of the benchmark,
  • roughly validate the results of queries between benchmarked systems,
  • log parameters used for the run.

For example, a commented output for a run with Berkeley DB follows.

date: 2013-01-23 17:00:06      /* system date at the start of the run */
dbms: Berkeley DB              /* DBMS name */
version: 5.3.21                /* DBMS version */
filesystem: ext4               /* File system used */

ANA_TAGS: 10                   /* List of configuration variable */
TOR_TAGS: 10
R0.1_COUNT: 1000000
R0.2_COUNT: 1000000
R1.1_COUNT: 5
R1.2_COUNT: 5
R2.1_COUNT: 5
R2.2_COUNT: 5
R3.1_COUNT: 5
R3.2_COUNT: 5
R4_COUNT: 5
R5_COUNT: 5
R6_COUNT: 5
R7_COUNT: 5
R8_COUNT: 5
R9_COUNT: 5
R10_COUNT: 5
R11.1_COUNT: 1
R11.2_COUNT: 1
SELECT_AVG_POINTS: 10000
SELECT_ONLY: 0
SEED: 123
STARTDATE: 1251987061253 (2009-09-03 14:11:01.253)

dbms-specific options:         /* List of DBMS-specific options */
pagesize: 4096
cachesize: 104857600
lg_regionmax: 10485760
lk_max_objects: 10000
partitions: none
data_path: /tmp/BDB/
DB_TXN_NOSYNC
DB_READ_UNCOMMITTED
DB_CURSOR_BULK

Benchmark start: 1358956806    /* Unix timestamp at this point */
Benchmark initialization OK (0.192348sec)  /* Phase duration: initialization of the benchmark */
init duration : 2.7e-05sec     /* Phase duration: initialization of the database */
R0.1 start: 1358956806         /* Unix timestamp at this point */
R0.1 end: 1358956808           /* Unix timestamp at this point */
R0.1 duration : 1.46797sec     /* Phase duration: R0.1 */
R0.2 start: 1358956809
R0.2 end: 1358956810
R0.2 duration : 1.43338sec     /* Phase duration: R0.2 */
R1.1 start: 1358956811
R1.1 end: 1358956811
R1.1 duration : 0.000317sec    /* Phase duration: R1.1 */
R1.2 start: 1358956811
R1.2 end: 1358956811
R1.2 duration : 0.000234sec    /* Phase duration: R1.2 */
R2.1 start: 1358956811
R2.1: nb_rows = 9892           /* Number of rows in the result of the 1st R2.1 query */
R2.1: nb_rows = 10089          /* Number of rows in the result of the 2nd R2.1 query */
R2.1: nb_rows = 9912           /* Number of rows in the result of the 3rd R2.1 query */
R2.1: nb_rows = 10124          /* Number of rows in the result of the 4th R2.1 query */
R2.1: nb_rows = 9917           /* Number of rows in the result of the 5th R2.1 query */
R2.1 end: 1358956811
R2.1 duration : 0.026774sec    /* Phase duration: R2.1 */
R2.2 start: 1358956811
R2.2: nb_rows = 10118          /* Number of rows in the result of the 1st R2.2 query */
R2.2: nb_rows = 9960           /* Number of rows in the result of the 2nd R2.2 query */
R2.2: nb_rows = 10146          /* Number of rows in the result of the 3rd R2.2 query */
R2.2: nb_rows = 9951           /* Number of rows in the result of the 4th R2.2 query */
R2.2: nb_rows = 10016          /* Number of rows in the result of the 5th R2.2 query */
R2.2 end: 1358956811
R2.2 duration : 0.022647sec
R3.1 start: 1358956811
R3.1: count(*) = 9764          /* Result of the 1st R3.1 query */
R3.1: count(*) = 10092         /* Result of the 2nd R3.1 query */
R3.1: count(*) = 10219         /* Result of the 3rd R3.1 query */
R3.1: count(*) = 10129         /* Result of the 4th R3.1 query */
R3.1: count(*) = 9997          /* Result of the 5th R3.1 query */
R3.1 end: 1358956811
R3.1 duration : 0.02228sec
R3.2 start: 1358956811
R3.2: count(*) = 9898          /* Result of the 1st R3.2 query */
R3.2: count(*) = 9859
R3.2: count(*) = 10148
R3.2: count(*) = 9841
R3.2: count(*) = 9898
R3.2 end: 1358956811
R3.2 duration : 0.022727sec
R4 start: 1358956811
R4: sum(value) = 2.18625e+38   /* Result of the 1st R4 query */
R4: sum(value) = -1.73561e+39
R4: sum(value) = 1.42424e+39
R4: sum(value) = -2.2186e+39
R4: sum(value) = -2.78665e+39
R4 end: 1358956811
R4 duration : 0.022551sec
R5 start: 1358956811
R5: avg(value) = 1.13517e+35   /* Result of the 1st R5 query */
R5: avg(value) = 3.2967e+35
R5: avg(value) = 2.57183e+35
R5: avg(value) = -2.1082e+35
R5: avg(value) = -1.85462e+35
R5 end: 1358956811
R5 duration : 0.02238sec
R6 start: 1358956811
R6: min(value) = -3.36049e+38, max(value) = 3.36951e+38     /* Result of the 1st R6 query */
R6: min(value) = -3.37284e+38, max(value) = 3.37935e+38
R6: min(value) = -3.31626e+38, max(value) = 3.09644e+38
R6: min(value) = -3.36566e+38, max(value) = 3.40259e+38
R6: min(value) = -3.36871e+38, max(value) = 3.36193e+38
R6 end: 1358956811
R6 duration : 0.022449sec
R7 start: 1358956811
R7: nb_rows = 1613             /* Number of rows in the result of the 1st R7 query */
R7: nb_rows = 490
R7: nb_rows = 3795
R7: nb_rows = 4639
R7: nb_rows = 254
R7 end: 1358956811
R7 duration : 0.023151sec
R8 start: 1358956811
R8: nb_rows = 7565             /* Number of rows in the result of the 1st R8 query */
R8: nb_rows = 6584
R8: nb_rows = 3724
R8: nb_rows = 8008
R8: nb_rows = 8131
R8 end: 1358956811
R8 duration : 0.022656sec
R9 start: 1358956811
R9: label = "JlHGdV;", count(*) = 6428      /* Result of the 1st R9 query */
R9: label = "JlHGdV;", count(*) = 6436
R9: label = "JlHGdV;", count(*) = 6447
R9: label = "JlHGdV;", count(*) = 6414
R9: label = "JlHGdV;", count(*) = 6457
R9 end: 1358956811
R9 duration : 0.226008sec
R10 start: 1358956811
R10: id = 2, count(*) = 465                 /* Result of the 1st R10 query */
R10: id = 2, count(*) = 495
R10: id = 1, count(*) = 478
R10: id = 2, count(*) = 480
R10: id = 2, count(*) = 477
R10 end: 1358956812
R10 duration : 0.222923sec
R11.1 start: 1358956812
R11.1: id = 1, value = -7.35988e+29         /* 1st line of the result of the R11.1 query */
R11.1: id = 2, value = 4.01007e+36          /* 2nd line of the result of the R11.1 query */
R11.1: id = 3, value = -4.38385e-16
R11.1: id = 4, value = -2.59971e+25
R11.1: id = 5, value = 1.27626e-11
R11.1: id = 6, value = 7.60274
R11.1: id = 7, value = -8.7742e-33
R11.1: id = 8, value = 4.97739e-05
R11.1: id = 9, value = 7.98909e-19
R11.1: id = 10, value = 8.38893e-32         /* 10th line of the result of the R11.1 query */
R11.1 end: 1358956812
R11.1 duration : 0.000171sec
R11.2 start: 1358956812
R11.2: id = 1, value = 0                     /* 1st line of the result of the R11.2 query */
R11.2: id = 2, value = 0
R11.2: id = 3, value = 1
R11.2: id = 4, value = 1
R11.2: id = 5, value = 0
R11.2: id = 6, value = 0
R11.2: id = 7, value = 0
R11.2: id = 8, value = 0
R11.2: id = 9, value = 1
R11.2: id = 10, value = 0                   /* 10th line of the result of the R11.2 query */
R11.2 end: 1358956812
R11.2 duration : 0.000204sec

Benchmarking MySQL

  1. Download and install MySQL.
  2. Edit the source file src/dbms-mysql.cc to:
    • set the database (MYSQL_DATABASE), user (MYSQL_USER) and socket file (MYSQL_SOCKET),
    • (recommended) update the functions version(), filesystem() and print_options() to reflect your configuration,
    • (optional) browse the source file to change various MySQL-specific options.
  3. Edit the Makefile for your MySQL installation path (MYSQL_HEADERFLAGS and MYSQL_LIBFLAGS)
  4. (recommended) edit your MySQL configuration file (my.cnf) to disable transactions, then restart MySQL.
  5. Edit the file misc/mysql-stored-procedures.sql to reflect the name of your MySQL database.
  6. Load MySQL stored procedures from the misc directory:
    $ mysql < misc/mysql-stored-procedures.sql
    
  7. Build the benchmark for MySQL:
    $ make mysql
    
  8. Run the benchmark, for example:
    $ ./benchmark > mysql.output
    

Benchmarking Berkeley DB

  1. Download and install Berkeley DB.
  2. Edit the source file src/dbms-berkeleydb.cc to:
    • set the data path (BDB_FOLDER),
    • (recommended) update the functions version(), filesystem() and print_options() to reflect your configuration,
    • (optional) browse the source file to change various Berkeley DB-specific options.
  3. Edit the Makefile for your Berkeley DB installation path (BDB_HEADERFLAGS and BDB_LIBFLAGS)
  4. Build the benchmark for Berkeley DB:
    $ make bdb
    
  5. Run the benchmark, for example:
    $ ./benchmark > berkeley_db.output
    

Benchmarking Chronos

  1. Download and install Chronos.
  2. Edit the source file src/dbms-chronos.cc to:
    • set the data path (CHR_DEVICE and CHR_FOLDER),
    • (recommended) update the functions version() and filesystem() to reflect your configuration,
  3. Edit the Makefile for your Chronos installation path (CHRONOS_HEADERFLAGS and CHRONOS_LIBFLAGS)
  4. Build the benchmark for Chronos:
    $ make chronos
    
  5. Run the benchmark, for example:
    $ ./benchmark > chronos.output
    

Benchmarking InfoPlus.21

I currently do not have access to any InfoPlus.21 server, so these instructions might be slightly inaccurate.

  1. Purchase and install InfoPlus.21.
  2. Edit the source file src/dbms-ip21.cc to:
    • (recommended) update the functions version(), filesystem() and print_options() to reflect your configuration,
    • (optional) set the batch retrieval size (MAX_OCC).
  3. Configure InfoPlus.21 for this benchmark:
    • create Ana tags with the following schema:
      • Ana
        • Label CHAR(40)
        • CreationDate TIMESTAMP
        • DestructionDate TIMESTAMP
        • Unit LONG
        • Interval LONG
        • ThresholdLow FLOAT
        • ThresholdHigh FLOAT
        • HistoryArchiving
        • HistoryRepository
        • HistoryArea
          • AltDate EXTENDED TIMESTAMP
          • AltValue FLOAT
          • Quality SHORT
    • create Bool tags with the following schema:
      • Bool
        • Label CHAR(40)
        • CreationDate TIMESTAMP
        • DestructionDate TIMESTAMP
        • Label0 CHAR(60)
        • Label1 CHAR(60)
        • HistoryArchiving
        • HistoryRepository
        • HistoryArea
          • AltDate EXTENDED TIMESTAMP
          • AltValue BOOLEAN
          • Quality SHORT
    • set the values of HistoryRepository according to your InfoPlus.21 repository configuration.
  4. Get GCC and Make for windows (for example, MinGW).
  5. Edit the Makefile for your InfoPlus.21 installation path (IP21_HEADERFLAGS and IP21_LIBFLAGS)
  6. Build the benchmark for InfoPlus.21:
    $ make ip21
    
  7. Run the benchmark, for example:
    $ ./benchmark > infoplus21.output
    
  8. A script is provided to reset the database (misc/ip21-reset.sql). This script must first be edited to set the correct HistoryRepository value.

Extend the benchmark

This benchmark can be extended to support other data management systems. This is realized by implementing the dbms class defined in the header file dbms.h. In this class, each query is associated with a function that provides the needed parameters and a callback that must be called with the results.

A few other required functions are used to:

  • Get informations displayed on the output: name(), version(), filesystem() and print_options().
  • Initialize data in the description tables ana_desc (insertAna) and bool_desc (insertBool)
  • Inform the dbms that the insertion phase is complete (flushR0_1 and flushR0_2)

Five implementations of this class are provided in the source code: one for MySQL, Berkeley DB and Chronos, and two version for InfoPlus.21. You can refer to these implementations to add another DBMS.

License

This benchmark is free software. It may be used, free of charge, for any purpose, including commercial purposes. This benchmark is distributed under the terms of the MIT License, reproduced here:

Copyright © 2012-2013 LIRIS, INSA de Lyon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.