A benchmark for Chronix and other time series databases (TSDB)
-
Server:
- Ubuntu 12.04 or later. (any Linux distro with installed GNU Coreutils should work, but tested is only Ubuntu)
Mac OS X El Capitan is also supported. - 16GB of RAM
- Installed Java 8 or later
- Installed and running docker
- SSD is recommanded.
- Ubuntu 12.04 or later. (any Linux distro with installed GNU Coreutils should work, but tested is only Ubuntu)
-
Client:
#####Server:
- Download the benchmark server part(link) to your server.
- Unzip the downloaded file to a folder of your liking.
- In terminal go to that folder and start the server:
java -Xmx8g -jar server.jar server DropWizardServer.yaml
#####Client:
- Download the benchmark client part(link)
- Unzip the downloaded file to a folder of your liking.
- In terminal go to that folder and setup the client:
-
Add a TSDB to the benchmark:
java -jar client.jar setup add [server] [tsdbName] [hostPort:containerPort] ["additionalDockerOptionsString"] [<TSDB>.jar] [dockerFilesFolder]
example: (NOTE: paths must be absolute)
java -jar client.jar setup add localhost yourTsdbName 4711:4711 "-v /dataFolderOfYourTSDBinContainer" /path/yourTsdb.jar /path/yourDockerFilesFolder
java -jar client.jar setup upload localhost
java -jar client.jar build localhost yourTsdbName
-
- Create a Dockerfile which provides the environment for your TSDB and also give instructions to the Dockerfile to install and start the TSDB. (Examples can be found here)
- Add DatabaseInterface.jar(link) to a Project and implement the BenchmarkDataSource interface with a class for your TSDB. (example for chronix can be found here)
- Build a fat jar of your BenchmarkDataSource interface implementation, for example with shadowjar.
- Provide the necessary docker files and the fat jar of your TSDB to the client: see "Installation Client"
- Data has to be in csv format (could also be gzipped) and has to conform to:
- File format: /measurement/host_process_group_metric.csv.(gz)
-
file header line: Date;metricName1;metricName2;...
-
file data: 2015-03-04T13:59:46.673Z;0.0;0.0;...
- In terminal convert the csv data to json files:
java -jar client.jar convert [csvFilesDirectory1] [csvFilesDirectory2] ...
- In terminal import the converted data to the TSDBs on the benchmark server: (adjust batchSize if you run out of memory)
java -jar client.jar import [server] [batchSize] [fromFile] -t [tsdbName1] -t [tsdbName2] ... -d [directoryToImport1] -d [directoryToImport2] ...
- example:
java -jar client.jar start localhost someTsdb
java -jar client.jar import localhost 25 0 -t someTsdb -d /path/chronixBenchmark/timeseries_records/someFolder
- From the previously imported data generate a set of random time series which will be queried in later benchmarks
java -jar client.jar generate [timeSeries_count_per_query] [total_count_of_queries] [timeSeries_count_per_rangeQuery]
- example:
java -jar client.jar generate 400 1600 50
- Start the TSDB(s) you want to benchmark: (example)
java -Xmx8g -jar client.jar start localhost someTsdb
- Start the benchmark: (example)
java -Xmx8g -jar client.jar benchmark localhost someTsdb
- Analyze time series: (takes some time depending on your data)
java -jar client.jar stats timeseries
- Generate bar diagrams: (under /path/chronixBenchmark/statistics/bar_plots
java -jar client.jar stats plot