Forum Stats

  • 3,733,153 Users
  • 2,246,705 Discussions
  • 7,856,538 Comments

Discussions

How to set up thread_cache_size in MySQL 5.7

3643234
3643234 Member Posts: 2
edited October 2018 in MySQL Community Space

Hi,

We are using MySQL 5.7.22 On windows-2012R(16gb RAM,12 gb innodb buffer pool size)machine and we have observed many new threads have been created(1938) and threads_cached(4),threads connected(198) and threads running(4) therefore i am suspecting we need to tune thread cache size therefore kindly help how to determine required thread cache size and tune?  However, i have seen many queries are sleep and is it feasible to reduce wait time out from default 28800 sec to lower number?

Thanks in advance.

Regards,

Upender

Best Answer

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 350 Employee
    edited September 2018 Accepted Answer

    It is very rare to have to adjust the thread cache size (in your server's my.cnf or my.ini) unless you are seeing a lot of new connections constantly.  Setting the wait_timeout may do what you want. 

    I would suggest running MySQL Workbench to watch these connections to get more data/

Answers

  • Jim-D
    Jim-D Member Posts: 584 Bronze Crown
    edited September 2018

    Welcome Upender!  The Getting Started space is intended for discussions about the Oracle Developer Community, not for product-specific questions.

    There are tips on how to find the correct space on the   page, which also has instructions on how to change your display name so you're not just a number.

    In the ACTIONS box on the right of your post, you should be able to click on "Move", and then specify the correct space - such as   - so the MySQL experts can see your question.  (A moderator here may move the post for you.)

    Thanks and good luck!

    MOSC Move.png

  • Dave Stokes-MySQL Community Team-Oracle
    Dave Stokes-MySQL Community Team-Oracle MySQL Community Manager TexasMember Posts: 350 Employee
    edited September 2018 Accepted Answer

    It is very rare to have to adjust the thread cache size (in your server's my.cnf or my.ini) unless you are seeing a lot of new connections constantly.  Setting the wait_timeout may do what you want. 

    I would suggest running MySQL Workbench to watch these connections to get more data/

Sign In or Register to comment.