Welcome to Centmin Mod Community
Register Now

PHP-FPM Redis Cache + PHP 7RC7

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Matt Williams, Nov 22, 2015.

  1. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
    So I wanted to test today using Redis found here: Redis - How to install Redis server on Centmin Mod LEMP stack | Centmin Mod Community

    Code:
    yum -y install redis --enablerepo=remi --disableplugin=priorities
    chkconfig redis on
    service redis start
    
    Turned it on, followed all directions listed in the thread, installed the Redis Object Cache plugin and connected it. Monitored the output in SSH via redis-cli monitor and used the phpRedisAdmin and turned off memcached.


    and everything works just fine! php-fpm started up just fine. I thought Redis was not ready for php 7 yet?

    It works extremely well! Anyone else tried this yet?
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    redis server not same as redis php extension but what do you get for ?
    Code:
    php --ri redis
     
  3. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
    Code:
    [root@ngx ~]# php --ri redis
    Extension 'redis' not present.
    What's the difference between the 2? Is is a significant difference in using the php extention rather then the redis server?
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    redis and memcached server is what stores cached data, php extension for redis or memcached is what allows php to talk with redis or memcached server
     
  5. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
    The Redis cache plugin drops in a new object-cache.php file. I'm still really green with Redis lol! By me doing it like this, is it actually doing what it suppose to do? I surely looks like it is. I noticed a significant boost in page loading speed when redis was enabled and memcached was off.
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    check phpredis admin stats to see if it's caching ?
     
  7. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
  8. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nice.. according @Xon, php can be natively coded to talk to redis without php extension just slower too so could be the case for you.
     
  9. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
    if it can be faster then this, then I can't wait to see it. My test site is 2.5MB page size and it loads 729ms now - it was at 818ms until I added the redis.
     
  10. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    7:20 PM
    Mainline
    10.2
    XenForo or Wordpress?
     
  11. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
  12. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    2:50 PM
    1.9.x
    5.5
    yup . i read about that , in some test Redis cache is better than memcached and works good ;)

    by the way the centminmod final stable version is included redis cache and you can use on IPS 4.1 Or wordpress 4.3
     
  13. Matt Williams

    Matt Williams WordPress Fanatic

    537
    104
    43
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +157
    Local Time:
    7:20 AM
    latest
    10
    Well, here's the thing; When php 7 is finished with full redis support, when I upgrade all of my VM's, they'll automatically switch to use the PCEL Extension. ( Just tried it to see ) and it switched from using Predis to PCEL Extension.

    I added both plugins, the Redis Object Cache and the nginx helper. nginx helper because it automatically clears out redis cache when a post/page has been added or edited for only that post/page/update.
     
  14. KeVo

    KeVo Active Member

    180
    71
    28
    May 28, 2014
    Ratings:
    +101
    Local Time:
    6:20 AM
    1.11.x
    10.1.18
    *Unrelated to Matt's questions*

    Been out of the game for a minute and I come back to see that Redis cache seems to be the hot new thing now. What kind of differences/improvements are there with redis compared to the memcache?
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    read 4th post at Redis - How to install Redis server on Centmin Mod LEMP stack | Centmin Mod Community for WP super cache vs redis caching = redis ~45% faster

    redis and memcached will be close in performance
     
  16. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    7:20 PM
    Mainline
    10.2
  17. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  18. rdan

    rdan Well-Known Member

    5,449
    1,410
    113
    May 25, 2014
    Ratings:
    +2,204
    Local Time:
    7:20 PM
    Mainline
    10.2
    Ow, I miss that :D
    Thanks.
     
  19. rok

    rok New Member

    4
    1
    3
    Dec 24, 2015
    Ratings:
    +2
    Local Time:
    6:20 PM
    1.68
    10
    hope admin @eva2000 will release centmin with option like menu 22: install wordpress+ redis
    It's amazing ...
     
  20. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    9:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    maybe in future, but for 123.09beta01 branch I have the nginx vhost code setup and available for WP Super Cache, KeyCDN Cache Enabler and Redis caching at Nginx level. The latter 2 are commented out by default :) Of course for Redis still need to install and configure Redis server too.