• Resolved extremeleadprogramcom

    (@extremeleadprogramcom)


    How is it possible that when I enable Redis things in the backend actually slow down a bit?

    I ran several tests by visiting different back-end pages and testing page time with query monitor. I made sure after I enabled Redis to visit all these pages once before I took measurements to make sure the cache was primed. I also cleared cache first.

    The speed isn’t “significantly” slower but it is consistently a bit slower… here are some sample timings from one run with and without:

    With Redis – round 1:
    All orders – 2.6
    1st order – 2.91
    view other orders – 2.61
    completed – 2.53
    posts – 2.25
    dashboard – 2.71
    pages – 2.29
    products – 2.58

    Without Redis – round 1:
    All orders – 2.29
    1st order – 2.31
    view other orders – 2.28
    completed – 2.28
    posts – 1.97
    dashboard – 2.51
    pages – 1.92
    products – 2.27

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    If your site slows down with Redis caching enabled, it’s usually your Redis Server’s fault, unless your site is quite unhealthy and does 10,000 cache looks per page load.

    Can you post your Redis metrics under load?

    Thread Starter extremeleadprogramcom

    (@extremeleadprogramcom)

    A little background on the server. The Redis server is on the same server as the Apache server. It is a dedicated server on a 24 core, Intel(R) Xeon(R) CPU X5670 @ 2.93GHz with 48GB of Ram.

    It’s running ISPconfig and I have a dozen or so low traffic sites and my 1 main mid traffic site. The server typically runs at a very low load.

    I am testing this on the staging site on the same server so the only load I can do is just go through the back end several times and show you metrics.

    Here is a 5-minute video of me doing just that while including the server stats via the TOP command: https://nimb.ws/XBDtQH

    I go to the Redis metrics a couple of times in the video but here is a quick screenshot of those: https://nimb.ws/7QrCWF

    Thread Starter extremeleadprogramcom

    (@extremeleadprogramcom)

    Afer I let it sit and run through it again here are the metrics: https://nimb.ws/5uAoia

    Much slower it seems. These numbers are more indicative of what I noticed previously.

    Plugin Author Till Krüss

    (@tillkruess)

    I’d suggest setting up dedicated Redis monitoring to see what’s causing it.

    Thread Starter extremeleadprogramcom

    (@extremeleadprogramcom)

    How do I do that?

    Plugin Author Till Krüss

    (@tillkruess)

    Your server admin or Google will know. There are many tools/approaches.

    Thread Starter extremeleadprogramcom

    (@extremeleadprogramcom)

    This is a bare metal server with no major support so I am on my own for the most part here.

    I found some helpful pages searching google… here is a test run with some commands running on the server: https://nimb.ws/H0v3ye

    Here is the output of the info command when this is all done:

    # Server
    redis_version:3.2.12
    redis_git_sha1:00000000
    redis_git_dirty:0
    redis_build_id:7897e7d0e13773f
    redis_mode:standalone
    os:Linux 3.10.0-1127.13.1.el7.x86_64 x86_64
    arch_bits:64
    multiplexing_api:epoll
    gcc_version:4.8.5
    process_id:1373
    run_id:2f258f78b586e4d97d42d399704dd01308b8df8a
    tcp_port:6379
    uptime_in_seconds:2576833
    uptime_in_days:29
    hz:10
    lru_clock:8805063
    executable:/usr/bin/redis-server
    config_file:/etc/redis.conf

    # Clients
    connected_clients:1
    client_longest_output_list:0
    client_biggest_input_buf:0
    blocked_clients:0

    # Memory
    used_memory:4730608
    used_memory_human:4.51M
    used_memory_rss:10207232
    used_memory_rss_human:9.73M
    used_memory_peak:223054352
    used_memory_peak_human:212.72M
    total_system_memory:50465189888
    total_system_memory_human:47.00G
    used_memory_lua:37888
    used_memory_lua_human:37.00K
    maxmemory:268435456
    maxmemory_human:256.00M
    maxmemory_policy:allkeys-lru
    mem_fragmentation_ratio:2.16
    mem_allocator:jemalloc-3.6.0

    # Persistence
    loading:0
    rdb_changes_since_last_save:141486
    rdb_bgsave_in_progress:0
    rdb_last_save_time:1650395398
    rdb_last_bgsave_status:ok
    rdb_last_bgsave_time_sec:-1
    rdb_current_bgsave_time_sec:-1
    aof_enabled:0
    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

    # Stats
    total_connections_received:6704
    total_commands_processed:715918
    instantaneous_ops_per_sec:0
    total_net_input_bytes:30046973656
    total_net_output_bytes:34998383404
    instantaneous_input_kbps:0.00
    instantaneous_output_kbps:0.00
    rejected_connections:0
    sync_full:0
    sync_partial_ok:0
    sync_partial_err:0
    expired_keys:443
    evicted_keys:0
    keyspace_hits:472173
    keyspace_misses:74804
    pubsub_channels:0
    pubsub_patterns:0
    latest_fork_usec:0
    migrate_cached_sockets:0

    # Replication
    role:master
    connected_slaves:0
    master_repl_offset:0
    repl_backlog_active:0
    repl_backlog_size:1048576
    repl_backlog_first_byte_offset:0
    repl_backlog_histlen:0

    # CPU
    used_cpu_sys:1114.31
    used_cpu_user:446.39
    used_cpu_sys_children:0.00
    used_cpu_user_children:0.00

    # Cluster
    cluster_enabled:0

    # Keyspace
    db0:keys=3200,expires=199,avg_ttl=346706741

    Plugin Author Till Krüss

    (@tillkruess)

    You’ll want a real monitoring tool that keeps track of your connections, ops/s and similar over time, since it’s not temporary issue.

    Thread Starter extremeleadprogramcom

    (@extremeleadprogramcom)

    This is a staging server. There isn’t really any traffic or anything to monitor at all over time.

    It only seems to make sense to monitor it while I’m actually doing things in the backend or running a test load?

    Is there nothing simple to check in the configs or what I provided that would clue us in to an issue?

    Plugin Author Till Krüss

    (@tillkruess)

    No, there isn’t something simple to check. Your server is responding fast, then extremely slowly. Something is causing that and it’s not this plugin.

    I can confirm that this plugin slows WordPress substantially. With it enabled performance is worse!

    Plugin Author Till Krüss

    (@tillkruess)

    @bganush: No it doesn’t. Your Redis Server responding too slowly may slow things down. Or your codebase being a crime against humanity may. All plugin does it give WordPress an API to use, it doesn’t actually do anything. If things are slower use an APM tool to find out why.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Redis slows things?’ is closed to new replies.