Commands.page Logo

What Does RES Mean in htop on Ubuntu?

This guide provides a concise explanation of the RES column found in the htop system monitor on Ubuntu. It defines resident memory, differentiates it from virtual and shared memory metrics, and outlines why this specific value is the most accurate indicator of physical RAM consumption for running processes.

Definition of RES

RES stands for Resident Memory. It represents the non-swapped physical memory that a process has currently used. In simpler terms, this is the portion of the program’s memory that is actually held in the computer’s RAM at this exact moment.

RES vs VIRT and SHR

To understand RES fully, you must distinguish it from the other memory columns in htop: * VIRT (Virtual Memory): The total amount of memory a process can access, including swapped out memory and memory mapped files. * SHR (Shared Memory): Memory that might be shared with other processes, such as shared libraries. * RES (Resident Memory): The actual physical RAM used. This value excludes memory that has been swapped out to the disk.

Why RES Matters

When analyzing system performance on Ubuntu, the RES column is the most critical metric for determining memory pressure. If your system is slowing down due to a lack of memory, looking at the RES column tells you which processes are consuming the most physical RAM. A high RES value indicates that the application is actively using hardware memory, whereas a high VIRT value might not impact performance if that memory is not actually loaded into RAM.

Monitoring Memory Usage

You can sort processes by this column in htop to identify memory-heavy applications quickly. Press F6 to select a sort column, choose RES, and press Enter. This arrangement lists the processes consuming the most physical memory at the top, allowing you to identify potential bottlenecks or memory leaks efficiently.