Top vs qps - which one to believe?

Hi, when I check for used RAM, I get a different reading from the top command in the terminal and from the Qps application. The more RAM is used, the bigger the difference. Why is that and which one to believe?
top-vs-qps

If you look closely as I read your provided screens, you’ll note they are not showing the same values.

The top display is in MiB, ie. 471.5 MiB

The lower display is in MB, ie. 507 MB

A quick online [duckduckgo] conversion gives 507MB as being 483.5 MiB which still differs to your other answer, but how RAM is calculated can vary so its common for two programs to come up with different answers with regards RAM usage/available.

If RAM contains data that is used as CACHE, it’s both FREE as its available for applications to request via malloc(), but it’s also still USED RAM given its being used for caching purposes which speeds the reading of data from disk. Whether RAM that is both FREE & USED belongs in either category, or in both has been debated since the early 1970s. As a result, different programs have treated the same values differently & thus both are correct, even if they give different results.

I don’t know how those programs calculate free/used RAM, but I recall all the debates that have occurred over the decades as I felt it it was ‘amusing’, and fun to argue with classmates back when I was at uni. It could also be I’ve forgotten much of what I did learn, given uni was many decades ago for me too.

3 Likes

Interesting, thank you! This means, that if one is comparing distros, or more generally the RAM usage, he should always use the same program. Which probably means top, because that probably exists in all distros. Hopefully the same program on a different distro calculates the RAM the same way :slight_smile:

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.