Jump to content

4.2.6 - Is Redis now the better option?


RevengeFNF

Recommended Posts

Posted

Well noone dares to post even a basic practical information, so I figured I might start.

I have 0 experience with redis, so it is a bit of shooting in the dark, no guidelines by all means, I just hope that by posting some numbers I will provoke other, more knowledgeable people to share. My community is around 300k posts, 8k members and about 100-150 people online. It is running on 4core/6GB RAM vps with plenty of resources left. Redis has been running for a few hours. I made these settings:

maxmemory 200mb
maxmemory-policy allkeys-lru
maxmemory-samples 10

All seems fine now, in fact memory consumption is close to 20mb, so I guess not that much is needed overall. The hits/miss stats look fine to me for a cache started from scratch:

keyspace_hits:616880
keyspace_misses:6731

I wonder if the fact that worst run took 61x longer should worry me. 

redis-cli --intrinsic-latency 10
Max latency so far: 4 microseconds.
Max latency so far: 7 microseconds.
Max latency so far: 35 microseconds.
Max latency so far: 36 microseconds.
Max latency so far: 47 microseconds.
Max latency so far: 51 microseconds.
Max latency so far: 68 microseconds.
Max latency so far: 72 microseconds.
Max latency so far: 114 microseconds.
Max latency so far: 118 microseconds.
Max latency so far: 136 microseconds.
Max latency so far: 197 microseconds.

3091951 total runs (avg latency: 3.2342 microseconds / 3234.20 nanoseconds per run).
Worst run took 61x longer than the average latency.

Two questions that I am very much interested in finding an answer:

- Does it make sense to create a master/slave replication? 

- Is IPS utilizing only the LRU cache functionalities or other stuff, like php sessions, can also be cached?

Posted
1 hour ago, AlexWebsites said:

I just moved one of my sites on 4.2.6 over to redis from memcached and I have to say it feels snappier. I don't know if it's in my head or something, but it feels like pages load a bit faster.

It's very easy to have a placebo effect with these kind of things unless there really was a big change. When we are talking milliseconds someone needs to run more scientific tests. Any volunteers? :sorcerer: 

  • Management
Posted

Hi Nodle, I haven't used a socket myself but the set up that I saw on page 1 seems sensible and works similarly to MySQL sockets so I would think that approach is fine.

Posted
1 minute ago, Matt said:

Hi Nodle, I haven't used a socket myself but the set up that I saw on page 1 seems sensible and works similarly to MySQL sockets so I would think that approach is fine.

Thanks @Matt for the response, I will give it a go later. I appreciate it.

Posted

Just switch to Redis, pretty sure it's working with the socket just fine. I don't think it's a placebo effect either, everything is almost instant to load. It has a more "Snappyness" to it then running on Memcached. So I see why it's the preferred option now.

  • 1 month later...
Posted

Any recommendations which redis configuration I should use for redis with IPB 4.2.x?

-timeout
-tcp-keepalive

Any other settings to have an eye on?

Memory/cache sizes?

Thanks,
Thomas

  • 4 months later...
Posted
On 11/15/2017 at 1:04 PM, Matt said:

4.3 allows you to set up a system where you have one Redis writer, and multiple readers.

Hi Matt, 

After upgrading to 4.3 I'm still unable to configure Redis with multiple readers. What am I missing?

Posted

I installed Redis (with the basic configuration) on my Cloud VPS SSD CentOS6.9, with 48 unlocked cores, 32 CPUs, 1.5GB RAM (burstable to 4GB). I installed PHP 7.2, Easy Apache 4, PHP-FPM, Zend Opcache, MariaDB10.2, Innodb.

Because the RAM is burstable to 4GB, utilities like Mysqltuner complain about free memory but I've hardly see it go over 1.5GB in the graphs. 

Not sure if this helps anyone but happy to share:

root@vpsxxxxxx [~/redis-stable]# redis-cli info
# Server
redis_version:4.0.9
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:8c9f92a1a46f0f58
redis_mode:standalone
os:Linux 2.6.32-042stab127.2 x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:sync-builtin
gcc_version:4.4.7
process_id:8791
run_id:3f8af954dbb440d81ed0867a8516a9b9bd13fd69
tcp_port:6379
uptime_in_seconds:971976
uptime_in_days:11
hz:10
lru_clock:531973
executable:/root/redis-stable/redis-server
config_file:

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

# Memory
used_memory:1844000
used_memory_human:1.76M
used_memory_rss:3538944
used_memory_rss_human:3.38M
used_memory_peak:27685208
used_memory_peak_human:26.40M
used_memory_peak_perc:6.66%
used_memory_overhead:849950
used_memory_startup:786456
used_memory_dataset:994050
used_memory_dataset_perc:94.00%
total_system_memory:1610612736
total_system_memory_human:1.50G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:1.92
mem_allocator:jemalloc-4.0.3
active_defrag_running:0
lazyfree_pending_objects:0

# Persistence
loading:0
rdb_changes_since_last_save:74
rdb_bgsave_in_progress:0
rdb_last_save_time:1527258131
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:1110016
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
aof_last_cow_size:0

# Stats
total_connections_received:47799
total_commands_processed:1015927
instantaneous_ops_per_sec:0
total_net_input_bytes:1999153250
total_net_output_bytes:7169421240
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:31840
expired_stale_perc:0.00
expired_time_cap_reached_count:0
evicted_keys:0
keyspace_hits:944911
keyspace_misses:61674
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:637
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:be0a8cfc95d24df1493c05f9a53b3eecb2f05f79
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:625.69
used_cpu_user:583.84
used_cpu_sys_children:80.33
used_cpu_user_children:328.80

# Cluster
cluster_enabled:0

# Keyspace
db0:keys=89,expires=88,avg_ttl=42905187
root@vpsxxxxxx [~/redis-stable]# 

I recently installed the New Relic free trial, and it shows Redis working. I tried to add configure for each of my 4 website domains in addition to the main site wide PHP app, but it never shows them, only the total usage.

 

 

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...