phpize compiling xcache, eaccelerator, APC etc

Discussion in 'PHP' started by eva2000, Jan 23, 2011.

  1. eva2000

    eva2000 Member

    Since I'm running litespeed 2 cpu license on a test server with php suexec disabled, I want to compare all 3 opcode caches. Just curious am I correct in assuming for litespeed, nginx and apache I'd use their respective phpize locations ?
    • litespeed lsapi = /usr/local/lsws/lsphp5/bin/phpize
    • nginx php-fpm = /nginxphp/bin/phpize
    • apache mod_php = /usr/bin/phpize

    i.e.

    Code:
    /usr/local/lsws/lsphp5/bin/phpize
    ./configure --enable-xcache --with-php-config=/usr/local/lsws/lsphp5/bin/php-config
    
    /nginxphp/bin/phpize
    ./configure --enable-xcache --with-php-config=/nginxphp/bin/php-config
    
    /usr/bin/phpize
    ./configure --enable-xcache --with-php-config=/usr/bin/php-config
    for apache
    Code:
    /etc/php.ini
    zend_extension = /usr/lib64/20090626/xcache.so
    for nginx
    Code:
    /nginxphp/etc/php.ini
    zend_extension = /nginxphp/lib/php/20090626/xcache.so
    for litespeed just going to build xcache from litespeed admin console
    or
    Code:
    /usr/local/lsws/lsphp5/etc/php.ini
    /usr/local/lsws/lsphp5/lib/php/20090626/xcache.so
    
    Code:
    locate phpize
    
    /nginxphp/bin/phpize
    /nginxphp/lib/php/build/phpize.m4
    /nginxphp/man/man1/phpize.1
    /usr/bin/phpize
    /usr/lib64/build/phpize.m4
    /usr/local/lsws/lsphp5/bin/phpize
    /usr/local/lsws/lsphp5/lib/php/build/phpize.m4
    /usr/local/lsws/lsphp5/man/man1/phpize.1
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/phpize
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/phpize.in
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/phpize.m4
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/man1/phpize.1
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/man1/phpize.1.in
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/phpize
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/phpize.in
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/phpize.m4
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/man1/phpize.1
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/man1/phpize.1.in
    /usr/local/src/nginxphp/php-5.3.5/scripts/phpize
    /usr/local/src/nginxphp/php-5.3.5/scripts/phpize.in
    /usr/local/src/nginxphp/php-5.3.5/scripts/phpize.m4
    /usr/local/src/nginxphp/php-5.3.5/scripts/man1/phpize.1
    /usr/local/src/nginxphp/php-5.3.5/scripts/man1/phpize.1.in
    /usr/local/src/php535/php-5.3.5/scripts/phpize
    /usr/local/src/php535/php-5.3.5/scripts/phpize.in
    /usr/local/src/php535/php-5.3.5/scripts/phpize.m4
    /usr/local/src/php535/php-5.3.5/scripts/man1/phpize.1
    /usr/local/src/php535/php-5.3.5/scripts/man1/phpize.1.in
    /usr/share/man/man1/phpize.1
    /usr/share/man/man1/phpize.1.gz
    
    Code:
    locate php-config
    /nginxphp/bin/php-config
    /nginxphp/man/man1/php-config.1
    /usr/bin/php-config
    /usr/local/lsws/lsphp5/bin/php-config
    /usr/local/lsws/lsphp5/man/man1/php-config.1
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/php-config
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/php-config.in
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/man1/php-config.1
    /usr/local/lsws/phpbuild/php-5.3.4/scripts/man1/php-config.1.in
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/php-config
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/php-config.in
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/man1/php-config.1
    /usr/local/lsws/phpbuild/php-5.3.5/scripts/man1/php-config.1.in
    /usr/local/src/nginxphp/php-5.3.5/scripts/php-config
    /usr/local/src/nginxphp/php-5.3.5/scripts/php-config.in
    /usr/local/src/nginxphp/php-5.3.5/scripts/man1/php-config.1
    /usr/local/src/nginxphp/php-5.3.5/scripts/man1/php-config.1.in
    /usr/local/src/php535/php-5.3.5/scripts/php-config
    /usr/local/src/php535/php-5.3.5/scripts/php-config.in
    /usr/local/src/php535/php-5.3.5/scripts/man1/php-config.1
    /usr/local/src/php535/php-5.3.5/scripts/man1/php-config.1.in
    /usr/share/man/man1/php-config.1
    Last edited: Jan 23, 2011
  2. eva2000

    eva2000 Member

    phpinfo for

    litespeed, nginx, apache

    [​IMG]

    [​IMG]

    [​IMG]
  3. eva2000

    eva2000 Member

    Decided to try it anyway and followed the outline steps in 1st post above, and installed xcache 1.3.1 on all three for litespeed, nginx and apache using same xcache configuration below just with different paths to xcache.so

    for litespeed

    Code:
    [xcache-common]
    zend_extension = /usr/local/lsws/lsphp5/lib/php/20090626/xcache.so
    
    [xcache.admin]
    xcache.admin.enable_auth = On
    xcache.admin.user = ""
    xcache.admin.pass = ""
    
    [xcache]
    xcache.shm_scheme =        "mmap"
    xcache.size  =               48M
    xcache.count =                2
    xcache.slots =                8K
    xcache.ttl   =                3600
    xcache.gc_interval =          7200
    
    xcache.var_size  =            4M
    xcache.var_count =             1
    xcache.var_slots =            8K
    xcache.var_ttl   =             0
    xcache.var_maxttl   =          0
    xcache.var_gc_interval =     300
    
    xcache.test =                Off
    ; N/A for /dev/zero
    xcache.readonly_protection = Off
    ; for *nix, xcache.mmap_path is a file path, not directory.
    ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
    ; 2 group of php won't share the same /tmp/xcache
    ; for win32, xcache.mmap_path=anonymous map name, not file path
    xcache.mmap_path =    "/dev/zero"
    
    
    ; leave it blank(disabled) or "/tmp/phpcore/"
    ; make sure it's writable by php (without checking open_basedir)
    xcache.coredump_directory =   ""
    
    ; per request settings
    xcache.cacher =               On
    xcache.stat   =               On
    xcache.optimizer =           Off
    
    [xcache.coverager]
    ; per request settings
    ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean$
    xcache.coverager =          Off
    
    ; ini only settings
    ; make sure it's readable (care open_basedir) by coverage viewer script
    ; requires xcache.coverager=On
    xcache.coveragedump_directory = ""
    
    for nginx

    Code:
    [xcache-common]
    zend_extension = /nginxphp/lib/php/20090626/xcache.so
    
    [xcache.admin]
    xcache.admin.enable_auth = On
    xcache.admin.user = ""
    xcache.admin.pass = ""
    
    [xcache]
    xcache.shm_scheme =        "mmap"
    xcache.size  =               48M
    xcache.count =                2
    xcache.slots =                8K
    xcache.ttl   =                3600
    xcache.gc_interval =          7200
    
    xcache.var_size  =            4M
    xcache.var_count =             1
    xcache.var_slots =            8K
    xcache.var_ttl   =             0
    xcache.var_maxttl   =          0
    xcache.var_gc_interval =     300
    
    xcache.test =                Off  
    ; N/A for /dev/zero                   
    xcache.readonly_protection = Off
    ; for *nix, xcache.mmap_path is a file path, not directory.
    ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
    ; 2 group of php won't share the same /tmp/xcache
    ; for win32, xcache.mmap_path=anonymous map name, not file path
    xcache.mmap_path =    "/dev/zero"
    
    
    ; leave it blank(disabled) or "/tmp/phpcore/"
    ; make sure it's writable by php (without checking open_basedir)
    xcache.coredump_directory =   ""
    
    ; per request settings              
    xcache.cacher =               On    
    xcache.stat   =               On
    xcache.optimizer =           Off
    
    [xcache.coverager]
    ; per request settings
    ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean$
    xcache.coverager =          Off
    
    ; ini only settings                       
    ; make sure it's readable (care open_basedir) by coverage viewer script      
    ; requires xcache.coverager=On      
    xcache.coveragedump_directory = ""
    for apache

    Code:
    [xcache-common]
    zend_extension = /usr/lib64/20090626/xcache.so
    
    [xcache.admin]
    xcache.admin.enable_auth = On
    xcache.admin.user = ""
    xcache.admin.pass = ""
    
    [xcache]
    xcache.shm_scheme =        "mmap"
    xcache.size  =               48M
    xcache.count =                2
    xcache.slots =                8K
    xcache.ttl   =                3600
    xcache.gc_interval =          7200
    
    xcache.var_size  =            4M
    xcache.var_count =             1
    xcache.var_slots =            8K
    xcache.var_ttl   =             0
    xcache.var_maxttl   =          0
    xcache.var_gc_interval =     300
    
    xcache.test =                Off
    ; N/A for /dev/zero
    xcache.readonly_protection = Off
    ; for *nix, xcache.mmap_path is a file path, not directory.
    ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
    ; 2 group of php won't share the same /tmp/xcache
    ; for win32, xcache.mmap_path=anonymous map name, not file path
    xcache.mmap_path =    "/dev/zero"
    
    
    ; leave it blank(disabled) or "/tmp/phpcore/"
    ; make sure it's writable by php (without checking open_basedir)
    xcache.coredump_directory =   ""
    
    ; per request settings
    xcache.cacher =               On
    xcache.stat   =               On
    xcache.optimizer =           Off
    
    [xcache.coverager]
    ; per request settings
    ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean$
    xcache.coverager =          Off
    
    ; ini only settings
    ; make sure it's readable (care open_basedir) by coverage viewer script
    ; requires xcache.coverager=On
    xcache.coveragedump_directory = ""
    [​IMG] [​IMG]

    [​IMG]
  4. Doraj1981

    Doraj1981 New Member

    Hello eva2000,

    according your experience, what opcode cache works better with LWS? Apc, Xcache or eAccellerator?

    Thank you for your informations!

Share This Page