

The process, therefore, does not need to know that it got paused, and just simply assume the function was loaded on the virtual memory and use it. Then Linux pauses the process, loads the page on to the physical memory, maps the page to the virtual memory of the process, then lets the process run again from where it got paused. When the program actually calls a function in the virtual memory, the MMU in the CPU tells Linux that the page is not loaded. First, when the program starts, Linux gives a virtual memory space to the process but does not actually load pages that have functions on to the physical memory. The demand paging feature does not load pages unless they are used by the process. Loading these functions on to the physical memory is not necessary when the user just wants to edit a plain text. These function, however, are not used all the time. This is due to the feature called demand paging, which suppresses unnecessary memory consumption.įor example, a text editor named emacs has functions that can handle XML files.

🚀 VSZ (Virtual Memory Size) and Demand PagingĬonsidering the VSZ (virtual memory size) to measure memory consumption of a process does not make much sense. A virtual memory page can be mapped to a physical memory page, and hence, processes only need to think about the virtual memory.


but traditional people still asking for the knowledge and skills of monitoring Memory Consumption manually. In the world of devops, there are many tools support us to monitor memory usage with metrics such Datadogs, Grafana, etc.
