Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1696 Discussions

Any posibilities to multi-thread the application developed using PHP

infocom-solutions
1,102 Views
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
0 Kudos
4 Replies
Dmitry_Vyukov
Valued Contributor I
1,102 Views
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.

0 Kudos
PRAVEEN_R_Intel
Employee
1,102 Views
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
0 Kudos
Dmitry_Vyukov
Valued Contributor I
1,102 Views
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...

0 Kudos
Dmitry_Vyukov
Valued Contributor I
1,102 Views
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-php.html
0 Kudos
Reply