Learn about Centmin Mod LEMP Stack today
Register Now

Install Redis Multi cache installation help

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Dnyan, Aug 10, 2019.

  1. Dnyan

    Dnyan Member

    65
    10
    8
    Sep 16, 2017
    Ratings:
    +12
    Local Time:
    8:24 AM
    1.17.2
    10.1.41
  2. eva2000

    eva2000 Administrator Staff Member

    42,268
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    12:54 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
  3. Dnyan

    Dnyan Member

    65
    10
    8
    Sep 16, 2017
    Ratings:
    +12
    Local Time:
    8:24 AM
    1.17.2
    10.1.41
    is those commands are correct for second instance.

    Code:
    cd /svr-setup
    wget -O redis-generator.sh https://github.com/centminmod/centminmod-redis/raw/master/redis-generator.sh
    chmod +x redis-generator.sh
    redis-generator.sh install
     
  4. eva2000

    eva2000 Administrator Staff Member

    42,268
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    12:54 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    due to cd /svr-setup command you downloaded redis-generator.sh to /svr-setup/redis-generator.sh instead of where your current working directory is
     
  5. Dnyan

    Dnyan Member

    65
    10
    8
    Sep 16, 2017
    Ratings:
    +12
    Local Time:
    8:24 AM
    1.17.2
    10.1.41
    where i should download to it.
    /usr/bin/redis-server ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    42,268
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    12:54 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    it's just a script don't download to /usr/bin where system binaries !

    you can create your own directory for your own scripts i.e. /root/mytools
    Code (Text):
    mkdir -p /root/mytools
    cd /root/mytools
    wget -O redis-generator.sh https://github.com/centminmod/centminmod-redis/raw/master/redis-generator.sh
    chmod +x redis-generator.sh
    


    there's no such install command for redis-generator.sh it doesn't need installing just downloading to run.

    I suggest you create a test VPS with test centmin mod 123.09beta01 install from hourly VPS provider and test redis-generator.sh and tools outlined at https://github.com/centminmod/centminmod-redis on test VPS until you are familar as there's no support by me, so if you screw up your live VPS, you'd be on your own
     
  7. Dnyan

    Dnyan Member

    65
    10
    8
    Sep 16, 2017
    Ratings:
    +12
    Local Time:
    8:24 AM
    1.17.2
    10.1.41
    Ok Thank You|

    Will it have any effect if i installed instances and left it unused like without doing configuration in src/config file for redis cache.

    What are the ways of removing those instances.
     
  8. eva2000

    eva2000 Administrator Staff Member

    42,268
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    12:54 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Redis installed and not configured to be used by xenforo will just sit there idling consuming some ideal memory resources. Removal is also outlined via the delete command at https://github.com/centminmod/centminmod-redis as it's provided as is.
     
    • Like Like x 1
  9. EckyBrazzz

    EckyBrazzz Active Member

    767
    153
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +280
    Local Time:
    11:54 PM
    1.17.x Cluster
    10.3.x Cluster & Redis
    Hi,

    I have a question. I installed Redis using this guide. https://community.centminmod.com/threads/how-to-install-redis-server-on-centmin-mod-lemp-stack.4546/

    I used that Installer because it uses YUM and updates it with a cron. Actually I did not look at the project on Github. So I don't know what it does.

    What is the best option. Install with the Git or the above indicated link. It's for my WP Multi site project and for more WP sites

    The Redis CLI give me this info
    Code (Text):
    redis_version:5.0.5
    redis_git_sha1:00000000
    redis_git_dirty:0
    redis_build_id:619d60bfb0a92c36
    redis_mode:standalone
    os:Linux 5.2.9-1.el7.elrepo.x86_64 x86_64
    arch_bits:64
    multiplexing_api:epoll
    atomicvar_api:atomic-builtin
    gcc_version:4.8.5
    process_id:1300
    run_id:7ac37bd4d01a6d9f05f3ce28dcda3501f50a16a6
    tcp_port:6379
    uptime_in_seconds:123262
    uptime_in_days:1
    hz:10
    configured_hz:10
    lru_clock:6586134
    executable:/usr/bin/redis-server
    config_file:/etc/redis.conf
    
    # Clients
    connected_clients:2
    client_recent_max_input_buffer:2
    client_recent_max_output_buffer:0
    blocked_clients:0
    
    # Memory
    used_memory:4265552
    used_memory_human:4.07M
    used_memory_rss:14000128
    used_memory_rss_human:13.35M
    used_memory_peak:9838672
    used_memory_peak_human:9.38M
    used_memory_peak_perc:43.35%
    used_memory_overhead:941438
    used_memory_startup:791344
    used_memory_dataset:3324114
    used_memory_dataset_perc:95.68%
    allocator_allocated:4433800
    allocator_active:5214208
    allocator_resident:8507392
    total_system_memory:4136521728
    total_system_memory_human:3.85G
    used_memory_lua:51200
    used_memory_lua_human:50.00K
    used_memory_scripts:232
    used_memory_scripts_human:232B
    number_of_cached_scripts:1
    maxmemory:1073741824
    maxmemory_human:1.00G
    maxmemory_policy:allkeys-lru
    allocator_frag_ratio:1.18
    allocator_frag_bytes:780408
    allocator_rss_ratio:1.63
    allocator_rss_bytes:3293184
    rss_overhead_ratio:1.65
    rss_overhead_bytes:5492736
    mem_fragmentation_ratio:3.30
    mem_fragmentation_bytes:9756560
    mem_not_counted_for_evict:2062
    mem_replication_backlog:0
    mem_clients_slaves:0
    mem_clients_normal:66616
    mem_aof_buffer:2062
    mem_allocator:jemalloc-5.1.0
    active_defrag_running:0
    lazyfree_pending_objects:0
    
    # Persistence
    loading:0
    rdb_changes_since_last_save:113361
    rdb_bgsave_in_progress:0
    rdb_last_save_time:1566743960
    rdb_last_bgsave_status:ok
    rdb_last_bgsave_time_sec:-1
    rdb_current_bgsave_time_sec:-1
    rdb_last_cow_size:0
    aof_enabled:1
    aof_rewrite_in_progress:0
    aof_rewrite_scheduled:0
    aof_last_rewrite_time_sec:-1
    aof_current_rewrite_time_sec:-1
    aof_last_bgrewrite_status:ok
    aof_last_write_status:ok
    aof_last_cow_size:0
    aof_current_size:199879837
    aof_base_size:140011161
    aof_pending_rewrite:0
    aof_buffer_length:0
    aof_rewrite_buffer_length:0
    aof_pending_bio_fsync:0
    aof_delayed_fsync:0
    
    # Stats
    total_connections_received:3475
    total_commands_processed:229991
    instantaneous_ops_per_sec:1
    total_net_input_bytes:66200707
    total_net_output_bytes:952438530
    instantaneous_input_kbps:0.01
    instantaneous_output_kbps:4.35
    rejected_connections:0
    sync_full:0
    sync_partial_ok:0
    sync_partial_err:0
    expired_keys:9673
    expired_stale_perc:0.00
    expired_time_cap_reached_count:0
    evicted_keys:0
    keyspace_hits:46517
    keyspace_misses:34040
    pubsub_channels:0
    pubsub_patterns:0
    latest_fork_usec:0
    migrate_cached_sockets:0
    slave_expires_tracked_keys:0
    active_defrag_hits:0
    active_defrag_misses:0
    active_defrag_key_hits:0
    active_defrag_key_misses:0
    
    # Replication
    role:master
    connected_slaves:0
    master_replid:db6a9b926fd53fe1bac74d5c69bae6aade12ff42
    master_replid2:0000000000000000000000000000000000000000
    master_repl_offset:0
    second_repl_offset:-1
    repl_backlog_active:0
    repl_backlog_size:1048576
    repl_backlog_first_byte_offset:0
    repl_backlog_histlen:0
    
    # CPU
    used_cpu_sys:127.141152
    used_cpu_user:161.744901
    used_cpu_sys_children:0.000000
    used_cpu_user_children:0.000000
    
    # Cluster
    cluster_enabled:0
    
    # Keyspace
    db0:keys=1219,expires=7,avg_ttl=463430601
    db7:keys=183,expires=183,avg_ttl=263532
    


    It should work afterwards in a cluster, but for now not. I configured my WP for db7 or is it better to keep it in the same db (different TTL)
     
  10. eva2000

    eva2000 Administrator Staff Member

    42,268
    9,550
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,708
    Local Time:
    12:54 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    when you refer to git do you mean https://github.com/centminmod/centminmod-redis ? versus Redis - Insight Guide - How to install Redis server on Centmin Mod LEMP stack ?

    https://github.com/centminmod/centminmod-redis is a bundle of number of scripts:
    1. the redis-install.sh script at centminmod/centminmod-redis which is a script that automates the yum install instructions outlined at Redis - Insight Guide - How to install Redis server on Centmin Mod LEMP stack with some extra smarter setting/configuration detection.
    2. it also includes a redis-generator.sh at centminmod/centminmod-redis with examples outlined at centminmod/centminmod-redis which takes your existing yum installed redis binary (doesn't work without first install redis server) and can automate advanced redis configurations from redis clusters, redis master/slave replication + redis sentinels for monitoring and automated slave failover in event of redis master failures as well as generating multiple additional redis servers beyond the single yum installed redis instance so you can create your own additional redis servers, manually setup your own redis cluster or master/slave replication or play with redis proxying and sharding/proxies setups or more exotic configurations if you know what you're doing i.e. centminmod/centminmod-redis
    Again https://github.com/centminmod/centminmod-redis - particularly redis-generator.sh is provided as is so no support by me, it's just a tool I use to quickly build out redis cluster/proxies, sharded proxy configurations or redis master/slave replication testing for myself and my clients. Example centminmod/centminmod-redis.
     
  11. EckyBrazzz

    EckyBrazzz Active Member

    767
    153
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +280
    Local Time:
    11:54 PM
    1.17.x Cluster
    10.3.x Cluster & Redis
    So my install with the Redis - Insight Guide - How to install Redis server on Centmin Mod LEMP stack was an excellent choice. It also included some configuration for WordPress.

    The script redis-generator.sh come in handy for some other stuff I installed. In need it to set up the sentinel and for in for further use, the cluster that I have I mind. Thanks for that one.

    When I install WordPress with Centmin 22-2 (Redis) I always install the plugin Redis Object Cache and remove the KeyCDN. I generate the key for the wp-config.php as indicated on the guide Redis - Insight Guide - How to install Redis server on Centmin Mod LEMP stack on each domain I create. I noticed it gives me some "extra" performance, and just like you "being a speed freek:D" it means a lot to me.

    FYI: I spoke to the CEO of ServerHub - Dedicated Servers, Web Hosting, Virtual Private Servers and Infrastructure as a Service (IaaS). Their site indicates that the have a XEON GOLD. But they are offering on "special" request also XEON Platinum. And Nvme. 40 Gpbs Uplink Ports. I'm negotiating about it because now with many servers in a Cluster, I only need 3 servers from them to get better performance and I can dump the cluster (expensive) that I have now. Guess when deal is done you want to see the results in that threat "What's your install time:)"

    Well, need to look at the centminmod/centminmod-redis script if I gain some extra performance with some settings.