Ignite 3
Edit

Performance Statistics Extension

Overview

The extension provides utilities to create the report and print statistics from the collected files.

Building the Report

The extension provides a tool to generate an offline HTML report from performance statistics files.

Follow these steps to build the performance report:

  1. Stop collecting statistics and place files from all nodes under an empty directory. For example:

    /path_to_files/
        ├── node-162c7147-fef8-4ea2-bd25-8653c41fc7fa.prf
        ├── node-162c7147-fef8-4ea2-bd25-8653c41fc7fa-system-views.prf
        ├── node-7b8a7c5c-f3b7-46c3-90da-e66103c00001.prf
        └── node-7b8a7c5c-f3b7-46c3-90da-e66103c00001-system-views.prf

    node-*-system-views*.prf files are stored next to regular performance statistics files. If the system view files are too large, you can omit them. The report will still be generated, but without System views data.

  2. Run the script from the release package of the tool:

performance-statistics-tool/build-report.sh path_to_files

The performance report is created in the new directory under the performance statistics files: path_to_files/report_yyyy-MM-dd_HH-mm-ss/. Open report_yyyy-MM-dd_HH-mm-ss/index.html in the browser to see the report.

The report includes Cluster info, Cache operations, Transactions, SQL queries, Scan queries, Index queries, Tasks and jobs, and System views. When node-*-system-views*.prf files are available in the input directory, the System views tab is populated with their data.

For more details run the help command:

performance-statistics-tool/build-report.sh --help

HTML Report Tabs

Cluster info

Cluster topology and caches found in the input files: Cluster nodes and Started caches tables.

Cluster info report

Cache operations

Cache and cache store activity for the selected cache and node. Cache and node selectors filter all charts on the page.

A bar chart summarizes the distribution of cache operation counts by type:

Distribution of cache operations

For each operation type, a line chart shows the operation count over time:

Cache operation count over time

The Cache store operations section provides the same breakdowns for cache store calls. A distribution chart summarizes cache store operation counts by type:

Distribution of cache store operations

Line charts show cache store operation counts over time:

Cache store operation count over time

Transactions

Transaction activity for the selected cache and node. A histogram shows the distribution of transaction durations:

Transactions histogram

Below it, line charts plot commit and rollback counts over time:

Transactions commit chart

SQL queries

Aggregated SQL query statistics. The Overall statistics table shows total executions, duration, and reads for each query. Each row expands into a Properties subtable with map and reduce phase plans, and a Rows subtable with rows fetched on mapper and reducer nodes:

SQL queries overall statistics

The Top of slowest queries table lists slow query executions with the same expandable details:

Top of slowest SQL queries

Scan queries

Aggregated scan query statistics by cache and the slowest scan queries: Overall statistics and Top of slowest queries tables.

Scan queries report

Index queries

Aggregated index query statistics and the slowest index queries: Overall statistics and Top of slowest queries tables.

Index queries report

Tasks and jobs

Aggregated task execution statistics. The Overall statistics table shows executions, total duration, and job counts per task:

Tasks and jobs overall statistics

The Top of slowest tasks table lists slow task executions. Each row expands into a Jobs subtable with per-node job durations:

Top of slowest tasks with jobs subtable

System views

Rows from collected system views. The tab provides a node selector, a system view selector, and a searchable paginated table for the selected view.

System views report

The extension provides a tool to print raw performance statistics records to the console or to a file in JSON format. Use this tool when you need access to individual records.

Run the script from the release package of the tool to print statistics:

performance-statistics-tool/print-statistics.sh path_to_files

Note that path_to_files can point either to a single performance statistics file or to a directory with multiple files.

The tool supports the following options:

Option Description

--out out_file

Appends JSON output to the specified file.

--ops op_types

Prints only the specified comma-separated operation types.

--from start_time_from

Prints only records whose start time is greater than or equal to the specified value (Unix epoch milliseconds).

--to start_time_to

Prints only records whose start time is less than or equal to the specified value (Unix epoch milliseconds).

--caches cache_names

Prints only records related to the specified comma-separated cache names.

For more details run the help command:

performance-statistics-tool/print-statistics.sh --help

Examples:

performance-statistics-tool/print-statistics.sh path_to_files --ops QUERY,QUERY_ROWS,QUERY_PROPERTY
performance-statistics-tool/print-statistics.sh path_to_files --ops SYSTEM_VIEW_ROW
performance-statistics-tool/print-statistics.sh path_to_files --ops CHECKPOINT,PAGES_WRITE_THROTTLE
performance-statistics-tool/print-statistics.sh path_to_files --from 1713700000000 --to 1713703600000
performance-statistics-tool/print-statistics.sh path_to_files --caches cache1,cache2 --out perfstat.json

See the output example below:

{"op":"CACHE_GET","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheId":-1809642915,"startTime":1616837094237,"duration":64992213}
{"op":"CACHE_PUT","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheId":-1809642915,"startTime":1616837094237,"duration":879869}
{"op":"CACHE_GET_AND_PUT","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheId":1328364293,"startTime":1616837094248,"duration":17186240}
{"op":"TX_COMMIT","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","cacheIds":[-1809642915],"startTime":1616837094172,"duration":184887787}
{"op":"QUERY","nodeId":"955130d1-5218-4e46-87f6-62755e92e9b4","type":"SQL_FIELDS","text":"create table Person (id int, val varchar, primary key (id))","id":0,"startTime":1616837094143,"duration":258741595,"success":true}