Skip to main content

Tools for Linux perf

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perfwhiz-0.2.3.tar.gz (438.2 kB view details)

Uploaded Source

Built Distribution

perfwhiz-0.2.3-py2.py3-none-any.whl (46.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file perfwhiz-0.2.3.tar.gz.

File metadata

  • Download URL: perfwhiz-0.2.3.tar.gz
  • Upload date:
  • Size: 438.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for perfwhiz-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f03bf8ebc0af66e583b6ffc46c3d2619d4f74171170dfc2c676023d7d6551271
MD5 f24efc27fc2b1367e93cdde31b131aa3
BLAKE2b-256 cf8dd5c09292ececad211eed0101c9793587c6eda55b0d04a1b22c9b01182be6

See more details on using hashes here.

File details

Details for the file perfwhiz-0.2.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for perfwhiz-0.2.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2c0ff28ccf1e5265ebaa8f8d35e19b84a70b54de3f0763f17785ab3a221eee3e
MD5 07b92f936bd27f9b759af94d013ebdda
BLAKE2b-256 fe4a5ca23dac9d2b3f0658f5d32bd2f8a2144a1a06d89a567694c810e8db0212

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page