Live data from Hacker News

Explanation of everything you can see in htop/top on Linux (2019)

peteris.rocks

31–40 of 71 posts

Re: Explanation of everything you can see in htop/top on Linux (2019)

#31
I appreciate the note on virtual memory not being reliable. This is what Windows task manager reports by default and it's terrible. Resident size is the most reliable metric. Anything else can be wrongfully inflated by things like harmless memory mapped files that won't actually hurt anything. eg. memory map 2GB of logfiles, it'll only be paged in if reading that portion of the logfile so isn't really using memory but users look at the processes and claim "OMG why does this app use so much memory". It doesn't. It uses very little. You're reading the memory usage wrong. Chrome actually had this problem for a while and they moved away from using memory mapped files. Not because memory mapped files are a bad thing but because users will read the memory usage and go crazy over what they see even though it's not really using that much actual physical memory.

There's actually guides out there on the web that tell people judge usage by virtual memory allocated too :(. At least this article gets it right :).

Re: Explanation of everything you can see in htop/top on Linux (2019)

#32
post #7

For top if you use the > character it will sort by memory usage. I use that sometimes to figure out why my host is becoming laggy. Also you'll see swapd is taking up CPU.

I prefer using the more memory friendly M (uppercase) for memory and P (uppercase) for CPU

Re: Explanation of everything you can see in htop/top on Linux (2019)

#34
For the ones that don't know "nmon", have a look at it as well! (press "h" to see the list of available monitors - press it again to make it go away, press "q" to quit)

https://nmon.sourceforge.io/pmwiki.php

Especially disk throughput and I/O (keys "d" & "D") can be very useful.

Re: Explanation of everything you can see in htop/top on Linux (2019)

#35

I appreciate the note on virtual memory not being reliable. This is what Windows task manager reports by default and it's terrible. Resident size is the most reliable metric. Anything else can be wrongfully inflated by things like harmless memory mapped files that won't actually hurt anything. eg. memory map 2GB of logfiles, it'll only be paged in if reading that portion of the logfile so isn't really using memory bu…

If you use memory-mapped files, cached pages count towards the resident set size of your process. If you use ordinary file I/O, they don't. That behavior has amusing consequences in HPC clusters that monitor the memory usage of each job and kill them if they use more memory than they requested.

Re: Explanation of everything you can see in htop/top on Linux (2019)

#37
post #13

I've relatively recently migrated over to using btop[0], and it's the kind of modern interface, useful and informative, that I needed. As others mention it - it seems to shows the Watts used as well :) (and network, and GPU, and disks,....) [0]: https://github.com/aristocratos/btop

Same. Btop is the best

Re: Explanation of everything you can see in htop/top on Linux (2019)

#38
post #17
post #14

Earlier quoted context omitted.

Irrelevant for you does not mean irrelevant for others

Nails and hammers are great but most of us have moved on to screws and screwdrivers. What good does it do to stick your head in the sand? CPUs are great for orchestrating work, GPUs are great for actually doing the work.

Screws have been around for about 3 millennia at this point. They have patently failed to obviate the use of nails. So by this analogy we can expect the 'Only GPUs do the work.' believers to be still promising this, any day now, about three thousand years hence. (-:

Re: Explanation of everything you can see in htop/top on Linux (2019)

#39

Earlier quoted context omitted.

For high performance work, gpus have replaced cpus a long time ago.

Not for all definitions of HPC, though. No one's doing database management on GPUs. No one's scraping data on GPUs. Can't run VMs on GPUs. Can't run web servers on GPU...

It is sunny in my backyard now. Must be sunny everywhere else
Post reply on HN