Performance Tracing Tool

IoTDB supports the use of TRACING statements to enable and disable performance tracing of query statements, which is disabled by default. Users can use performance tracking tool to analyze potential performance problems in some queries. By default, the log files for performance tracing are stored in the directory ./data/tracing.

Turn on Tracing:

IoTDB> TRACING ON

Turn off Tracing:

IoTDB> TRACING OFF

Since the cost of an IoTDB query mainly depends on the number of time series queried, the number of tsfile files accessed, the total number of chunks to be scanned, and the average size of each chunk (the number of data points contained in the chunk). Therefore, the current performance analysis includes the following contents:

  • Start time
  • Query statement
  • Number of series paths
  • Number of sequence files
  • Statistics of each sequence file
  • Number of unSequence files
  • Statistics of each unSequence file
  • Number of chunks
  • Average size of chunks
  • Total cost time

Example

For example, execute select * from root, the contents of the tracing log file will include the following contents:

  1. Query Id: 2 - Start time: 2020-06-28 10:53:54.727
  2. Query Id: 2 - Query Statement: select * from root
  3. Query Id: 2 - Number of series paths: 3
  4. Query Id: 2 - Number of sequence files: 1
  5. Query Id: 2 - SeqFile_1603336100446-1-0.tsfile root.sg.d1[1, 10000]
  6. Query Id: 2 - Number of unsequence files: 1
  7. Query Id: 2 - UnSeqFile_1603354798303-2-0.tsfile root.sg.d1[9, 1000]
  8. Query Id: 2 - Number of chunks: 3
  9. Query Id: 2 - Average size of chunks: 4113
  10. Query Id: 2 - Total cost time: 11ms

In order to avoid disordered output information caused by multiple queries being executed at the same time, the Query ID is added before each output information. Users can use grep "Query ID: 2" tracing.txt to extract all tracing information of one query.