# Threads\_cached is zero

**URL:** <https://forums.percona.com/t/threads-cached-is-zero/3310>\
**Category:** Other MySQL® Questions\
**Created:** [March 2, 2014, 10:49pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310 "2014-03-02T22:49:39Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaigupta](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jaigupta](https://forums.percona.com/u/jaigupta)\
**Post date:** [March 2, 2014, 10:49pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/1 "2014-03-02T22:49:39Z")

</div>

Even though thread\_cache\_size is 256 Threads\_cached is 0.

```auto
mysql> show global variables like '%thread%';
+-----------------------------------------+---------------------------+
| Variable_name | Value |
+-----------------------------------------+---------------------------+
| innodb_purge_threads | 1 |
| innodb_read_io_threads | 64 |
| innodb_thread_concurrency | 24 |
| innodb_thread_sleep_delay | 0 |
| innodb_write_io_threads | 64 |
| max_delayed_threads | 20 |
| max_insert_delayed_threads | 20 |
| myisam_repair_threads | 1 |
| performance_schema_max_thread_classes | 50 |
| performance_schema_max_thread_instances | 612 |
| thread_cache_size | 256 |
| thread_concurrency | 10 |
| thread_handling | one-thread-per-connection |
| thread_pool_high_prio_mode | transactions |
| thread_pool_high_prio_tickets | 4294967295 |
| thread_pool_idle_timeout | 60 |
| thread_pool_max_threads | 100000 |
| thread_pool_oversubscribe | 3 |
| thread_pool_size | 24 |
| thread_pool_stall_limit | 500 |
| thread_stack | 262144 |
| thread_statistics | OFF |
| wsrep_slave_threads | 1 |
+-----------------------------------------+---------------------------+

```

```auto
mysql> show global status like '%threads_%';
+-------------------+--------+
| Variable_name | Value |
+-------------------+--------+
| Threads_cached | 0 |
| Threads_connected | 3 |
| Threads_created | 223544 |
| Threads_running | 1 |
+-------------------+--------+

```

Any reason you could think why server is not caching threads?

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [March 4, 2014, 3:18am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/2 "2014-03-04T03:18:32Z")

</div>

Hi,

As per the doc, “When a client disconnects, the client’s threads are put in the cache if there are fewer than [thread\_cache\_size](https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_thread_cache_size) threads there.”  
[URL=“[MySQL :: MySQL 8.0 Reference Manual :: 5.1.8 Server System Variables](https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_thread_cache_size)”][https://dev.mysql.com/doc/refman/5.5...ead\_cache\_size[/URL]](https://dev.mysql.com/doc/refman/5.5...ead_cache_size%5B/URL%5D)

So, thread will be only cached when client/thread disconnected. As per above result, you have 3 threads\_connected. Just close any of the client and check, it will be cached.

---

<div class="post-metadata">

**Author:** ![jaigupta](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jaigupta](https://forums.percona.com/u/jaigupta)\
**Post date:** [March 4, 2014, 4:08am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/3 "2014-03-04T04:08:21Z")

</div>

We have recently upgraded two clusters to 5.6 and after upgrade we are observing Threads\_cached as zero.

MySQL Tuner report.

```auto
[!!] Thread cache hit rate: 0% (231K created / 231K connections)

```

Node1

```auto
mysql> show global status like '%threads_%';
+-------------------+--------+
| Variable_name | Value |
+-------------------+--------+
| Threads_cached | 0 |
| Threads_connected | 4 |
| Threads_created | 305604 |
| Threads_running | 1 |
+-------------------+--------+

```

Node2

```auto
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_cached | 0 |
| Threads_connected | 12 |
| Threads_created | 18525 |
| Threads_running | 1 |
+-------------------+-------+

```

Node3

```auto
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_cached | 0 |
| Threads_connected | 9 |
| Threads_created | 32066 |
| Threads_running | 2 |
+-------------------+-------+

```

This is with all nodes in both clusters.

---

<div class="post-metadata">

**Author:** ![hakimfx](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hakimfx](https://forums.percona.com/u/hakimfx)\
**Post date:** [March 13, 2014, 1:48pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/4 "2014-03-13T13:48:55Z")

</div>

i have same issue with u, i set thread\_cache\_size = 10 or thread\_cache\_size=100 or thread\_cache\_size=1000. they are the same, the status of Threads\_cached is always zero.  
did u find solution of this issue? please help me if u can solve it. i use same version , 5.6. before this i used 5.5, and no issue on 5.5.  
thank you

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [March 14, 2014, 4:45am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/5 "2014-03-14T04:45:15Z")

</div>

Hi,

Tested locally with 5.6.16, it seems, you have to connect more than thread\_cache\_size once, then you’ll see cache used. As soon as we have more concurrently running threads than thread\_cache\_size, we’ll see it \>0 Try to set it 10 or 20 and then test it with mysqlslap like this.

mysqlslap -uroot -p --create-schema=test --concurrency=20 --no-drop --number-of-queries=1000 --query=“select 1”

---

<div class="post-metadata">

**Author:** ![hakimfx](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hakimfx](https://forums.percona.com/u/hakimfx)\
**Post date:** [March 14, 2014, 10:05am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/6 "2014-03-14T10:05:15Z")

</div>

Hi,  
i use version 5.6.15-56. i set thread\_cache\_size=5 and then i try test with mysqlslap. after that i see status:  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 0 |  
| Threads\_connected | 25 |  
| Threads\_created | 43243 |  
| Threads\_running | 3 |  
±------------------±------+  
4 rows in set (0.00 sec)

Threads\_cached is still zero.  
so what i have to do now?

---

<div class="post-metadata">

**Author:** ![hakimfx](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hakimfx](https://forums.percona.com/u/hakimfx)\
**Post date:** [March 18, 2014, 11:35am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/7 "2014-03-18T11:35:07Z")

</div>

Hello?  
there is no solution for this issue?

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [March 19, 2014, 12:38am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/8 "2014-03-19T00:38:01Z")

</div>

Hi,

I have checked on both Percona Server 5.6.15 and 5.6.16 versions. I’m really confused that why you can’t able to do it. check below log

On 5.6.16 :

nilnandan@Nil-Dell-XPS:~$ mysql -uroot -p  
Enter password:  
Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 38  
Server version: 5.6.16-64.0-553.saucy (Ubuntu)

Copyright (c) 2009-2014 Percona LLC and/or its affiliates  
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql\> show global variables like ‘thread\_cache%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| thread\_cache\_size | 8 |  
±------------------±------+  
1 row in set (0.00 sec)

mysql\> show global status like ‘%threads\_%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 0 |  
| Threads\_connected | 1 |  
| Threads\_created | 1 |  
| Threads\_running | 1 |  
±------------------±------+  
4 rows in set (0.00 sec)

I run this on second session,

nilnandan@Nil-Dell-XPS:~$ mysqlslap -uroot -p --create-schema=test --concurrency=20 --no-drop --number-of-queries=1000 --query=“select 1”  
Enter password:  
Benchmark  
Average number of seconds to run all queries: 0.014 seconds  
Minimum number of seconds to run all queries: 0.014 seconds  
Maximum number of seconds to run all queries: 0.014 seconds  
Number of clients running queries: 20  
Average number of queries per client: 50

nilnandan@Nil-Dell-XPS:~$

Again check status.

mysql\> show global status like ‘%threads\_%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 8 |  
| Threads\_connected | 1 |  
| Threads\_created | 22 |  
| Threads\_running | 1 |  
±------------------±------+  
4 rows in set (0.00 sec)

mysql\>

On 5.6.15,

nilnandan@Nil-Dell-XPS:~/sandboxes/msb\_5\_6\_15$ mysql -umsandbox -p --socket=/tmp/mysql\_sandbox5615.sock  
Enter password:  
Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 1  
Server version: 5.6.15-rel63.0 Percona Server with XtraDB (GPL), Release rel63.0, Revision 519

Copyright (c) 2009-2014 Percona LLC and/or its affiliates  
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql\>  
mysql\> show global variables like ‘thread\_cache%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| thread\_cache\_size | 9 |  
±------------------±------+  
1 row in set (0.01 sec)

mysql\> show global status like ‘%threads\_%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 0 |  
| Threads\_connected | 1 |  
| Threads\_created | 1 |  
| Threads\_running | 1 |  
±------------------±------+  
4 rows in set (0.00 sec)

Run this on second session,

nilnandan@Nil-Dell-XPS:~/sandboxes/msb\_5\_6\_15$ mysqlslap -umsandbox -p --socket=/tmp/mysql\_sandbox5615.sock --create-schema=test --concurrency=20 --no-drop --number-of-queries=1000 --query=“select 1”  
Enter password:  
Benchmark  
Average number of seconds to run all queries: 0.012 seconds  
Minimum number of seconds to run all queries: 0.012 seconds  
Maximum number of seconds to run all queries: 0.012 seconds  
Number of clients running queries: 20  
Average number of queries per client: 50

nilnandan@Nil-Dell-XPS:~/sandboxes/msb\_5\_6\_15$

mysql\> show global status like ‘%threads\_%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 9 |  
| Threads\_connected | 1 |  
| Threads\_created | 21 |  
| Threads\_running | 1 |  
±------------------±------+  
4 rows in set (0.00 sec)

mysql\>

---

<div class="post-metadata">

**Author:** ![hakimfx](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hakimfx](https://forums.percona.com/u/hakimfx)\
**Post date:** [March 19, 2014, 2:12pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/9 "2014-03-19T14:12:19Z")

</div>

here is mine:

mysql\> show global variables like ‘thread\_cache%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| thread\_cache\_size | 8 |  
±------------------±------+  
1 row in set (0.01 sec)

mysql\> show global status like ‘%threads\_%’;  
±------------------±-------+  
| Variable\_name | Value |  
±------------------±-------+  
| Threads\_cached | 0 |  
| Threads\_connected | 26 |  
| Threads\_created | 110280 |  
| Threads\_running | 2 |  
±------------------±-------+  
4 rows in set (0.00 sec)

and on second session:

[root@db-1-ssd ~]# mysqlslap -uroot -p --create-schema=test --concurrency=20 --no-drop --number-of-queries=1000 --query=“select 1”  
Enter password:  
Benchmark  
Average number of seconds to run all queries: 0.021 seconds  
Minimum number of seconds to run all queries: 0.021 seconds  
Maximum number of seconds to run all queries: 0.021 seconds  
Number of clients running queries: 20  
Average number of queries per client: 50

[root@db-1-ssd ~]# mysql -p  
Enter password:  
Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 115198  
Server version: 5.6.15-56 Percona XtraDB Cluster (GPL), Release 25.4, Revision 731, wsrep\_25.4.r4043

Copyright (c) 2009-2013 Percona LLC and/or its affiliates  
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql\> show global status like ‘%threads\_%’;  
±------------------±-------+  
| Variable\_name | Value |  
±------------------±-------+  
| Threads\_cached | 0 |  
| Threads\_connected | 32 |  
| Threads\_created | 115343 |  
| Threads\_running | 5 |  
±------------------±-------+  
4 rows in set (0.00 sec)

it is why i am confused. i follow your steps, but i get different result. threads\_cached is still zero. i am frustrated now.

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [March 19, 2014, 11:24pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/10 "2014-03-19T23:24:51Z")

</div>

Hi,

Now, I came to know that you are using PXC (XtraDB Cluster) which you should mention earlier. Still, I have checked with the same version you are using but I can’t able reproduce what you are saying…Definitely, you should check from your side that where you are running test and where you are checking. Are there multiple mysql instances on same server?

[root@percona-pxc56-1 mysql]# mysql -uroot -p  
Enter password:  
Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 4  
Server version: 5.6.15-56 Percona XtraDB Cluster (GPL), Release 25.4, Revision 731, wsrep\_25.4.r4043

Copyright (c) 2009-2013 Percona LLC and/or its affiliates  
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql\> show global variables like ‘thread\_cache%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| thread\_cache\_size | 9 |  
±------------------±------+  
1 row in set (0.00 sec)

mysql\>  
mysql\> show global status like ‘%threads\_%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 0 |  
| Threads\_connected | 3 |  
| Threads\_created | 3 |  
| Threads\_running | 1 |  
±------------------±------+  
4 rows in set (0.00 sec)

mysql\> quit  
Bye  
[root@percona-pxc56-1 mysql]# mysqlslap -uroot -p --create-schema=test --concurrency=20 --no-drop --number-of-queries=1000 --query=“select 1”  
Enter password:  
Benchmark  
Average number of seconds to run all queries: 0.053 seconds  
Minimum number of seconds to run all queries: 0.053 seconds  
Maximum number of seconds to run all queries: 0.053 seconds  
Number of clients running queries: 20  
Average number of queries per client: 50

[root@percona-pxc56-1 mysql]# mysql -uroot -p  
Enter password:  
Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 206  
Server version: 5.6.15-56 Percona XtraDB Cluster (GPL), Release 25.4, Revision 731, wsrep\_25.4.r4043

Copyright (c) 2009-2013 Percona LLC and/or its affiliates  
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql\> show global status like ‘%threads\_%’;  
±------------------±------+  
| Variable\_name | Value |  
±------------------±------+  
| Threads\_cached | 8 |  
| Threads\_connected | 3 |  
| Threads\_created | 36 |  
| Threads\_running | 1 |  
±------------------±------+  
4 rows in set (0.01 sec)

---

<div class="post-metadata">

**Author:** ![jaigupta](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jaigupta](https://forums.percona.com/u/jaigupta)\
**Post date:** [March 19, 2014, 11:33pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/11 "2014-03-19T23:33:04Z")

</div>

Still facing this problem. I am also using Cluster.

> [@](#):
>
> Percona-XtraDB-Cluster-client-56-5.6.15-25.4.731.rhel6.x86\_64  
> Percona-XtraDB-Cluster-server-56-5.6.15-25.4.731.rhel6.x86\_64  
> Percona-XtraDB-Cluster-galera-3-3.3-1.207.rhel6.x86\_64  
> Percona-Server-shared-compat-5.5.35-rel33.0.611.rhel6.x86\_64  
> Percona-XtraDB-Cluster-shared-56-5.6.15-25.4.731.rhel6.x86\_64

Server 1

```auto
mysql> show global status like '%threads_%';
+-------------------+---------+
| Variable_name | Value |
+-------------------+---------+
| Threads_cached | 0 |
| Threads_connected | 14 |
| Threads_created | 3284767 |
| Threads_running | 2 |
+-------------------+---------+
4 rows in set (0.00 sec)

```

Server 2

```auto
mysql> show global status like '%threads_%';
+-------------------+---------+
| Variable_name | Value |
+-------------------+---------+
| Threads_cached | 0 |
| Threads_connected | 57 |
| Threads_created | 3237214 |
| Threads_running | 1 |
+-------------------+---------+
4 rows in set (0.00 sec)

```

Surprisingly, it is working for third node.

```auto
mysql> show global status like '%threads_%';
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_cached | 57 |
| Threads_connected | 9 |
| Threads_created | 66 |
| Threads_running | 1 |
+-------------------+-------+
4 rows in set (0.00 sec)

```

All configurations on all three nodes are exactly same including thread\_cache\_size which is 256. We have haproxy solution in front, so that have same traffic (i.e. number of connections).

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [March 20, 2014, 3:58am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/12 "2014-03-20T03:58:03Z")

</div>

Hi,

As you are using HAproxy, it might be possible that each time connection goes to 3rd node.  
Can you try to change “round robin” in HAproxy settings and then check?

---

<div class="post-metadata">

**Author:** ![jaigupta](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jaigupta](https://forums.percona.com/u/jaigupta)\
**Post date:** [March 20, 2014, 4:21am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/13 "2014-03-20T04:21:56Z")

</div>

If we see number of Threads\_created, it shows a very high number which certifies that MySQL server is active and receiving many connections.

I am also attaching haproxy stats that shows that it is distributing connections correctly.

```auto
[TABLE="class: wysiwyg_table_tbl"]
	 		[TR="class: wysiwyg_table_titre"]
		[/TR]
	 [/TABLE]
[TABLE="class: wysiwyg_table_tbl"]
	 		[TR="class: wysiwyg_table_titre"]
		[/TR]
		[TR="class: wysiwyg_table_titre"]
		[/TR]
		[TR="class: wysiwyg_table_frontend"]
			[TD="class: wysiwyg_table_ac"]Frontend[/TD]
			[TD="colspan: 3"] [/TD]
			[TD]1[/TD]
			[TD]233[/TD]
			[TD]-[/TD]
			[TD]0[/TD]
			[TD]154[/TD]
			[TD]3000[/TD]
			[TD]4815359[/TD]
			[TD] [/TD]
			[TD]26794882489[/TD]
			[TD]2910594723339[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD] [/TD]
			[TD] [/TD]
			[TD] [/TD]
			[TD] [/TD]
			[TD="class: wysiwyg_table_ac"]OPEN[/TD]
			[TD="class: wysiwyg_table_ac, colspan: 8"] [/TD]
		[/TR]
		[TR="class: wysiwyg_table_active3"]
			[TD="class: wysiwyg_table_ac"]db01[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD]-[/TD]
			[TD]1[/TD]
			[TD]223[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD]51[/TD]
			[TD]200[/TD]
			[TD]1592074[/TD]
			[TD]1592074[/TD]
			[TD]9698974961[/TD]
			[TD]994083732645[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD="class: wysiwyg_table_ac"]4d23h UP[/TD]
			[TD="class: wysiwyg_table_ac"][U]L7OK/200 in 12ms[/U][/TD]
			[TD="class: wysiwyg_table_ac"]1[/TD]
			[TD="class: wysiwyg_table_ac"]Y[/TD]
			[TD="class: wysiwyg_table_ac"]-[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0s[/TD]
			[TD="class: wysiwyg_table_ac"]-[/TD]
		[/TR]
		[TR="class: wysiwyg_table_active3"]
			[TD="class: wysiwyg_table_ac"]db02[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD]-[/TD]
			[TD]1[/TD]
			[TD]220[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD]52[/TD]
			[TD]200[/TD]
			[TD]1539503[/TD]
			[TD]1539503[/TD]
			[TD]8723529847[/TD]
			[TD]944306623426[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD="class: wysiwyg_table_ac"]4d23h UP[/TD]
			[TD="class: wysiwyg_table_ac"][U]L7OK/200 in 13ms[/U][/TD]
			[TD="class: wysiwyg_table_ac"]1[/TD]
			[TD="class: wysiwyg_table_ac"]Y[/TD]
			[TD="class: wysiwyg_table_ac"]-[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0s[/TD]
			[TD="class: wysiwyg_table_ac"]-[/TD]
		[/TR]
		[TR="class: wysiwyg_table_active3"]
			[TD="class: wysiwyg_table_ac"]db03[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD]-[/TD]
			[TD]0[/TD]
			[TD]220[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD]51[/TD]
			[TD]200[/TD]
			[TD]1683782[/TD]
			[TD]1683782[/TD]
			[TD]8372377681[/TD]
			[TD]972204367268[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD="class: wysiwyg_table_ac"]4d23h UP[/TD]
			[TD="class: wysiwyg_table_ac"][U]L7OK/200 in 13ms[/U][/TD]
			[TD="class: wysiwyg_table_ac"]1[/TD]
			[TD="class: wysiwyg_table_ac"]Y[/TD]
			[TD="class: wysiwyg_table_ac"]-[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0s[/TD]
			[TD="class: wysiwyg_table_ac"]-[/TD]
		[/TR]
		[TR="class: wysiwyg_table_backend"]
			[TD="class: wysiwyg_table_ac"]Backend[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD] [/TD]
			[TD]1[/TD]
			[TD]233[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD]154[/TD]
			[TD]3000[/TD]
			[TD]4815359[/TD]
			[TD]4815359[/TD]
			[TD]26794882489[/TD]
			[TD]2910594723339[/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD] [/TD]
			[TD]0[/TD]
			[TD][U]0[/U][/TD]
			[TD]0[/TD]
			[TD]0[/TD]
			[TD="class: wysiwyg_table_ac"]4d23h UP[/TD]
			[TD="class: wysiwyg_table_ac"] [/TD]
			[TD="class: wysiwyg_table_ac"]3[/TD]
			[TD="class: wysiwyg_table_ac"]3[/TD]
			[TD="class: wysiwyg_table_ac"]0[/TD]
			[TD="class: wysiwyg_table_ac"] [/TD]
			[TD]0[/TD]
			[TD]0s[/TD]
			[TD] [/TD]
		[/TR]
	 [/TABLE]

```

---

<div class="post-metadata">

**Author:** ![hakimfx](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hakimfx](https://forums.percona.com/u/hakimfx)\
**Post date:** [March 20, 2014, 12:14pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/14 "2014-03-20T12:14:48Z")

</div>

> [@jaigupta;13545](#):
>
> We have recently upgraded two clusters to 5.6 and after upgrade we are observing Threads\_cached as zero.

no surprisingly, you upgraded only two clusters to 5.6. i think 3rd node, it is still 5.5, it is why your 3rd node has Threads\_cached = 57, and the others = zero,  
the difference is the version. so we get problem with 5.6

---

<div class="post-metadata">

**Author:** ![hakimfx](https://avatars.discourse-cdn.com/v4/letter/h/a587f6/32.png) [@hakimfx](https://forums.percona.com/u/hakimfx)\
**Post date:** [March 20, 2014, 12:43pm UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/15 "2014-03-20T12:43:28Z")

</div>

> [@niljoshi;13741](#):
>
> Hi,
> 
> Now, I came to know that you are using PXC (XtraDB Cluster) which you should mention earlier. Still, I have checked with the same version you are using but I can’t able reproduce what you are saying…Definitely, you should check from your side that where you are running test and where you are checking. Are there multiple mysql instances on same server?

there is no multiple mysql instance on each node. i have 3 nodes. each of them only has single mysql instance.

---

<div class="post-metadata">

**Author:** ![kv2x1](https://avatars.discourse-cdn.com/v4/letter/k/f4b2a3/32.png) [@kv2x1](https://forums.percona.com/u/kv2x1)\
**Post date:** [March 31, 2014, 2:42am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/16 "2014-03-31T02:42:08Z")

</div>

Nice post. Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![trimurthy](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/trimurthy/32/22833_2.png) [@trimurthy](https://forums.percona.com/u/trimurthy)\
**Post date:** [July 30, 2015, 4:35am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/17 "2015-07-30T04:35:18Z")

</div>

Hi All,

Did any one find out the reason why thread\_cached is not working.

I am also facing the same issue.

Galera 3 node cluster running on the following version

Server version: 5.6.15-56-log Percona XtraDB Cluster (GPL), Release 25.5, Revision 759, wsrep\_25.5.r4061

±--------------------+  
| @@thread\_cache\_size |  
±--------------------+  
| 100 |  
±--------------------+

±------------------±---------+  
| Variable\_name | Value |  
±------------------±---------+  
| Threads\_cached | 0 |  
| Threads\_connected | 48 |  
| Threads\_created | 11378557 |  
| Threads\_running | 1 |  
±------------------±---------+

Thank you,  
Trimurthy

---

<div class="post-metadata">

**Author:** ![giomanda](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@giomanda](https://forums.percona.com/u/giomanda)\
**Post date:** [December 18, 2015, 4:03am UTC](https://forums.percona.com/t/threads-cached-is-zero/3310/18 "2015-12-18T04:03:53Z")

</div>

I am also facing the same issue after upgrading percona cluster from 5.5 to 5.6.

```auto

mysql> show variables like '%thread_cach%';show status like '%threads%';
+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| thread_cache_size | 300 |
+-------------------+-------+
1 row in set (0.00 sec)

+-------------------------+---------+
| Variable_name | Value |
+-------------------------+---------+
| Delayed_insert_threads | 0 |
| Slow_launch_threads | 0 |
| Threadpool_idle_threads | 0 |
| Threadpool_threads | 0 |
| Threads_cached | 0 |
| Threads_connected | 817 |
| Threads_created | 8954166 |
| Threads_running | 2 |
+-------------------------+---------+
8 rows in set (0.00 sec)

```

Anyone concluded to something about this?
