Skip to content

Conversation

@NSAmelchev
Copy link
Contributor

@NSAmelchev NSAmelchev commented Jun 10, 2020

Cluster profiling tool based on logging performance statistics to files. See apache/ignite#7693

Run command to build the tool: mvn clean install
Release archive will be be under the directory: modules/performance-statistics-ext/target/release-package-ignite-performance-statistics.zip

To collect statistics in runtime and to build the performance report follow:

  1. Start collecting performance statistics in the cluster. See PerformanceStatisticsMBean
  2. Collect workload statistics.
  3. Stopcollecting performance statistics in the cluster.. See PerformanceStatisticsMBean
  4. Collect performance statistics files from all nodes under an empty directory.
  5. Run script build-report.sh path_to_files to build the performance report.

The report contains statistics:

  • cache operations: get|getAll|put|putAll|remove|removeAll|getAndPut|getAndRemove|lock|invoke|invokeAll
  • transaction commit, rollback; histogram of transaction durations
  • SQL, SCAN queries, top of slowest queries
  • Tasks and jobs. Top of slowest tasks
  • cluster info

Copy link
Member

@samaitra samaitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I observed we have an open PR in ignite repo for this feature with different set of changes.

apache/ignite#7693

Can you please share more info on how we can use the profiling tool with ignite-extensions modules?

@NSAmelchev NSAmelchev marked this pull request as draft June 11, 2020 08:04
@NSAmelchev NSAmelchev marked this pull request as ready for review June 15, 2020 07:52
@@ -0,0 +1,48 @@
Apache Ignite Profiling Module
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add license header

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project's readme-files does not contain a license header. Why we should add it?

http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>profiling-report-sources</id>

<includeBaseDirectory>false</includeBaseDirectory>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please share details on this base dir flag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have excluded base directory from UI sources archive:
report.zip/{sources}
instead of
report.zip/report/{sources}

* Version: 2.7.3
*
* Copyright 2018 Chart.js Contributors
* Released under the MIT license
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we ok to use mix of MIT and Apache license?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, I have mentioned these components in the LICENSE file.

@@ -0,0 +1,2 @@
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to add license header in this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have clarified the license.

Query query = new Query(type, text, queryNodeId, id, startTime, duration, success);

OrderedFixedSizeStructure<Long, Query> tree = topSlow.computeIfAbsent(type,
t -> new OrderedFixedSizeStructure<>());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename t to a variable name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

long physicalReads) {

Map<Long, long[]> ids = readsById.computeIfAbsent(type, t -> new HashMap<>())
.computeIfAbsent(queryNodeId, k -> new HashMap<>());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we rename k to a variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

@samaitra samaitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed and shared comments

Copy link
Member

@samaitra samaitra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@samaitra
Copy link
Member

@NSAmelchev There is conflicts in this PR, can you please resolve the conflict and then go ahead and merge the changes.

@NSAmelchev NSAmelchev marked this pull request as draft July 13, 2020 06:34
@NSAmelchev NSAmelchev marked this pull request as ready for review December 3, 2020 08:54
@NSAmelchev NSAmelchev changed the title IGNITE-12666 Provide cluster performance profiling tool IGNITE-13860 Provide the tool to build cluster performance report Dec 16, 2020
#
# Run tool.
#
Java ${JVM_OPTS} -cp "${CP}" ${MAIN_CLASS} $@
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Java -> java

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

<resource>
<directory>${basedir}/target</directory>
<includes>
<include>report.zip</include>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include UI resources as a directory not zip archive?

@nizhikov
Copy link
Contributor

@NSAmelchev Can we modify build process so it will download css, js resources in the build time?
I think we shouldn't store css or js resources in Ignite repository.

@nizhikov nizhikov merged commit fd7aafd into apache:master Dec 22, 2020
@NSAmelchev NSAmelchev deleted the ignite-12666 branch April 7, 2021 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants