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

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    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

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    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

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    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

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    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.
     
    • Like Like x 1
  6. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    check phpredis admin stats to see if it's caching ?
     
  7. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    latest
    10
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    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.
     
    • Like Like x 1
  9. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    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.
     
    • Like Like x 2
  10. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    9:51 AM
    1.11
    10.2
    XenForo or Wordpress?
     
  11. Matt Williams

    Matt Williams WordPress Fanatic

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    latest
    10
  12. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    5:21 AM
    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

    468
    90
    28
    Nov 22, 2014
    Virginia, USA
    Ratings:
    +135
    Local Time:
    9:51 PM
    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.
     
    • Informative Informative x 1
  14. KeVo

    KeVo Active Member

    179
    70
    28
    May 28, 2014
    Ratings:
    +100
    Local Time:
    8:51 PM
    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

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    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. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    9:51 AM
    1.11
    10.2
  17. eva2000

    eva2000 Administrator Staff Member

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    • Like Like x 1
  18. RoldanLT

    RoldanLT Well-Known Member

    3,901
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    9:51 AM
    1.11
    10.2
    Ow, I miss that :D
    Thanks.
     
  19. rok

    rok New Member

    4
    1
    3
    Dec 24, 2015
    Ratings:
    +2
    Local Time:
    8:51 AM
    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

    30,156
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    11:51 AM
    Nginx 1.13.x
    MariaDB 5.5
    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.