Skip to main content

This repository contains a set of python scripts for helping tune any Linux system for performance and scale by leveraging the Linux perf tool and generating from the perf traces 2 HTML dashboards that represent Linux scheduler context switches and KVM events.

The basic dashboard illustrates general scheduler and KVM events for all tasks selected at capture time:

  • CPU Usage vs. context switches chart

  • KVM exit types distribution stacked bar charts (exit type distribution per task)

  • Summary CoreMap showing task scheduler core assignment and context switch count heat maps (run time % and context switch count on each core per task - including total time per core and per task)

The detailed dashboard illustrates detailed scheduler and KVM events at the task level:

  • context switch heat maps (temporal distribution of context switch events)

  • KVM exit heat maps (temporal distribution of kvm entry and exit events)

  • Temporal Coremaps (on which core does any given task run over time)

The task annotation feature further allows the generation of cross-run charts (diffs) that can help detect more easily differences of behavior across multiple captures/runs.

The capture script wraps around the Linux perf tool to capture events of interest (such as context switches and kvm events) and generates a much more compact binary file to be used for analysis offline.

Complete documentation including installation and usage instructions:

http://perfwhiz.readthedocs.org/

perfwhiz Workflow

The following diagram illustrates the 2 phases for getting the dashboards: capture phase (perfcap.py) and dashboard generation phase (perfmap.py).

images/perfwhiz.png

Capture is performed on the system under test, by invoking the perfcap.py script and specify which tasks to capture events from and for how long. The result of each capture is a binary file (with the cdict extension, cdict stands for compressed dictionary).

The binary files can then later be provided to the dashboard generation tool (perfmap.py) to generate the corresponding dashboards. This dashboard generation phase is typically done offline on a workstation where perfmap is installed (laptop, macbook…). The generated dashboards are HTML files that can be viewed using any browser.

Dependencies

Dependencies are automatically installed when perfwhiz is being installed (refer to the Installation section).

The capture tool perfcap.py depends on:

  • the Linux perf tool (compiled with the python extension)

  • pbr python package

  • msgpack python package

The dashboard generation tool perfmap.py depends on:

  • pandas/numpy python package

The generated HTML dashboards contain Javascript code that will pull some Javascript libraries from CDN servers when loaded in the browser (CDN is a public network of servers that contain libraries that are downloaded by browsers). Therefore, viewing those dashboards require access to the Internet. The following Javascript libraries are required by the dashboards:

  • jquery

  • datatables

  • d3

  • angular

  • angular-ui-bootstrap

  • pako (zlib inflate)

Licensing

perfwhiz is licensed under the Apache License, Version 2.0 (the “License”). You may not use this tool except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Perfwhiz includes a copy of umsgpack.py (MIT License) in its distribution (https://github.com/vsergeev/u-msgpack-python, many thanks to vsergeev)

Metadata

Release files for perfwhiz 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for perfwhiz 0.3.1
File Size Uploaded Provenance
perfwhiz-0.3.1.tar.gz 444.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for perfwhiz 0.3.1
File Interpreter ABI Platform
perfwhiz-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 495.9 kB

Release files / perfwhiz-0.3.1.tar.gz

Download URL perfwhiz-0.3.1.tar.gz
Size 444.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9910d144f7d1b1090b3dd65dc43fa5161dd5c9208acfa87c0269d0eca04fa2c4
BLAKE2b-256 checksum
How to use checksums
6027b91757881cbbdcd0f93e0cdc7be334b7e5f06ae11a9ae316fde45c043603
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / perfwhiz-0.3.1-py2.py3-none-any.whl

Download URL perfwhiz-0.3.1-py2.py3-none-any.whl
Size 51.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
95f1250d1cfa757e34bc5ba2244b875b0321e7e99ee20256f0671651f9b6dc89
BLAKE2b-256 checksum
How to use checksums
140445705bf2a8bfd4d396ba381dc31b2f364ff3499190fd408f753b3088c1db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for perfwhiz 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page