4

I am trying to make sense out of htop. I have a virtual PC with 6 GB RAM running ubuntu 15.10. I have installed a few applications on the server: Jenkins, Artifactory and some other tools. When I run htop I get this:

enter image description here

When I look at the VIRT and RES column the numbers far exceed the overview in the top showing that 1615/5967 MB is currently consumed.

How do I get a real view of how much RAM the the different applications on the server consumes?

By default Hide kernel threads are selected:

enter image description here

I have tried to enable Hide userland threads and the list now makes more sense:

enter image description here

Duplicates are still shown but at least only the "expected" memory consumption are shown for one instance of the applications. Not sure if its recommended to have this setting enabled though.

5
  • 2
    Possible duplicate of What does VIRT, RES and SHR means in the top command?
    – muru
    Apr 12, 2016 at 18:55
  • Its only covers part of my question. I would also like to know if its possible to get see what each application uses instead of the above list of endless duplicate instances of the same application even though only one instance is in fact running for each.
    – u123
    Apr 12, 2016 at 18:57
  • "…endless duplicate instances of the same application even though only one instance is in fact running for each" ... What does that mean? If you have several instances of the same application running, you'll see one entry for each instance.
    – muru
    Apr 12, 2016 at 19:01
  • As you can see from the screenshot above at least two instances of Jenkins is "supposed" to be running and at least 10+ instances of artifactory. If that was really the case all memory on the machine would have been consumed, instead it shows that only 1615/5967 is consumed.
    – u123
    Apr 12, 2016 at 19:04
  • If those are threads of the same JVM, the memory would be shared. See askubuntu.com/q/754816/158442, for example
    – muru
    Apr 12, 2016 at 19:07

2 Answers 2

2

In simple terms, VIRT colmn is how much memory the process can use for that process. E.g. artifacto mapped it self 4612M to use.

RES- This represents how much memory it is currently using. For Artifacto is is currently using 722M.

Here is a link with some more info subject; HTOP reference

4
  • Ok so I should simply ignore the multiple entries for both artifactory and jenkins and just select one to understand how much the application is consuming?
    – u123
    Apr 12, 2016 at 18:54
  • 1
    I believe htop defaults on how many threads the main process is using and will show all of them. You can edit this out in the htop config file. goto: ~/.config/htop/htoprc. or try in htop press F2 and goto display options and press space select "hide kernel threads" and "hid userland threads" Should trim it down for you.
    – esefarm
    Apr 12, 2016 at 19:04
  • @esefram your comment above is the answer I was looking for could you add that as an answer?
    – u123
    Apr 12, 2016 at 19:19
  • yeah sure thing
    – esefarm
    Apr 13, 2016 at 17:55
1

I believe htop defaults on how many threads the main process is using and will show all of them. You can edit this out in the htop config file. goto: ~/.config/htop/htoprc. or try in htop press F2 and goto display options and press space select "hide kernel threads" and "hid userland threads" Should trim it down for you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .