Any posibilities to multi-thread the application developed using PHP

Any posibilities to multi-thread the application developed using PHP

Hi!,

We are developing a campus ERP solution that runs on the LAMP platform using Intel processors. I would like to know how you can help us in speeding up this application by helping us to make use of the Intel multi-core architecture. Our application typically runs on a quad core processor machine. A couple of ways I can think of and for which I would request more information from you are

1) How can we write multi-threaded code in PHP , maybe by using any third part tools or any special Intel tools that let you do this.

2) Help us in configuring the Linux installation to make use of the multi-core processor and then use Intel tools to monitor the benefits.

Please do the needful at the earliest.

Cheers!
Praveen

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - pavihunt@rediffmail.com
Hi!,

We are developing a campus ERP solution that runs on the LAMP platform using Intel processors. I would like to know how you can help us in speeding up this application by helping us to make use of the Intel multi-core architecture. Our application typically runs on a quad core processor machine. A couple of ways I can think of and for which I would request more information from you are

1) How can we write multi-threaded code in PHP , maybe by using any third part tools or any special Intel tools that let you do this.

2) Help us in configuring the Linux installation to make use of the multi-core processor and then use Intel tools to monitor the benefits.

Hmmm, I think that Apache will just start every request processing in different process/thread, so you will benefit from multi-core transparently.

You really must NOT try to parallelize at intra-request level! You must parallelize at highest possible level, and for server software it's request level.

All about lock-free algorithms, multicore, scalability, parallel computing and related topics: http://www.1024cores.net

Quoting - Dmitriy Vyukov

Hmmm, I think that Apache will just start every request processing in different process/thread, so you will benefit from multi-core transparently.

You really must NOT try to parallelize at intra-request level! You must parallelize at highest possible level, and for server software it's request level.

Hi, We are interested in threading at the Server level. Ad Php dose not suport threading. Pls share the work arround along withsome supportive documentif any and do the needful.

Suggestion are highly appreciated.

Praveen

Quoting - pavihunt@rediffmail.com
Hi!,

We are developing a campus ERP solution that runs on the LAMP platform using Intel processors. I would like to know how you can help us in speeding up this application by helping us to make use of the Intel multi-core architecture. Our application typically runs on a quad core processor machine. A couple of ways I can think of and for which I would request more information from you are

1) How can we write multi-threaded code in PHP , maybe by using any third part tools or any special Intel tools that let you do this.

2) Help us in configuring the Linux installation to make use of the multi-core processor and then use Intel tools to monitor the benefits.

For parallelization of PHP code you can use multiple processes, shared memory, semaphores and message queues:
http://www.php.net/manual/en/book.sem.php
http://www.php.net/manual/en/book.exec.php
However probably PHP is not the best language for that...

All about lock-free algorithms, multicore, scalability, parallel computing and related topics: http://www.1024cores.net

Here is an example of creation of "threads" in PHP and communication between them via message passing:
http://www.alternateinterior.com/2007/05/multi-threading-strategies-in-p...

All about lock-free algorithms, multicore, scalability, parallel computing and related topics: http://www.1024cores.net

Leave a Comment

Please sign in to add a comment. Not a member? Join today