mongodb - what does mysql thread mean?
过去多啦不再A梦
过去多啦不再A梦 2017-05-17 10:03:51
0
1
765

For example, if I open a website, how do I understand its connection thread? What are multi-threading and multi-process? Please help me.

过去多啦不再A梦
过去多啦不再A梦

reply all(1)
某草草

Professional explanation http://www.ruanyifeng.com/blo...

In layman’s terms, threads and processes are all designed to make full use of CPU resources. In order to let the CPU execute the program in a more orderly and efficient manner, the program needs to be divided into blocks. The operating system can schedule the program as a process, and there are as many processes as there are running programs. However, some programs may occupy a large amount of CPU resources. If the process cannot be subdivided and the CPU resources cannot be used more efficiently, the process will be divided into multiple threads. How to divide threads is up to the program itself.

MySQL is a multi-threaded architecture. A query or a process can be divided into multiple threads for calculation according to its operation attributes. The number of threads is determined by the configuration. Most of us do not need to care about the number of MySQL threads, except for the need to deeply optimize MySQL. An instance of mysql is a process. Generally, there is only one mysql process, but multiple MYSQL instances can also be started at the same time, and then there will be multiple MYSQL processes.

In practical applications, it is uncommon to use multiple MYSQL instances. If you are worried that the WEB service and MYSQL process competing for resources will affect the efficiency of data processing, you can divide MYSQL into independent servers.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template