I'm using Asp.Net together with MySQL. In the .Net connection string, I have set Max Pool Size to 150.
If I run the following I get these values:
SHOW GLOBAL STATUS LIKE 'max_used_connections'; gives 66
SHOW GLOBAL STATUS LIKE 'Threads_created'; gives 66
SHOW GLOBAL STATUS LIKE 'connections'; gives 474
Which gives Threads_created / Connections = 0,1392.
So from that it seems like I need to increase thread_cache_size
.
But if I run SHOW PROCESSLIST
I always see that I have a lot of connections open (most of them sleeping) because of the pool created by .Net. Do I still need to set the thread_cache_size
as I still will reuse the connections from the connection pool? If the Pool Size is 150 do you think a good value would be to set thread_cache_size
to 150+? Would this affect CPU and memory a lot?