* Regarding DAMON sysfs usage to get memory access stats
@ 2024-04-23 0:51 lokesh jaliminche
2024-04-26 20:04 ` SeongJae Park
0 siblings, 1 reply; 3+ messages in thread
From: lokesh jaliminche @ 2024-04-23 0:51 UTC (permalink / raw)
To: damon
Hi Everyone,
I am currently experimenting with DAMON to gather memory access
statistics for virtual address ranges associated with specific
processes. I have followed the detailed instructions provided in the
usage documentation, but it's unclear where to find the resulting
memory access statistics.
Any pointers on where to get these statistics?
Steps
# cd /sys/kernel/mm/damon/admin/
# echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
# echo vaddr > kdamonds/0/contexts/0/operations
# echo 1 > kdamonds/0/contexts/0/targets/nr_targets
# echo $(pidof masim) > kdamonds/0/contexts/0/targets/0/pid_target
# echo on > kdamonds/0/state
Thanks & Regards,
Lokesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regarding DAMON sysfs usage to get memory access stats
2024-04-23 0:51 Regarding DAMON sysfs usage to get memory access stats lokesh jaliminche
@ 2024-04-26 20:04 ` SeongJae Park
2024-04-27 21:18 ` lokesh jaliminche
0 siblings, 1 reply; 3+ messages in thread
From: SeongJae Park @ 2024-04-26 20:04 UTC (permalink / raw)
To: lokesh jaliminche; +Cc: SeongJae Park, damon
Hi Lokesh,
Sorry for late reply. Somehow I missed this mail.
On Mon, 22 Apr 2024 17:51:21 -0700 lokesh jaliminche <lokesh.jaliminche@gmail.com> wrote:
> Hi Everyone,
>
> I am currently experimenting with DAMON to gather memory access
> statistics for virtual address ranges associated with specific
> processes. I have followed the detailed instructions provided in the
> usage documentation, but it's unclear where to find the resulting
> memory access statistics.
> Any pointers on where to get these statistics?
>
> Steps
> # cd /sys/kernel/mm/damon/admin/
> # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
> # echo vaddr > kdamonds/0/contexts/0/operations
> # echo 1 > kdamonds/0/contexts/0/targets/nr_targets
> # echo $(pidof masim) > kdamonds/0/contexts/0/targets/0/pid_target
> # echo on > kdamonds/0/state
After the above steps, you can get the monitoring results from 'tried_regions'
directory[1] of the sysfs interface, or by collecting damon:damon_aggregatred
tracepoint[2].
However, I'd recommend using the user-space tool, 'damo'[3], if you could. It
provides more human-friendly interface and visualization of the monitoring
results. For example, the above step could be reduced to single command like
below:
$ sudo damo start $(pidof masim)
Then you could show the monitoring results snapshot in realtime like below:
$ sudo damo show
0 addr [4.000 GiB , 16.245 GiB ) (12.245 GiB ) access 0 % age 7 m 32.100 s
1 addr [16.245 GiB , 28.529 GiB ) (12.284 GiB ) access 0 % age 12 m 40.500 s
2 addr [28.529 GiB , 40.800 GiB ) (12.271 GiB ) access 0 % age 15 m 10.100 s
3 addr [40.800 GiB , 52.866 GiB ) (12.066 GiB ) access 0 % age 15 m 58.600 s
4 addr [52.866 GiB , 65.121 GiB ) (12.255 GiB ) access 0 % age 16 m 15.900 s
5 addr [65.121 GiB , 77.312 GiB ) (12.191 GiB ) access 0 % age 16 m 22.400 s
6 addr [77.312 GiB , 89.537 GiB ) (12.225 GiB ) access 0 % age 16 m 24.200 s
7 addr [89.537 GiB , 101.824 GiB) (12.287 GiB ) access 0 % age 16 m 25 s
8 addr [101.824 GiB , 126.938 GiB) (25.114 GiB ) access 0 % age 16 m 25.300 s
total size: 122.938 GiB
The above is only a small part of the features of the tool. You can get more
details of the tool from its usage document[4].
[1] https://docs.kernel.org/admin-guide/mm/damon/usage.html#sysfs-schemes-tried-regions
[2] https://docs.kernel.org/admin-guide/mm/damon/usage.html#tracepoints-for-monitoring-results
[3] https://github.com/awslabs/damo
[4] https://github.com/awslabs/damo/blob/next/USAGE.md
Thanks,
SJ
>
> Thanks & Regards,
> Lokesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regarding DAMON sysfs usage to get memory access stats
2024-04-26 20:04 ` SeongJae Park
@ 2024-04-27 21:18 ` lokesh jaliminche
0 siblings, 0 replies; 3+ messages in thread
From: lokesh jaliminche @ 2024-04-27 21:18 UTC (permalink / raw)
To: SeongJae Park; +Cc: damon
Sounds good! Thank you for the pointers; I will check them out.
Thanks & Regards,
Lokesh
On Fri, Apr 26, 2024 at 1:04 PM SeongJae Park <sj@kernel.org> wrote:
>
> Hi Lokesh,
>
>
> Sorry for late reply. Somehow I missed this mail.
>
> On Mon, 22 Apr 2024 17:51:21 -0700 lokesh jaliminche <lokesh.jaliminche@gmail.com> wrote:
>
> > Hi Everyone,
> >
> > I am currently experimenting with DAMON to gather memory access
> > statistics for virtual address ranges associated with specific
> > processes. I have followed the detailed instructions provided in the
> > usage documentation, but it's unclear where to find the resulting
> > memory access statistics.
> > Any pointers on where to get these statistics?
> >
> > Steps
> > # cd /sys/kernel/mm/damon/admin/
> > # echo 1 > kdamonds/nr_kdamonds && echo 1 > kdamonds/0/contexts/nr_contexts
> > # echo vaddr > kdamonds/0/contexts/0/operations
> > # echo 1 > kdamonds/0/contexts/0/targets/nr_targets
> > # echo $(pidof masim) > kdamonds/0/contexts/0/targets/0/pid_target
> > # echo on > kdamonds/0/state
>
> After the above steps, you can get the monitoring results from 'tried_regions'
> directory[1] of the sysfs interface, or by collecting damon:damon_aggregatred
> tracepoint[2].
>
> However, I'd recommend using the user-space tool, 'damo'[3], if you could. It
> provides more human-friendly interface and visualization of the monitoring
> results. For example, the above step could be reduced to single command like
> below:
>
> $ sudo damo start $(pidof masim)
>
> Then you could show the monitoring results snapshot in realtime like below:
>
> $ sudo damo show
> 0 addr [4.000 GiB , 16.245 GiB ) (12.245 GiB ) access 0 % age 7 m 32.100 s
> 1 addr [16.245 GiB , 28.529 GiB ) (12.284 GiB ) access 0 % age 12 m 40.500 s
> 2 addr [28.529 GiB , 40.800 GiB ) (12.271 GiB ) access 0 % age 15 m 10.100 s
> 3 addr [40.800 GiB , 52.866 GiB ) (12.066 GiB ) access 0 % age 15 m 58.600 s
> 4 addr [52.866 GiB , 65.121 GiB ) (12.255 GiB ) access 0 % age 16 m 15.900 s
> 5 addr [65.121 GiB , 77.312 GiB ) (12.191 GiB ) access 0 % age 16 m 22.400 s
> 6 addr [77.312 GiB , 89.537 GiB ) (12.225 GiB ) access 0 % age 16 m 24.200 s
> 7 addr [89.537 GiB , 101.824 GiB) (12.287 GiB ) access 0 % age 16 m 25 s
> 8 addr [101.824 GiB , 126.938 GiB) (25.114 GiB ) access 0 % age 16 m 25.300 s
> total size: 122.938 GiB
>
> The above is only a small part of the features of the tool. You can get more
> details of the tool from its usage document[4].
>
> [1] https://docs.kernel.org/admin-guide/mm/damon/usage.html#sysfs-schemes-tried-regions
> [2] https://docs.kernel.org/admin-guide/mm/damon/usage.html#tracepoints-for-monitoring-results
> [3] https://github.com/awslabs/damo
> [4] https://github.com/awslabs/damo/blob/next/USAGE.md
>
>
> Thanks,
> SJ
>
> >
> > Thanks & Regards,
> > Lokesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-27 21:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 0:51 Regarding DAMON sysfs usage to get memory access stats lokesh jaliminche
2024-04-26 20:04 ` SeongJae Park
2024-04-27 21:18 ` lokesh jaliminche
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.