• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Zend Touts 2X Speedup With PHP 7 And New Runtime

    May 16, 2016 Alex Woodie

    The new release of Zend‘s PHP development language and PHP runtime will run twice as fast on Intel Xeon and IBM Power servers than previous versions, the company says. IBM i customers won’t need to do anything to take advantage of the speedup except use the new runtime, which should be available in the coming weeks.

    Zend, which is now owned by Rogue Wave Software, last week officially announced Zend Server 9, the newest version of the Zend runtime for Intel platforms. Zend Server 9 is based on PHP version 7, the newest version of the language, which the company shipped in 2015.

    The performance boost is the biggest new feature in Zend Server 9, but it didn’t come easy, according to Zend co-founder and CTO Zeev Suraski. “Basically we did two things–one that failed miserably, but showed a lot of promise in the beginning.” And another that actually paid dividends.

    JIT No Go

    The failed approach involved using a just in time (JIT) compiler for PHP code, similar to how Java and JavaScript work. The JIT approach showed great promise in the lab, giving PHP 7 performance gains of up to 6X compared to the PHP 5.6 codebase.

    But what sizzled in synthetic benchmarks fizzled on real-world PHP workloads, such as running a Magento e-commerce app or a WordPress content management system. Zend worked closely with Intel to figure out why the JIT approach wasn’t paying dividends.

    Fig A: Zend put key data structures on a memory diet with PHP 7

    “There were a lot of theories,” Suraski explains. “But the most substantial theory seemed to be that that because of relatively heavy memory utilization of PHP, the fact that the data structures are relatively large, you move a lot of data around–SQL queries, data coming from the Web, reading data back to the web–the optimization at the CPU level that we did were not delivering any meaningful performance gains.”

    So Suraski and his Zend colleagues went back to the drawing board. Since PHP’s memory utilization seemed to be so critical for complex workloads, the company decided to try to optimize its memory footprint. “We went ahead and did that and we actually reduced the data structures of PHP very substantially,” Suraski says.

    The company worked to slim down key components of the PHP stack. As you can see from Fig A, Zend shrunk the zVal (Zend value) structure from 24 bytes to 16 bytes, slimmed the hash table from 72 bytes to 56 bytes; and reduced the “bucket” from 72 bytes to 32 bytes.

    The memory diet resulted in a considerable improvement in how PHP used memory. For one particular app, the memory consumption went from 37 MB per request to about 5 MB, a 7X improvement. “You can’t always expect that,” Suraski says. “But you can expect anywhere from 50 percent better memory performance, up to 7X better performance, and maybe more.”

    Zend also took the knife to the Zend memory manager itself, slashing its CPU footprint by a considerable amount, as you can see by Fig B.

    Fig 2: The memory manager itself was also optimized in PHP 7

    The optimized memory structures and CPU optimization will benefit customers by delivering either a 2X performance boost, or a 1/2X reduction in server density, depending on how they slice it. “It really helps with both the performance and the density: How many concurrent PHP processes can your server serve at the same time without running out of memory,” he says. “So this number has shot through the roof with PHP 7. It can run a lot more processes using the same amount of memory and each process runs a lot more efficiently.”

    After the big JIT letdown, the memory breakthrough was a relief to Zend. “We refer to PHP 7 kind of like magic. We know how we did it, but to be perfectly honest, we were surprised by how much gain we realized just from doing those refactoring and compacting of the data structures,” Suraksi says.

    The Zend R&D team never went back to JIT. But now that it’s bolstered the memory footprint of PHP, the company may revisit JIT in the future to optimize the CPU utilization.

    Powering Up PHP

    Zend hasn’t benchmarked PHP 7 and Zend Server 9 on IBM Power Systems servers yet. But Suraski sees no reason why IBM i shops won’t see the same kind of benefits that optimizing the memory showed on Intel machines.

    “The memory consumption should be identical and my assumption is that from the performance perspective, it should be very similar, if not identical,” he says. “The changes that we made are not platform specific. And both platforms are 64 bit. We can expect very similar behavior for both platforms.”

    There’s the possibility that, owing to Power’s already-superior memory bandwidth compared to Intel Xeon architectures, that apps running atop PHP 7 and Zend Server 9 won’t see quite the same boost as they showed on Intel, Suraski concedes. “It might be we see slightly less performance improvement. Maybe moving that much memory in IBM i doesn’t slow things down as much as it does on Intel.”

    Fig 3: Evolution of PHP performance

    In any event, it’s academic until the new software starts hitting real-world workloads. That should come this summer, as the company expects to ship the version 9 release of Zend Server for IBM i in about two months, although an early release version of the code could be available within a matter of weeks.

    The delay in the IBM i runtime is due to the substantial amount of work that Zend had to do with this new release, Suraski says. “It’s not just a matter of recompiling, but you have to do a partial rewrite,” he says.

    Side-by-Side Install

    The performance gain is the headliner for PHP 7 and Zend Server 9, but there are several other enhancements that are worth noting. In particular, IBM i shops will benefit from a new feature that allows multiple versions of Zend Server to be installed on the same box. This will help make the move up from 5.x versions of PHP and their associated runtimes less painful, Suraski says.

    “A lot of people just update it and hope it will work in the same way,” he says. But with this feature, “Instead, you can actually install them side by side, copy the applications over, and make sure everything is working to your satisfaction, and then move the URL, the pointers to point to the PHP 7 version, and uninstall of PHP 5 when you’re confident that everything is working properly.”

    IBM i shops, in particular, will find this feature reassuring. “We wanted specifically for the IBM i crowd to have that piece of mind,” Suraski says, “instead of being on that bleeding edge of just upgrading and crossing their fingers. We wanted to give them the ability to do this more slowly.”

    The new release also brings new code tracing capabilities, which is primarily used to track down production problems in PHP applications and has been compared to an aircraft’s “black box” flight data recorder. Zend offered code tracing in the product before, but the new HTML5-based interface (compared to the old Flash-based UI) will make code tracing much more useful.

    “We’ve mastered code tracing,” Suraski says. “In terms of execution flow, we can see the whole thing–each and every step of the wait, each and every function that was called, the parameter that was passed to it all the way down to each and every detail. Everything is there. I believe people are going to start using it a lot more compared to previous versions.”

    Last but not least, the Z-Ray function, which is more geared toward developers, has also been improved in Zend Server 9. A new Z-Ray history feature will let developers see what just happened with a Magento application, for example. Developers can also now share their Z-Rays with this release.

    RELATED STORIES

    Zend Delivers Mobile App Enhancements to PHP Developers

    PHP And SQL Driving Modernization Strategies At IBM i Shops, Zend Says

    Zend Peers Deep into Your Code with Z-Ray

    Zend Server 6 for IBM i Goes GA

    Zend Adds Mobile, Problem-Resolution Features to PHP Stack

    Zend Updates PHP Server Stack for IBM i

    Zend Taps Percona to Provide Support and Maintenance for DBi

    Zend Reveals DBi, A New Version of MySQL for IBM i

    New Open Source PHP Toolkit for IBM i in the Works

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    WorksRight Software

    Do you need area code information?
    Do you need ZIP Code information?
    Do you need ZIP+4 information?
    Do you need city name information?
    Do you need county information?
    Do you need a nearest dealer locator system?

    We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

    The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

    PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

    Just call us and we’ll arrange for 30 days FREE use of either ZIP/CITY or PER/ZIP4.

    WorksRight Software, Inc.
    Phone: 601-856-8337
    Fax: 601-856-9432
    Email: software@worksright.com
    Website: www.worksright.com

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    System i Developer:  RPG & DB2 Summit - October 4-6 2016 in Chicago. Register now!
    UCG Technologies:  Are you confident in your hardware, data backup, DR, and security programs?
    Profound Logic Software:  'i on the Enterprise' Worldwide Virtual Event. June 8. Register Now!

    When You Reach Your Break(ing) Point. . . Or Not DB2 for i 7.2 TR3 and 7.1 TR11 Features

    Leave a Reply Cancel reply

Volume 26, Number 22 -- May 16, 2016
THIS ISSUE SPONSORED BY:

Profound Logic Software
ARCAD Software
UCG Technologies
Chrono-Logic
Manta Technologies

Table of Contents

  • Jazzing Up IBM i In COMMON’s Quarter
  • Zend Touts 2X Speedup With PHP 7 And New Runtime
  • Free Form RPG Scores IBM i Innovation Award
  • IBM Finally Gets Power8 Machines On SoftLayer Cloud
  • AURA Hopes U.S. Modernization Crowd Has Silver Lining

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • IBM Unveils Manzan, A New Open Source Event Monitor For IBM i
  • Say Goodbye To Downtime: Update Your Database Without Taking Your Business Offline
  • i-Rays Brings Observability To IBM i Performance Problems
  • Another Non-TR “Technology Refresh” Happens With IBM i TR6
  • IBM i PTF Guide, Volume 27, Number 18
  • Will The Turbulent Economy Downdraft IBM Systems Or Lift It?
  • How IBM Improved The Database With IBM i 7.6
  • Rocket Celebrates 35th Anniversary As Private Equity Owner Ponders Sale
  • 50 Acres And A Humanoid Robot With An AI Avatar
  • IBM i PTF Guide, Volume 27, Number 17

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle