mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 12:34:31 +00:00
tools: contrib: Explain memstats tool's graph
Add a section to explain what memstats shows in the graph. BUG=none TEST=read the doc Change-Id: If7990c844a63e381adab403af00f02a40ef35bb7 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4942210 Reviewed-by: Junichi Uekawa <uekawa@chromium.org> Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
parent
1e42e43550
commit
01065a8286
2 changed files with 26 additions and 1 deletions
|
@ -56,3 +56,28 @@ $ python3 plot.py -i ./memory-data.json
|
|||
./memory-data.html is written
|
||||
$ google-chrome ./memory-data.html
|
||||
```
|
||||
|
||||
#### How to interpret the graph
|
||||
|
||||
##### crosvm process
|
||||
|
||||
The main process's memory usage is divided into the following five sections and shown:
|
||||
|
||||
- crosvm (guest disk caches)
|
||||
- crosvm (guest shared memory)
|
||||
- crosvm (guest unevictable)
|
||||
- crosvm (guest used)
|
||||
- crosvm (host)
|
||||
|
||||
These values are computed by the process's RSS and virtio-balloon's statistics.
|
||||
|
||||
##### Other processes
|
||||
|
||||
For processes other than the main one, `Private_Dirty` in `/proc/${PID}/smaps` is shown. Unlike
|
||||
`Pss`, `Private_Dirty` doesn't include the shared memory for the guest physical memory region that
|
||||
the process touched. We use this value because such shared memory regions are counted as a part of
|
||||
the crosvm main process's memory usage.
|
||||
|
||||
##### Balloon
|
||||
|
||||
The blue line is the upper bound of the guest's memory usage limited by virtio-balloon.
|
||||
|
|
|
@ -131,7 +131,7 @@ def memstat_plot(data, args) -> str:
|
|||
fig = px.area(
|
||||
df,
|
||||
x="boot time (sec)",
|
||||
y="PSS (GB)",
|
||||
y="Memory usage (GB)",
|
||||
color="process",
|
||||
)
|
||||
fig.update_layout(title={"text": args.title})
|
||||
|
|
Loading…
Reference in a new issue