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.

Demo Video

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

DAMON: a demo for the Kernel Summit 2020

Getting Started

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

$ # ensure your kernel is built with CONFIG_DAMON_*=y
$ sudo mount -t debugfs none /sys/kernel/debug/
$ sudo pip3 install damo
$ sudo damo record $(pidof <your workload>)
$ damo report heats --heatmap stdout --stdout_heatmap_color emotion

The last command will show the access pattern of your workload, like below:

masim zigzag heatmap in ascii masim stairs heatmap in ascii

FAQs

How can I install a kernel that is built with CONFIG_DAMON_*=y?

Please refer to 'Install' section of https://damonitor.github.io/.

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 number mean?

Nothing at all but indicate which version is fresher. 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/awslabs/damo -b next
$ sudo ./damo/damo record $(pidof <your workload>)

How can I participate in the development of damo?

Please refer to CONTRIBUTING file.

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 &
$ 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 access_pattern_heatmap.png
$ damo report wss --range 0 101 1 --plot wss_dist.png
$ damo report wss --range 0 101 1 --sortby time --plot wss_chron_change.png
  • 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 three commands make 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 a modest performance overhead.

$ echo "#min-size max-size min-acc max-acc min-age max-age action" > my_scheme
$ echo "4K        max      0       0       60s     max     pageout" >> my_scheme
$ sudo damo schemes -c my_scheme <pid of your workload>

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

damo-1.0.2.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

damo-1.0.2-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: damo-1.0.2.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.9

File hashes

Hashes for damo-1.0.2.tar.gz
Algorithm Hash digest
SHA256 82d3e3c4a0fd9172bf4e671e4729b6c06f4a9663e40f7c9af9597e10e3f4ebc9
MD5 f53628e8a5ceb2a7ddfe5542f4e00d8d
BLAKE2b-256 bb3e93def6f3475958395159f3bb2159ea0dbdf429fcd8b2f9ccb6f6ed1d7cb0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: damo-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.0 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.9

File hashes

Hashes for damo-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e92fadeb91dd50bef436312ac02aef4a7375bc76167105af30c93f403da556c5
MD5 267d105bad633bd6b07e57bb576889a7
BLAKE2b-256 8b1c1f9e77a98bf3cc02860b29fc991bb515b1ee6782fc3f76603e28de9328fb

See more details on using hashes here.

Supported by

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