The Computer Oracle

Why are there many processes listed under the same title in htop?

Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Horror Game Menu Looping

--

Chapters
00:00 Question
00:36 Accepted answer (Score 178)
01:40 Thank you

--

Full question
https://superuser.com/questions/118086/w...

Accepted answer links:
[http://groups.google.com/group/alt.os.li...]: http://groups.google.com/group/alt.os.li...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#linux #ubuntu910 #performance

#avk47



ACCEPTED ANSWER

Score 208


htop shows individual threads as separate processes by default, similarly to how ps -AL would. If you press capital H it will switch to only showing the main processes (pressing it again switches back). Each thread's summary information actually reflects the whole process, so they don't have separate memory counts etc. The threads will show R when active and S when not active, although because htop only refreshes every few seconds you can't actually monitor their activity easily that way, as thread switches happen much faster than that.

Performance of different threading models is complex, and beyond superuser.com - you need to detail particular issues if they arise rather than trying to guess :)

See http://groups.google.com/group/alt.os.linux.mandriva/browse_thread/thread/59c9f42e99b53663/2e6ddc78b2b85cf2?lnk=raot for more discussion of the same topic

Note that H is for user threads; for kernel threads a similar toggle key K exists, and both options are accessible under the settings menu - F2 then Display Options