5209R: Milestone reached

Posted by: mstauber Category: Development

The BlueOnyx 5209R development has just reached another important milestone.

Greg Kuhnert and I took another long and hard look at 5209R and how we can possibly speed it up. We're also talking with Hisao Shibuya about some CCEd improvements that he had been working on.

In the meantime we then took a look at the obvious skeletons in the closet. Namely those PHP modules that wouldn't compile against PHP-5.4 and which got replaced with PHP classes instead:

cce.so
i18n.so

In previous entries of the BlueOnyx developer blog I reported in detail what these problems were and how we had solved them on the interim. That interim fix had involved replacing the PHP modules with native PHP classes which (in the absence of the PHP modules) provided the same functionality. However: A compiled binary is always faster than native PHP code. And there are means and methods that a binary can do, which native PHP can't. So while that worked, it was pretty darn slow.

So Greg and I took another look at this and managed to replicate the steps that I had done almost a year ago when I tried this the first time. The resulting cce.so would build, but if loaded into PHP our Apache would throw this error message:

/usr/lib64/php/modules/cce.so: undefined symbol: getParameters in Unknown on line 0

I exhausted all my Google-fu on this one. Usually searches for the error message (or critical parts of it) point to problem reports and sometimes some of these have the solution. Or something that gets you closer to it. This one? Turned out to be a bit more elusive. Eventually I found a page. It was in French and only still available in the Google cache as the original page had gone away.

So at the end of the day there were only three substitutions that needed to be made:

cd /home/devel/BlueOnyx/trunk/BlueOnyx/5209R/utils/cce
sed -ie "s/^function_entry/zend_function_entry/" client/php/src/cce.c
sed -ie "s/pval/zval/" client/php/src/cce.c
sed -ie "s/getParameters/zend_get_parameters/" client/php/src/cce.c

The missing bit was the last one that transforms "getParameters" to "zend_get_parameters". With that in place our cce.so module compiled and loaded just fine. I gave i18n.c the same treatment and it also built a fully working i18n.so.

So I just published the following updated 5209R RPMs to the YUM repositories:

base-admserv-capstone-2.2.0-0BX24.el7.noarch.rpm
base-admserv-glue-2.2.0-0BX24.el7.noarch.rpm
base-blueonyx-capstone-5209R-4.20150719BX26.el7.noarch.rpm
base-blueonyx-glue-5209R-4.20150719BX26.el7.noarch.rpm
sausalito-cce-client-0.99.2-1BX01.el7.x86_64.rpm
sausalito-cce-server-0.99.2-1BX01.el7.x86_64.rpm
sausalito-i18n-0.81.2-0BX03.el7.x86_64.rpm
sausalito-i18n-devel-0.81.2-0BX03.el7.x86_64.rpm

The whole batch of changes can be found in SVN.

Net result:

It makes quite a difference as far as page loading times are concerned.

Our cce.so replacement in PHP was about 5-6x slower than cce.so. And our hack'ish i18n.so replacement (needed for the GUI locales) was about 6-8x slower than i18n.so.

Now with cce.so and i18n.so back in place and working correctly all GUI pages load noticeably faster.

Just two examples:

Site Management:     0.37 seconds instead of 1.4 seconds.
Installed Software:    0.42 seconds instead of 1.8 seconds.

On the average we're now 1-1.5 seconds faster on all page loads. There are some "fatter" GUI pages with lots of CCE commands where the speed increase is even in the range of 2-3 seconds.

This doesn't entirely exhaust the steam of our "need for speed" intiative and we'll be looking at ways to make CCEd itself faster. Hisao Shibuya of BlueQuartz.org has already done some really interesting work in that regards.

Many thanks to Greg Kuhnert, Steven Howes and Hisao Shibuya for their help, input, suggestions and insights on helping us to overcome this obstacle.


Return
General
Jul 19, 2015 Category: Development Posted by: mstauber
Next page: Features