Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make new color for dirty / writeback cache #1491

Open
benapetr opened this issue Jun 23, 2024 · 2 comments
Open

make new color for dirty / writeback cache #1491

benapetr opened this issue Jun 23, 2024 · 2 comments
Labels
enhancement Extension or improvement to existing feature needs-discussion 🤔 Changes need to be discussed and require consent

Comments

@benapetr
Copy link

Right now all disk caches are in same color (yellowish on my system). In Windows Task manager dirty buffers are using different color from regular disk cache because it is indeed different: while regular disk cache can be dropped on spot when RAM is needed, dirty buffers first need to be written to disk before RAM can be used.

It would also nicely show how effectively is RAM used to speed up disk writes or visualize the current OS settings. Dirty buffers can be loaded from /proc/meminfo:

root@odroidhc4:~# cat /proc/meminfo
MemTotal:        3872120 kB
MemFree:          144236 kB
MemAvailable:    3593088 kB
Buffers:             216 kB
Cached:          3478616 kB
SwapCached:          436 kB
Dirty:           2799032 kB
Writeback:        199648 kB

They are subset of Cached memory, but since their nature is different, they should have slightly different color in memory overview bar.

@BenBE BenBE added enhancement Extension or improvement to existing feature needs-discussion 🤔 Changes need to be discussed and require consent labels Jun 24, 2024
@benapetr
Copy link
Author

benapetr commented Jul 4, 2024

This is the view I am talking about, it would be nice to be able to see this interactively on Linux as well:

image

When you start writing a lot to a disk, this memory buffer grows and contains memory that needs to be written before it can be reused for another purpose.

htop merges this memory view with all other disk buffers and caches, which is far less useful than the way windows task manager does that.

@nicolas-yangli
Copy link

I think this will be a great feature. I am tuning those sysctls, which controls dirty page writeback behavior, on my machines, using watch cat /proc/meminfo to monitor the stats. It would be easier if htop provide a graphic view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Extension or improvement to existing feature needs-discussion 🤔 Changes need to be discussed and require consent
Projects
None yet
Development

No branches or pull requests

3 participants