Marc
Marc

Reputation: 9537

PHP MySQL - How to set the amount of scripts MySQL can manage at the same time

I have a php script that launches a little more than 100 other php scripts at the same time. I would like them to be executed at the same time, unfortunately their seem to be a queue as only a part is executed at the same time. So my question is simple. Is it possible to configure somewhere the number of php scripts MySQL can manage at the same time? Thank you in advance for your replies. Cheers. Marc

Upvotes: 0

Views: 49

Answers (1)

Maxim Krizhanovsky
Maxim Krizhanovsky

Reputation: 26699

In order to execute 100 processes at the same time, you need 100 cores. Unless your server has no 100 processors/cores, there is no way the scripts will be executed at the same time. In order the kernel to switch between them, you need to know how to write daemons and do not occupy too many resources in a single script. For example, put some sleeps, and while one script is sleeping, the OS will execute another, so the scripts will don't wait each other to finish, but will be run somehow simulatenously

Upvotes: 1

Related Questions