Why do top and task manager show different degrees of memory usage?

Why does in my system top show 840MB of RAM used, but the “Task Manager” shows 1.2GIB?

Which shows correctly?

top shows you how much RAM is used by the system itself, by applications, and by application data. However, the system will actually be using more RAM in the form of cache and buffers, both of which are a memory usage of a temporary nature, intended to increase performance — remember, unused RAM is useless RAM. :wink:

1 Like

Both are correct, but you must read what each consider as “used”. It’s easier in top because it actually shows everything (they’re in man top result but here’s a simplictic explanation):

  • Virt: The amount of RAM virtually used by a process, by virtually, it means it counts everything the process has ever asked, regardless whether it has been mapped physically to actual RAM or has been swapped out
  • Res: The amount of RAM reserved by a process, the one that’s actually eating your RAM
  • Shr: The amount of RAM used by a process that’s (potentially) shared with other processes, part of Res
  • Swap: The amount of RAM used by a process that’s currently being swapped out
  • Used: Res + Swap

I don’t know what XFCE task manager considers as used, feel free to read its docs or even source code.


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