make new color for dirty / writeback cache
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.
This is the view I am talking about, it would be nice to be able to see this interactively on Linux as well:
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.
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.