4,413 Posts served
10,771 Conversations started
- Academic

- Android

- Art, Music, & Animation

- Embedded Computing

- Events

- Game Development

- Graphics & Media

- Intel SW Partner Program

- Intel® AppUp Developer Program

- Manageability & Security

- Mobility

- Open Source

- Parallel Programming

- Performance and Optimization

- Power Efficiency

- Server

- Site News & Announcements

- Software Tools

- Association for Computing Machinery TechNews (ACM)
- Go Parallel! (Dr. Dobbs)
- HPCwire (Tabor Communications, Inc.)
- insideHPC (John West)
- Joe Duffy's Weblog (Microsoft)
- Microsoft Parallel Programming Development Center (Microsoft Germany)
- MultiCoreInfo.com
- scalability.org (Scalable Informatics)
- Software Dev Blog (Intel Germany)
- Soft Talk Blog (Intel United Kingdom)
- The Moth (Microsoft)
Parallel PHP (HipHop) using TBB, Kiwi Style
By James Reinders (Intel) (46 posts) on May 4, 2011 at 10:54 am
I've been chatting with a small group of dedicated fans of Intel Threading Building Blocks (TBB) in New Zealand. They've been looking at adding parallelism, using TBB, to WordPress, PHP, HipHop, Perl, and other open source projects. They have published their code and some interesting results. They have a web site http://openparallel.com explaining some of their work.
The PHP (HipHip) project, using TBB, is hosted at https://github.com/openparallel/hiphop-php
Their PHP wrapper has been primarily implemented as an extension for the HipHop PHP compiler. This provides a thread-safe compiled implementation of PHP 5.2 with a fairly comprehensive set of libraries.
Their first version includes:
parallel_for / parallel_for_array - provides the TBB parallel_for functionality with PHP arrays for input and output.
concurrent_vector - this PHP extension class wraps the TBB concurrent_vector and provides thread-safe access to a vector type collection.
concurrent_hash_map - this PHP extension class wraps the TBB concurrent_hash_map and provides thread-safe access to a hash collection keyed on any PHP type.
concurrent_globals - this function provides thread-safe, read-only access to the PHP global variables. (These are normally thread-local in HipHop, where a thread is typically associated with a web request).
Some PHPDoc documentation has been produced for these functions and ore is being worked on. They are also looking at conventional PHP extensions to enable application developers to run an application that uses TBB extensions in the conventional PHP interpreter for development and testing purposes. In this case, all operations will execute on a single thread. This would support single source.
They presented much of their early work in January at a conference in Australia. I couldn't swing visiting there myself, so I've resigned myself to occassional emails and phone calls to catch-up with them.
Here's what they've done that I've spoken with them about:
They made slight modifications to WordPress, to use a TBB-enabled HipHop they created - and they had VERY impressive results. The bigger surprise was the huge drop in memory footprint. They have theories why, but this seems to have been the leading reason for the higher performance. Sometime algorithm changes improve performance for unexpected reasons! You can read their two short white papers on what they did:
http://openparallel.wordpress.com/2010/11/01/tbb-in-wordpress-%E2%80%93-white-paper/
and
http://openparallel.wordpress.com/2010/11/01/wordpress-on-hiphop-white-paper/
I know they interested in hearing from developers of like mind (wanting to add parallelism to open source projects) - but they really enjoy talking with projects that want help improving performance. Given their results with PHP/HipHop so far, they would seem to be worth contacting for such work.
Parallelism is worth adding in many places. It's fun to see the results with PHP so far!
I know they are working on Perl too... I'll catch up with them on that work and write a blog next week with what I find.
Categories: Open Source, Parallel Programming, Performance and Optimization, Software Tools
Tags: C++, DataParallel, Open Source, parallel programming, parallelism, TBB, Threading Building Blocks
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (1)
Trackbacks (5)
- Parallel PHP (HipHop) using TBB, Kiwi Style – Intel Software … | Internet blog
May 4, 2011 4:00 PM PDT - Parallel PHP: Open Parallel and Intel « Multicore NZ
May 5, 2011 3:43 PM PDT - Parallel PHP (HipHop) using TBB, Kiwi Style
May 6, 2011 11:51 PM PDT - Open Parallel: leaders in Parallel Perl and Parallel PHP/HipHop using TBB. From Director of Software Products, Intel « Erdödy Consultancy Ltd
May 11, 2011 9:18 PM PDT - Parallel PHP (HipHop) using TBB, Kiwi Style | Performance Tuning and Intel | Syngu
July 13, 2011 5:44 AM PDT


c00ler
40
I got a Virus alert on this page ??? JS/AK.Kryptic on my NOD antivirus ?