When I check the processes/active tasks on centos using the top
command, when using SSH.
I only see 1 mysql process. Does this mean that it is only using one cpu core out of my 4 cpu cores?
Asked
Active
Viewed 1,491 times
-2

user8005
- 11
- 1
- 4
-
`top` doesn't show threads, it shows processes. – EEAA Sep 24 '13 at 20:20
-
@EEAA so, your suggestion is.... – user8005 Sep 24 '13 at 20:21
1 Answers
1
Mysql is definitely a multithreaded application, and has no option to 'disable multithreading', whatever that would mean. A tool like htop will show you individual threads, as will looking in /proc/
:
dennis@lightning:~$ ls /proc/$(pidof mysqld)/task/ | wc -l
17
The task/
directory for a process contains one entry per thread. Mysql on this bix is currently thus using 17 threads.

Dennis Kaarsemaker
- 19,277
- 2
- 44
- 70
-
-
1
-
-
Does this mean that it is only using one cpu core out of my 4 cpu cores? – user8005 Sep 24 '13 at 21:31
-
That means your htop is behaving differently than mine. How many subdirs are there in /proc/$(pidof mysqld)/task ? – Dennis Kaarsemaker Sep 25 '13 at 01:38