The social network no longer reflects the PHP in C + +. Instead, the social network uses a virtual machine for the server a dynamically generated bytecode.
Facebook has reached a new milestone in the treatment of web programming language PHP. The social network has developed web up to nine times faster than when running natively on large systems a PHP virtual machine capable of performing the language. "Our aim is to run the PHP very quickly," said Joel Pobar, director of engineering at Facebook, at the O'Reilly Open Source Conference (OSCON), held last week (July 22-26) in Portland, Oregon. To achieve this, the social network from the beginning of the year using the HipHop Virtual Machine Virtual Machine (HHVM) for all of its servers.
The HHVM is not the first attempt by Facebook to expedite the processing of PHP. This language is interpreted, we need the source code to be executed directly by the processor. In general, programs written in interpreted languages like PHP does not run as fast as languages such as C or C + +, which are compiled in advance in machine language. Facebook remained faithful to PHP because it is understood by most of its web programmers. To cope with the demand never satisfied users, Facebook has developed a compiler to translate the name of HipHop PHP code in C + + upstream and increase its performance. For several years, the social network has drawn considerable performance gains from the use of this first version of HipHop, and he sought other means to accelerate the delivery of dynamic web pages and a billion more users. "In terms of performance, we came to a sort of ceiling," admitted the director of engineering.
A compiler just-in-time in the VM
For about three years, expanding its Facebook HHVM virtual machine. It works exactly the same principle as the Java (JVM) virtual machine. The HHVM machine integrates a just-in-time (JIT) compiler that converts source code into human-readable byte machine code when needed. (The former HipHop compiler renamed HPHPc is no longer used in Facebook today). The JIT approach allows the virtual machine "to make smarter decisions at runtime," said Joel Pobar. For example, if a request is sent to the MySQL database to read a line of data, HHVM can, on the fly, to understand what kind of data it is, if it is an integer or a string. It can generate on the fly or call code best suited to treat such or such data.
"The best thing that could make the former HipHop was to analyze the entire code base of Facebook, understand the meaning and then deliver a specialized code based on what he understood. But he was not able to complete the process in one go. But some parts of the code base are simply impossible to infer, "said the director of engineering. He believes that HHVM virtual machine is about two times faster than was the HPHPc and about nine times faster than PHP runs natively.
Facebook has released the code of the machine HHVM on GitHub repository, hoping that others will also use PHP to accelerate their web sites. HHVM the virtual machine is optimized to handle very large amounts of PHP code base, and widely used. According to Joel Pobar, the use of virtual machine HHVM improve the performance of sites such as those that host Wordpress blogs, about five times.
Facebook has reached a new milestone in the treatment of web programming language PHP. The social network has developed web up to nine times faster than when running natively on large systems a PHP virtual machine capable of performing the language. "Our aim is to run the PHP very quickly," said Joel Pobar, director of engineering at Facebook, at the O'Reilly Open Source Conference (OSCON), held last week (July 22-26) in Portland, Oregon. To achieve this, the social network from the beginning of the year using the HipHop Virtual Machine Virtual Machine (HHVM) for all of its servers.
The HHVM is not the first attempt by Facebook to expedite the processing of PHP. This language is interpreted, we need the source code to be executed directly by the processor. In general, programs written in interpreted languages like PHP does not run as fast as languages such as C or C + +, which are compiled in advance in machine language. Facebook remained faithful to PHP because it is understood by most of its web programmers. To cope with the demand never satisfied users, Facebook has developed a compiler to translate the name of HipHop PHP code in C + + upstream and increase its performance. For several years, the social network has drawn considerable performance gains from the use of this first version of HipHop, and he sought other means to accelerate the delivery of dynamic web pages and a billion more users. "In terms of performance, we came to a sort of ceiling," admitted the director of engineering.
A compiler just-in-time in the VM
For about three years, expanding its Facebook HHVM virtual machine. It works exactly the same principle as the Java (JVM) virtual machine. The HHVM machine integrates a just-in-time (JIT) compiler that converts source code into human-readable byte machine code when needed. (The former HipHop compiler renamed HPHPc is no longer used in Facebook today). The JIT approach allows the virtual machine "to make smarter decisions at runtime," said Joel Pobar. For example, if a request is sent to the MySQL database to read a line of data, HHVM can, on the fly, to understand what kind of data it is, if it is an integer or a string. It can generate on the fly or call code best suited to treat such or such data.
"The best thing that could make the former HipHop was to analyze the entire code base of Facebook, understand the meaning and then deliver a specialized code based on what he understood. But he was not able to complete the process in one go. But some parts of the code base are simply impossible to infer, "said the director of engineering. He believes that HHVM virtual machine is about two times faster than was the HPHPc and about nine times faster than PHP runs natively.
Facebook has released the code of the machine HHVM on GitHub repository, hoping that others will also use PHP to accelerate their web sites. HHVM the virtual machine is optimized to handle very large amounts of PHP code base, and widely used. According to Joel Pobar, the use of virtual machine HHVM improve the performance of sites such as those that host Wordpress blogs, about five times.
0 comments:
Post a Comment