Reputation: 36098
i run my app on a linux os server with two dual core processors.
The thing is that on 'top' linux command, the second processor isn't loaded more than 10%, while the first one stays at 100% for 3-4 seconds on some scripts.
How can i use the power of those two CPU's of my server?
Upvotes: 0
Views: 2957
Reputation: 99921
The only way to use multiple cores is to run multiple threads or processes.
For web applications there is usually one PHP process per running script, so this is already the case: Multiple requests will use multiple cores automatically.
You can't use multiple cores for the same request though, but usually this doesn't matter for a web app.
Upvotes: 5