As a consequence of trying htop after a long time, I got a reminder that VIRT is not related to RES. I noticed Libreoffice Calc with 29.7 GB of virtual memory and only 198 MB actually used. I wonder why LO made a malloc of nearly 30 GB, but memory is cheap especially because it's virtual.
The next one on the list is Firefox with 8.5 GB VIRT and 994 MB RES.
By the way, I've got 16 GB of RAM and no swap. Anyway all that empty memory between VIRT and RES doesn't go to swap, it's really virtual.
RES isn't physical memory, either. I can happily have, say, 30 GB RES on a system with only 1 GB RAM (and no swap).
smem's measures - USS, unqiue set size (unshared pages) and PSS, proportional set size (shared pages divided by their share count, ie. how many tasks share them), are far more accurate and easier to reason about than RSS and VSS.
Well, RES is physical memory, it's just some places where it gets reported don't account for physical memory that is being shared between multiple processes.
If I have a process that says it's using 1GB of RES, then you can guarantee there is at least 1GB of physical memory in use. It just might also be in use by other things also reporting their own RES usage.
At a guess: LO is requesting (via mmap) enough memory up front to represent a full spreadsheet with data in every cell from A1 to the bottom-right corner, and letting the OS supply pages for the small parts of the spreadsheet that are actually accessed. AIUI this is a common technique for big sparse arrays.
One thing not mentioned in the article is you can interact with htop using the mouse, for example clicking on column headers to sort by that column, or selecting a process.
You can get get this mouse support for example by installing the gpm package, which enables the mouse support for the terminal.
gpm is only necessary for interacting with on a Linux TTY; if you are using it in an X terminal emulator, then you merely need a terminal emulator that supports the xterm mouse extensions.
Worth reading is the builtin documentation ("h" or F1). More things there like memory used in virtualization, T, Z and D for processes, and "l" and "s" commands.
Oh that is a little awkward. You can configure it, but the configuration options appear below the CPU bars. So if there's already so many that your screen is filled, that's a bit moot.
The idea is that you can run embarrassingly parallel workflows without needing to recode for a GPU; just launch processes with appropriate affinities. NERSC has compute clusters with thousands of these beasts. They make astronomers very happy.
That will replace the default CPU monitor with a single meter for the average across all cores. After that, you'll be able to customize things the standard way by pressing F2 within htop.
The load average is calculated by the kernel (processes that display it just regurgitate the first 3 columns from /proc/loadavg); and yes, it is 1, 5, and 15 minutes.
40 comments
[ 2.9 ms ] story [ 110 ms ] threadBut hey, everyone likes visual explanations ;)
The next one on the list is Firefox with 8.5 GB VIRT and 994 MB RES.
By the way, I've got 16 GB of RAM and no swap. Anyway all that empty memory between VIRT and RES doesn't go to swap, it's really virtual.
smem's measures - USS, unqiue set size (unshared pages) and PSS, proportional set size (shared pages divided by their share count, ie. how many tasks share them), are far more accurate and easier to reason about than RSS and VSS.
If I have a process that says it's using 1GB of RES, then you can guarantee there is at least 1GB of physical memory in use. It just might also be in use by other things also reporting their own RES usage.
One thing not mentioned in the article is you can interact with htop using the mouse, for example clicking on column headers to sort by that column, or selecting a process.
You can get get this mouse support for example by installing the gpm package, which enables the mouse support for the terminal.
If you have their display enabled htop will divide them down as well.
I like these visual explanations though.
This stackoverflow has some pointers though: http://superuser.com/questions/806614/how-to-compress-or-hid...
The idea is that you can run embarrassingly parallel workflows without needing to recode for a GPU; just launch processes with appropriate affinities. NERSC has compute clusters with thousands of these beasts. They make astronomers very happy.
1, 5 and 15 minutes is the most common intervals
Load of 0 means idle (nothing to run), load of 1 means e.g. one process running and nothing in the queue.
https://en.wikipedia.org/wiki/Load_(computing)