VSZ in Linux refers to the virtual memory size, which represents the size of the virtual address space owned by the process. This address space can be the actual allocated physical memory or the swap space. But this does not necessarily mean that the process uses all the memory.
#The operating system of this tutorial: linux5.18.14 system, Dell G3 computer.
What is vsz in Linux
VSZ is the virtual memory size. This is the memory size given to the process by Linux. In other words, VSZ represents the virtual memory owned by the process. The size of the address space. This address space can be the actual allocated physical memory or the swap space. But this does not necessarily mean that the process uses all the memory. For example, many applications have functionality to perform certain tasks but may not load them into memory until needed. Linux utilizes demand paging, which only loads pages into memory when an application attempts to use them.
The VSZ size you see has taken into account all of these pages, but that does not mean they have been loaded into physical memory. Therefore, the VSZ size is generally not an exact measure of how much memory a process is using, but rather an indication of the maximum amount of memory a process can use while loading all its functions and libraries into physical memory.
The difference between VSZ and RSS
For the difference between VSZ and RSS, we can simply understand that: VSZ is the size of the virtual address Q space owned by the process, and RSS is the actual physical memory size used by the process. When multiple processes share the same shared library, the memory space of the shared library will only be calculated once. This is also a benefit of using shared libraries in Linux systems.
The above is the detailed content of What does vsz mean in linux. For more information, please follow other related articles on the PHP Chinese website!