Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cloudlinux:lsphp_criu_enable [2018/08/20 19:30]
Jackson Zhang [1. Verify CRIU is enabled on your system]
litespeed_wiki:cloudlinux:lsphp_criu_enable [2019/10/15 18:41] (current)
Lisa Clarke [Enabling CRIU on CloudLinux + cPanel EA4 + LSWS]
Line 1: Line 1:
-====== ​How to Enable LSPHP CRIU on CloudLinux ​and cPanel EA4 ======+====== ​Enabling ​CRIU on CloudLinux ​cPanel EA4 ======
  
-Checkpoint/​Restore In Userspace, or CRIU, is an open source project which dumps all of the information of a running process to disk and restores it at the point of the dump.  The LiteSpeed Enterprise Edition Web Server now supports CRIU for the CloudLinux implementation of the PHP processor. ​ This will improve the performance of LiteSpeed for transactions which are commonly used, and reduce the memory overhead ​on the server.+**IMPORTANT!! CRIU may cause stability issues! Enable CRIU AT YOUR OWN RISK!** 
 + 
 +Checkpoint/​Restore In Userspace, or CRIU, is an open source project which dumps all of the information of a running process to disk and restores it at the point of the dump.  The LiteSpeed Enterprise Edition Web Server now supports CRIU for the CloudLinux implementation of the PHP processor. ​ 
 + 
 +Howevergenerally, we don't recommend you enable CRIU unless you have a special requirement for it. CRIU uses significant server resources ​and may generate unusual errors while providing no performance benefits.  
 + 
 +**We have received quite a few reports that potential bugs on the CRIU module may cause web server ​stability issues. Please permanently disable CRIU, or enable CRIU AT YOUR OWN RISK**
  
 ===== Requirements ===== ===== Requirements =====
Line 12: Line 18:
 ===== Installation ===== ===== Installation =====
  
-==== 1. Verify CRIU is enabled on your system ====+==== Verify CRIU is enabled on your system ====
  
-Criu is installed with dependency to ea-apache24-mod_lsapi for cpanel EA4( or mod_lsapi for cpanel EA3) 1.1 and above package. If you have not installed it, you should:+Criu is installed with dependency to ea-apache24-mod_lsapi for cpanel EA4( or mod_lsapi for cpanel EA3) 1.1 and above package. ​ 
 + 
 +If you have not installed it, you should:
  
 <​code>​yum install liblsapi liblsapi-devel</​code>​ <​code>​yum install liblsapi liblsapi-devel</​code>​
 +
 +<​code>​
 +=============================================================================================================================================================================
 + ​Package ​                               Arch                          Version ​                                       Repository ​                                        Size
 +=============================================================================================================================================================================
 +Installing: ​                                                                                                                                                              
 + ​liblsapi ​                              ​x86_64 ​                       1.1-28.el7.cloudlinux ​                         cloudlinux-x86_64-server-7 ​                       180 k
 + ​liblsapi-devel ​                        ​x86_64 ​                       1.1-28.el7.cloudlinux ​                         cloudlinux-x86_64-server-7 ​                        37 k
 +Installing for dependencies: ​                                                                                                                                             ​
 + ​crit-lve ​                              ​x86_64 ​                       3.7-3.el7 ​                                     cloudlinux-x86_64-server-7 ​                       9.6 k
 + ​criu-lve ​                              ​x86_64 ​                       3.7-3.el7 ​                                     cloudlinux-x86_64-server-7 ​                       439 k
 + ​criu-lve-devel ​                        ​x86_64 ​                       3.7-3.el7 ​                                     cloudlinux-x86_64-server-7 ​                        11 k
 + ​libnet ​                                ​x86_64 ​                       1.1.6-7.el7 ​                                   cloudlinux-x86_64-server-7 ​                        58 k
 + ​protobuf-c ​                            ​x86_64 ​                       1.0.2-3.el7 ​                                   cloudlinux-x86_64-server-7 ​                        27 k
 + ​protobuf-python ​                       x86_64 ​                       2.5.0-8.el7 ​                                   cloudlinux-x86_64-server-7 ​                       129 k
 + ​python-criu-lve ​                       x86_64 ​                       3.7-3.el7 ​                                     cloudlinux-x86_64-server-7 ​                       136 k
 + ​python-ipaddr ​                         noarch ​                       2.1.11-1.el7 ​                                  ​cloudlinux-x86_64-server-7 ​                        34 k
 +                                                                                                                                                                          ​
 +Transaction Summary
 +=============================================================================================================================================================================
 +Install ​ 2 Packages (+8 Dependent packages)
 +</​code>​
 +
 <​code>​yum install ea-apache24-mod_lsapi</​code>​ <​code>​yum install ea-apache24-mod_lsapi</​code>​
  
Line 50: Line 81:
   Aug 20 19:24:25 globalsupport.litespeedtech.com criu[967641]:​ Warn  (criu/​kerndat.c:​660):​ Can't load /​run/​criu.kdat   Aug 20 19:24:25 globalsupport.litespeedtech.com criu[967641]:​ Warn  (criu/​kerndat.c:​660):​ Can't load /​run/​criu.kdat
  
 +====CRIU Master Switch on LSWS ====
 +CRIU is disabled by default. To enable it, you can go to LSWS Web Admin Console -> Server -> PHP -> PHP Global Configuration -> Enable CRIU( Again, we recommend you keep CRIU off unless you have some speical testing need only).
 +{{:​litespeed_wiki:​cloudlinux:​lsws-master-criu-switch.png?​800|}}
  
-====2. Check CRIU parameters====+==== Check CRIU parameters====
 In CloudLinux, LSPHP have been compiled with CRIU already. Please check [[https://​docs.cloudlinux.com/​index.html?​criu_support.html|here]] ​  \\ In CloudLinux, LSPHP have been compiled with CRIU already. Please check [[https://​docs.cloudlinux.com/​index.html?​criu_support.html|here]] ​  \\
 Use ''​phpinfo()''​ with parameter ''​-DWITH_CRIU''​ to check the LSPHP build. Use ''​phpinfo()''​ with parameter ''​-DWITH_CRIU''​ to check the LSPHP build.
Line 57: Line 91:
  
  
-====3. Configure the PHP environment====+====Configure the PHP environment====
 Add the following necessary parameter to the PHPx.x **External App > Environment** \\ Add the following necessary parameter to the PHPx.x **External App > Environment** \\
 <​code>​ <​code>​
  • Admin
  • Last modified: 2018/08/20 19:30
  • by Jackson Zhang