Hiding quotas and watermarks when unused in fmt_json
Closed this issue · 5 comments
Hi SeongJae,
I run damo fmt_json
often but found that it shows too verbose output especially for quotas and watermarks.
It currently shows as follows.
$ sudo ./damo fmt_json --damos_action pageout
{
"kdamonds": [
{
"state": null,
"pid": null,
"contexts": [
{
"ops": "paddr",
"targets": [
{
"pid": null,
"regions": [
{
"start": "4,294,967,296",
"end": "551,903,297,535"
}
]
}
],
"intervals": {
"sample_us": "5 ms",
"aggr_us": "100 ms",
"ops_update_us": "1 s"
},
"nr_regions": {
"min": "10",
"max": "1,000"
},
"schemes": [
{
"action": "pageout",
"access_pattern": {
"sz_bytes": {
"min": "0 B",
"max": "max"
},
"nr_accesses": {
"min": "0 %",
"max": "18,446,744,073,709,551,615 %"
},
"age": {
"min": "0 ns",
"max": "max"
}
},
"apply_interval_us": 0,
"quotas": {
"time_ms": "0 ns",
"sz_bytes": "0 B",
"reset_interval_ms": "max",
"goals": [],
"effective_sz_bytes": "0 B",
"weights": {
"sz_permil": "0 %",
"nr_accesses_permil": "0 %",
"age_permil": "0 %"
}
},
"watermarks": {
"metric": "none",
"interval_us": "0 ns",
"high_permil": "0 %",
"mid_permil": "0 %",
"low_permil": "0 %"
},
"filters": []
}
]
}
]
}
]
}
I would like to make it shorter by hiding quotas and watermarks when unused as follows.
$ sudo ./damo fmt_json --damos_action pageout
{
"kdamonds": [
{
"state": null,
"pid": null,
"contexts": [
{
"ops": "paddr",
"targets": [
{
"pid": null,
"regions": [
{
"start": "4,294,967,296",
"end": "551,903,297,535"
}
]
}
],
"intervals": {
"sample_us": "5 ms",
"aggr_us": "100 ms",
"ops_update_us": "1 s"
},
"nr_regions": {
"min": "10",
"max": "1,000"
},
"schemes": [
{
"action": "pageout",
"access_pattern": {
"sz_bytes": {
"min": "0 B",
"max": "max"
},
"nr_accesses": {
"min": "0 %",
"max": "18,446,744,073,709,551,615 %"
},
"age": {
"min": "0 ns",
"max": "max"
}
},
"apply_interval_us": 0,
"filters": []
}
]
}
]
}
]
}
It will make the output a lot simpler so I would like to hear how you think about this.
Maybe access_pattern
can be hidden and leaving it use default settings but not sure about this.
Thank you for your great opinion, Honggyu! I agree the current output is too verbose, and better to be concise. I will try to make it. Nonetheless, could you please share your usage of the command in more detail, so that the result be useful for you?
Hi SeongJae,
Sorry for the late response.
could you please share your usage of the command in more detail, so that the result be useful for you?
As you know, I generate the config output in hmsdk project at https://github.com/skhynix/hmsdk/blob/main/tools/gen_config.py. It doesn't use watermark so it can be hidden.
I asked about quota too because I sometimes generate the config file for simple testing. In this case, we don't have to generate the verbose config output.
Thank you for the clarification. And I agree those can be hidden, and that will make the output short. But, I'd like to further understand what is the problem of the current long output, and why.
For example, do you need to read and modify the output, and doing so with long output is painful? Why? Due to absence of existing tools that optimized for that? Due to your special workflow? What tool you use, what kind of modifications and reading you do for what?
We can definitely make the change, but it will impose some complexities in my opinion. I'd like clearly understand if the benefit of the change really outweighs the increase of complexity.
Btw, damo fmt_json
will be deprecated by November. Please use damo args damon
instead, or ask extension of the due date if you need.
After 2024-09-05, we will[1] use damonitor repo[2] as the only main repo for GitHub. To continue discussion of this issue on the repo, I just created a new issue[3] there. Please use the new issue for followup discussions.
Closing this issue in favor of the new one on the damonitor repo. Please ask me to open this again if you cannot continue the discussion from the new issue.
[1] https://lore.kernel.org/20240813232158.83903-1-sj@kernel.org
[2] https://github.com/damonitor/damo
[3] damonitor/damo#10