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.
Please click the below thumbnail to show the short demo video.
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:
How can I install a kernel that is built with
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 more fresh. A higher version number means it is more recently released.
pip3 install damo installs the latest version of
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,
next branch of the source tree and use
damo executable file in
$ git clone https://github.com/awslabs/damo -b next
How can I participate in the development of
Please refer to CONTRIBUTING file.
Recording Data Access Patterns
Below commands record memory access patterns of a program and save the
monitoring results in
$ 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
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.pngwill 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.pngwill show the distribution of the working set size.
wss_chron_change.pngwill show how the working set size has chronologically changed.
You can show the images on a web page . Those made with other realistic workloads are also available [2,3,4].
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>