Join the community today
Become a Member

Wordpress Redis cache + Opcode cache (APC/Xcache)

Discussion in 'Blogs & CMS usage' started by duydangle, Jan 18, 2016.

  1. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    I am using redis cache and the site performance is very good. Now I want to know if we can use apc/xcache additional to redis cache to improve the performance?

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    So I do not need to config anything to use Zend Opcache to optimize Wordpress but it's done automatically? As I had experienced with Xenforo I had to write in config.php to use APC/Xcache.
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes nothing to do as Zend Opcache is opcache only, APC Cache/XCache do opcache of php code and data caching which Xenforo config.php is for. With Zend Opcache Xenforo does opcache only, for data cache need to configure memcache, memcached, libmemcached or redis caching.
     
    Last edited: Jan 20, 2016
  5. Ahmad

    Ahmad Active Member

    209
    80
    28
    Apr 13, 2015
    Ratings:
    +150
    Local Time:
    10:58 AM
    1.9.9
    10.1.10
    I think you mean "memcache, memcached" :p
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    i did :)
     
  7. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    Hey @eva2000 I want to ask about redis extension with php7 on .09beta01. I remembered you added redis with php7 on the beta branch but I just tested .09beta01 on centos 7 and redis doesn't compile.
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    how are you verifying redis didn't compile ? errors ? exact error messages ?

    when did you download and install 123.09beta01 ? make sure you're using latest updated version Beta Branch - Centmin Mod .09 beta branch Testing | Centmin Mod Community

    You can see update history for centmin mod 123.09beta01 Commits · centminmod/centminmod · GitHub

    latest should compile redis php 7 extension when you run centmin.sh menu option 5 to recompile PHP or on fresh initial installs of 123.09beta01
     
  9. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    I tried re-compile php and redis still doesn't appear on php-m extensions list.

    Just checked install logs and there're errors:
    Code:
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty
    install lib/resty/*.lua //usr/local/lib/lua//resty
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty
    install lib/resty/*.lua //usr/local/lib/lua//resty
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty
    install lib/resty/*.lua //usr/local/lib/lua//resty
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty/dns
    install lib/resty/dns/*.lua //usr/local/lib/lua//resty/dns/
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty
    install lib/resty/*.lua //usr/local/lib/lua//resty
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty/websocket
    install lib/resty/websocket/*.lua //usr/local/lib/lua//resty/websocket/
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty/
    install lib/resty/*.lua //usr/local/lib/lua//resty/
    make: *** No rule to make target `clean'.  Stop.
    install -d //usr/local/lib/lua//resty
    install lib/resty/*.lua //usr/local/lib/lua//resty
    rm -f *.so *.o redis/*.so
    install -d //usr/local/lib/lua/5.1/redis
    install parser.so //usr/local/lib/lua/5.1/redis
    install: cannot stat ‘parser.so’: No such file or directory
    make: *** [install] Error 1
    mv: cannot stat ‘/usr/local/lib/lua/resty/redis/*’: No such file or directory
    Code:
    mkdir: cannot create directory '.libs': File exists
    /usr/bin/gcc -I. -I/svr-setup/phpredis-2.2.7 -DPHP_ATOM_INC -I/svr-setup/phpredis-2.2.7/include -I/svr-setup/phpredis-2.2.7/main -I/svr-setup/phpredis-2.2.$
    /usr/bin/gcc -I. -I/svr-setup/phpredis-2.2.7 -DPHP_ATOM_INC -I/svr-setup/phpredis-2.2.7/include -I/svr-setup/phpredis-2.2.7/main -I/svr-setup/phpredis-2.2.$
    In file included from /svr-setup/phpredis-2.2.7/library.c:4:0:
    /svr-setup/phpredis-2.2.7/common.h:3:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
    #include <ext/standard/php_smart_str.h>
                                            ^
    compilation terminated.
    In file included from /svr-setup/phpredis-2.2.7/redis.c:27:0:
    /svr-setup/phpredis-2.2.7/common.h:3:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
    #include <ext/standard/php_smart_str.h>
                                            ^
    compilation terminated.
    make: *** [library.lo] Error 1
    make: *** Waiting for unfinished jobs....
    make: *** [redis.lo] Error 1
    
    I guess phpredis wrong branch? Error on installing extension · Issue #682 · phpredis/phpredis · GitHub
     
    Last edited: Jan 21, 2016
  10. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  11. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    Update: I found that in /svr-setup/ there's no redis-php but there is phpredis-2.2.7
    so I think centminmod wrongly detected which redis branch to download and compile.
     
  12. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
  13. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    in /root/centminlogs find the most recent php upgrade log and post contents of that log to pastebin.com or gist.github.com

    you can find latest with listing files in date ascending order
    Code:
    ls -lAhrt /root/centminlogs
     
  14. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Just tested on fresh 123.09beta01 install for centmin.sh menu option 5 upgrade to php 7.0.2 and no problems redis is there

    Code:
    php -v
    PHP 7.0.2 (cli) (built: Jan 21 2016 03:06:19) ( NTS )
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    
    Code:
    php --ri redis
    
    redis
    
    Redis Support => enabled
    Redis Version => 2.2.5
    
    Code:
    php -m
    [PHP Modules]
    bcmath
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    enchant
    exif
    filter
    ftp
    gd
    geoip
    gettext
    gmp
    hash
    iconv
    igbinary
    imagick
    imap
    intl
    json
    libxml
    mailparse
    mbstring
    mcrypt
    memcache
    memcached
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    posix
    pspell
    readline
    redis
    Reflection
    session
    shmop
    SimpleXML
    snmp
    soap
    sockets
    SPL
    sqlite3
    standard
    sysvmsg
    sysvsem
    sysvshm
    tidy
    tokenizer
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Zend OPcache
    From php upgrade log in /root/centminlogs
    Code:
    ----------------------------------------------------------------------
    Libraries have been installed in:
       /svr-setup/redis-php7/modules
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
       - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
         during execution
       - add LIBDIR to the `LD_RUN_PATH' environment variable
         during linking
       - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
       - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.
    ----------------------------------------------------------------------
    
    Build complete.
     
  15. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
  16. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    so you set 7.0.2 as default for initial centmin mod install ? how did you set 7.0.2 version for initial install ? via the new betainstaller7.sh curl method https://community.centminmod.com/posts/24267/ or edit centmin.sh to set PHP version to 7.0.2 ?
     
  17. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    I use centmin.sh menu 1 to install and edit php version in centmin.sh file.
     
  18. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    k well i noticed in centmin mod initial install log file you have cascading errors all the way from ccache install if that doesn't install properly, the rest of the source compiled stuff like php, nginx won't install properly too
    Code:
    [1;32;40m* Post-Install Check List....
    (B[m*************************************************
    
    [1;33;40m--------------------------------------------------------
    (B[m[1;33;40mCheck ccache Version:
    (B[m[1;33;40m--------------------------------------------------------
    (B[minc/centminfinish.inc: line 43: ccache: command not found
    
    [1;33;40m--------------------------------------------------------
    (B[m[1;33;40mCheck Nginx Version:
    (B[m[1;33;40m--------------------------------------------------------
    (B[minc/centminfinish.inc: line 49: nginx: command not found
    
    [1;33;40m--------------------------------------------------------
    (B[m[1;33;40mCheck PHP-FPM Version:
    (B[m[1;33;40m--------------------------------------------------------
    (B[minc/centminfinish.inc: line 55: php: command not found
    did you have any previous centmin mod versions installed prior to 123.09beta01 install ? as centmin.sh menu option 1 is only for fresh CentOS with no previous centmin mod installed versions..

    to update from older centmin mod to 123.09beta01 follow instructions outlined at Beta Branch - Centmin Mod .09 beta branch Testing | Centmin Mod Community and also at Upgrade Centmin Mod - CentminMod.com LEMP Nginx web stack for CentOS

    the install log suggests you did have previous centmin mod install as the yum installed parts were all listed as 'already installed and the ccache 3.2.4 install was processed as an upgrade and not a fresh install and that only happens if older ccache version was detected
     
  19. duydangle

    duydangle Member

    43
    7
    8
    May 30, 2014
    Ratings:
    +10
    Local Time:
    3:58 PM
    1.9.9
    10
    Yeh the first time I installed I Ctrl+C to edit sth. I will check again.
     
  20. eva2000

    eva2000 Administrator Staff Member

    55,417
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,837
    Local Time:
    6:58 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Strange double checking and some parts seem to be exhibiting a fresh install and compiles fine but some are reporting commands as not found