WHat does 'thr'mean in htop

August 20, 2018 1.8k views
Nginx Ubuntu 18.04

Ok,my server is crashing down a lot(500% CPU usage) and whenever it does I opened up the putty and use the htop to observer any abnormal behavior,So one thing I noticed is whenever my CPU spike in the 'Tasks' row the second column which is for 'thr' goes to the maximum.Now if I increase the pm.max_children more the 'thr' value even goes higher but the CPU consumption is still 500%+.

So I want to know what does this 'thr' means and how to avoid letting it go to some maximum values.Also if anyone can explain the terms shown in the Tasks row I will be grateful.An instance of Tasks observable values for my server is.

Tasks : 91 , 109 thr, 96 kthr,: 6 running

Thank you.

1 Answer

Hello friend!

In this case "thr" means threads. The "kthr" means kernel threads. It sounds like your PHP application is being flooded with requests. I would examine your web server access logs for unusual, abusive patterns. This might help you to block specific requests, optimize those requests better, or block bad actors.

Kind Regards,
Jarland

  • I have the access log but don't know where to start any tutorial or guide will be helpful here.

    thank you

Have another answer? Share your knowledge.