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

procps-ng: free from busybox doesn't match top #3550

Merged
merged 1 commit into from Jun 12, 2019
Merged

procps-ng: free from busybox doesn't match top #3550

merged 1 commit into from Jun 12, 2019

Conversation

MilhouseVH
Copy link
Contributor

@MilhouseVH MilhouseVH commented Jun 10, 2019

free from busybox-1.30.0 doesn't include SReclaimable in buffers/cache when calculating used memory, which conflicts with top from procps-ng-3.3.15, and also Kodi (after xbmc/xbmc#16223), so use free from procps-ng and everything is hunky-dory.

Also see: http://lists.busybox.net/pipermail/busybox/2019-June/087324.html

MemTotal:        8009240 kB
MemFree:         6925768 kB
Buffers:           94024 kB
Cached:           669448 kB
SReclaimable:      39880 kB

busybox:

NUC:~ # free -k
              total        used        free      shared  buff/cache   available
Mem:        8009240      320000     6925768      278860      763472     7333736
Swap:             0           0           0

procps-ng:

NUC:~ # free -k
              total        used        free      shared  buff/cache   available
Mem:        8009240      280120     6925768      278860      803352     7333736
Swap:             0           0           0

top -Ek (procps-ng):

%Cpu(s):  2.2 us,  0.7 sy,  0.3 ni, 96.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  8009240 total,  6925768 free,   280120 used,   803352 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  7333736 avail Mem

@chewitt chewitt merged commit f4a9534 into LibreELEC:master Jun 12, 2019
@lrusak
Copy link
Member

lrusak commented Jun 12, 2019

just as an FYI, I sent a patch upstream to busybox to correct this issue. http://lists.busybox.net/pipermail/busybox/2019-June/087324.html

So in the future we can possibly move back to busybox free because the procps-ng version is quit large (35KB)

@MilhouseVH
Copy link
Contributor Author

I'd rather stick with the procps-ng version of free simply because it shares with top a common meminfo() function so these two tools will always be consistent in future. busybox may adapt their calculation to match procps-ng in future, and they may adapt it again when someone else decides they want it calculated a different way - it's just not worth the "risk" trying to use tools from two different packages that are supposed to be reporting the same numbers depending on the whim of the developers. I'd rather the two tools were consistent, even if they're both wrong! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants