Skip to main content

DAMON user-space tool

Project description

DAMO: Data Access Monitoring Operator

damo is a user space tool for DAMON. Using this, you can monitor the data access patterns of your system or workloads and make data access-aware memory management optimizations.

Official Repositories

Official git repos for damo are hosted on kernel.org and GitHub:

Note that the repo under awslabs GitHub organization (https://github.com/awslabs/damo) was used as the official repo before. It will be no more official repo that maintained by DAMON maintainer after 2024-09-05.

Demo Video

Please click the below thumbnail to show the short demo video.

DAMON: a demo for the Kernel Summit 2020

Getting Started

Packaging status

Follow below instructions and commands to monitor and visualize the access pattern of your workload.

$ # ensure DAMON is enabled on your kernel
$ # install damo using packaging systems listed above,
$ # or cloning the source repo and updating $PATH.
$ sudo damo start $(pidof <your workload>)
$ sudo damo show
$ sudo damo record ongoing
$ sudo damo report heats --heatmap stdout --stdout_heatmap_color emotion

The second and last commands will show the access pattern of your workload, like below:

masim_stairs_snapshot masim stairs heatmap in ascii

FAQs

How can I ensure DAMON is enabled on my kernel?

Please refer to 'Install' section of the project webpage.

Where can I get more detailed usage?

The below sections provide quick introductions for damo's major features. For more detailed usage, please refer to USAGE.md file.

What does the version numbers mean?

Nothing at all but indicate which version is more fresh. A higher version number means it is more recently released.

Will pip3 install damo install the latest version of damo?

It will install the latest stable version of damo. If you want, you can also install less stable but more fresh damo from source code. For that, fetch the next branch of the source tree and use damo executable file in the tree.

$ git clone https://github.com/damonitor/damo -b next

How can I participate in the development of damo?

Please refer to CONTRIBUTING file.

Why some features are not documented on USAGE.md file?

Because those are not yet stabilized. In other words, such features are in their experimental stages, and therefore could be deprecated and removed without notice and grace periods. The documented features could also be deprecated, but those will provide some notifications and grace periods. If there are some features you're relying on but not documented, please report your usecase to the community.

How can I know deprecation schedule and alternatives of specific features?

The list of features that will be, or already deprecated, the deprecation schedule, and their alternatives are summarized in FEATURES_DEPRECATION_SCHEDULE.md file.

Quick Intro for Major Features

Below are quick introductions for damo's major features. For more detailed usage, please refer to USAGE.md file.

Snapshot Data Access Pattern

Below commands repeatedly get a snapshot of the access pattern of a program for every second.

$ git clone https://github.com/sjp38/masim
$ cd masim; make; ./masim ./configs/zigzag.cfg --silent &
$ sudo damo start --target_pid $(pidof masim)
$ while :; do sudo damo show; sleep 1; done

The first two lines of the commands get an artificial memory access generator program and run it in the background. It will repeatedly access two 100 MiB-sized memory regions one by one. You can substitute this with your real workload.

The third line asks damo to start monitoring the access pattern of the process. Finally, the last line retries a snapshot of the monitoring results every second and show on terminal.

Recording Data Access Patterns

Below commands record memory access patterns of a program and save the monitoring results in damon.data file.

$ git clone https://github.com/sjp38/masim
$ cd masim; make; ./masim ./configs/zigzag.cfg --silent &
$ sudo damo record -o damon.data $(pidof masim)

The first two lines of the commands get an artificial memory access generator program and run it in the background. It will repeatedly access two 100 MiB-sized memory regions one by one. You can substitute this with your real workload. The last line asks damo to record the access pattern in damon.data file.

Visualizing Recorded Patterns

Below three commands visualize the recorded access patterns into three image files.

$ damo report heats --heatmap stdout
$ damo report wss --range 0 101 1
$ damo report wss --range 0 101 1 --sortby time --plot
  • access_pattern_heatmap.png will show the data access pattern in a heatmap, which shows when (x-axis) what memory region (y-axis) is how frequently accessed (color).
  • wss_dist.png will show the distribution of the working set size.
  • wss_chron_change.png will show how the working set size has chronologically changed.

You can show the images on a web page [1]. Those made with other realistic workloads are also available [2,3,4].

[1] https://damonitor.github.io/doc/html/latest/admin-guide/mm/damon/start.html#visualizing-recorded-patterns
[2] https://damonitor.github.io/test/result/visual/latest/rec.heatmap.1.png.html
[3] https://damonitor.github.io/test/result/visual/latest/rec.wss_sz.png.html
[4] https://damonitor.github.io/test/result/visual/latest/rec.wss_time.png.html

Data Access Pattern Aware Memory Management

Below command makes every memory region of size >=4K that hasn't accessed for

=60 seconds in your workload to be swapped out. By doing this, you can make your workload more memory efficient with only modest performance overhead.

$ sudo damo start --damos_access_rate 0 0 --damos_sz_region 4K max \
                    --damos_age 60s max --damos_action pageout \
                    <pid of your workload>

Holistic Memory Usage Monitoring

You can also show access pattern heatmap, memory footprints, and hotspot functions of the system and/or workloads all at once in live, like below.

damo monitor demo for water_nsquared

Project details


Release history Release notifications | RSS feed

This version

2.5.0

Download files

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

Source Distribution

damo-2.5.0.tar.gz (80.5 kB view details)

Uploaded Source

Built Distribution

damo-2.5.0-py3-none-any.whl (99.1 kB view details)

Uploaded Python 3

File details

Details for the file damo-2.5.0.tar.gz.

File metadata

  • Download URL: damo-2.5.0.tar.gz
  • Upload date:
  • Size: 80.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for damo-2.5.0.tar.gz
Algorithm Hash digest
SHA256 a8b61bd3c44b3bde040ecb10606987192b2220e44b00b7e188674b017d1a1b6f
MD5 653da7f1c899b0e13cc845b17ed72d4f
BLAKE2b-256 80a982a7b1b5aa8fb36322ef744110394b454f48a143d3f79063b66ff831ed36

See more details on using hashes here.

File details

Details for the file damo-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: damo-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 99.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for damo-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 464daa2c460d3a1dbf90bd6e0fdfdcaf47323c66bb2291c49320250f478c37ad
MD5 778947a4cd2de433d0260cbdd27ef246
BLAKE2b-256 9f7fbf55e2efa9af83fa46afe9fce01a91e798cb198519be7fafbcbdcee17c77

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