Plugin calculates free memory usage on Linux incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xfce4-systemload-plugin (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The plugin calculates the memory usage on Linux as (MemTotal - (MemFree+
* Shared memory (Shmem in /proc/meminfo) is contained in the "cached" memory figure yet not reclaimable in most cases
* SReclaimable is slab memory that may be reclaimed in principle
So a much more realistic figure for the actual memory usage is (Total - (Free+Buffers+
In principle one would also need to subtract HugePages_Rsvd but since this is mostly used on servers with big databases it's probably not such a big issue for desktop systems.
This issue should most likely be fixed upstream.
Package: xfce4-systemloa
Package version: 1:1.1.1-1ubuntu2 (but issue is present in Ubuntu 15.10 as well)
Release: Ubuntu 14.04.4 LTS
Addendum: Arguably this might be considered a feature request rather than a bug and the fix possibly isn't the final answer since there may be situations where some shared memory pages are actually reclaimable. However, in most cases shared memory pages will actually be used heavily and IMHO it's better to over-estimate memory usage than to display a memory usage that is too low.