开发者

Using more than one CPU in PHP

i run my app on a l开发者_C百科inux 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜