Question Redis installed.

Status
Not open for further replies.

RedWS600

Customer
I have redis version 2.2.5. All seems to be running.
Verified in redis-cli with 'info' I can see RAM being assigned.

Updates done for config.php
HTML:
$config['Misc']['redisServers'] = array(
    array('127.0.0.1', 6379),
);
$config['Misc']['redisMaxDelay'] = 10; // is slave server is out of sync by more than this many seconds, switch to master
$config['Misc']['redisTimeout'] = 3; // if redis server doesn't respond in this many seconds, disconnect
$config['Misc']['redisRetry'] = 100; // retry connection in this many milliseconds

I've left my datastore the same in here
HTML:
$config['Datastore']['class'] = 'vB_Datastore_Filecache';
Does that need to change to something Redis related?


With FileCache selected in VBOptimise I get the resource stats at the bottom of the page as

Resources saved on this page: MySQL 5.80%
Page generated in 0.31090 seconds with 65 queries. Memory Usage: 11.23 MB

now the same with Redis selected in VBOptimise....

Resources saved on this page: MySQL 0%
Page generated in 0.31337 seconds with 69 queries. Memory Usage: 11.60 MB

Notice MySQL is now 0%.

An Redis Info check provised the following
redis 127.0.0.1:6379> info
redis_version:2.4.10
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.6
process_id:25609
uptime_in_seconds:4089
uptime_in_days:0
lru_clock:1575510
used_cpu_sys:1.75
used_cpu_user:1.22
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
connected_clients:5
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:1628720
used_memory_human:1.55M
used_memory_rss:13574144
used_memory_peak:2637400
used_memory_peak_human:2.52M
mem_fragmentation_ratio:8.33
mem_allocator:jemalloc-2.2.5
loading:0
aof_enabled:0
changes_since_last_save:1
bgsave_in_progress:0
last_save_time:1462789707
bgrewriteaof_in_progress:0
total_connections_received:71
total_commands_processed:67190
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:65038
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:516
vm_enabled:0
role:master
redis 127.0.0.1:6379> info
redis_version:2.4.10
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.6
process_id:25609
uptime_in_seconds:4109
uptime_in_days:0
lru_clock:1575512
used_cpu_sys:1.80
used_cpu_user:1.25
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
connected_clients:7
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:2006168
used_memory_human:1.91M
used_memory_rss:13574144
used_memory_peak:2637400
used_memory_peak_human:2.52M
mem_fragmentation_ratio:6.77
mem_allocator:jemalloc-2.2.5
loading:0
aof_enabled:0
changes_since_last_save:1
bgsave_in_progress:0
last_save_time:1462789707
bgrewriteaof_in_progress:0
total_connections_received:74
total_commands_processed:69856
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:67667
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:516
vm_enabled:0
role:master

Many numbers change after I have done some page refreshing. So looks like the caching is doing something, any probably working fine. Just wondered if I am missing something as would have expected the MySQL savings to be around the same.


Thanks
Dan.
 
Just ran a VBOptimise System test.

redis.webp

Ran this test a couple of times. Odd that it was successful but popped in a red cross.
Perhaps I have an issue in the Redis config somewhere, it's all default stuff at the mo.
 
Redis has a monitor command. This is looking promising.
redis-monitor.webp
Everytime a page is loaded, multiple calls can be seen. So VBOptimise is talking to Redis.
 
A few more things popping up in the 'Monitor' command.
1462793646.583128 "GET" "vbo_template_31340"
1462793646.583148 "GET" "vbo_template_31332"
1462793646.583169 "GET" "vbo_template_31334"
1462793646.583190 "GET" "vbo_template_28624"
1462793646.686781 "GET" "vbo_dbtech.usertag.profile.mention.count.1.4799"
1462793646.687101 "GET" "vbo_dbtech.usertag.profile.mention.results.1.0.20.4799"
1462793646.689236 "GET" "vbo_dbtech.usertag.profile.tag.count.1.4799"
1462793646.689501 "GET" "vbo_dbtech.usertag.profile.tag.results.1.0.20.4799"
1462793646.691047 "GET" "vbo_dbtech.usertag.profile.quote.count.1.4799"
1462793646.691892 "GET" "vbo_dbtech.usertag.profile.quote.results.1.0.20.4799"
1462793646.693746 "GET" "vbo_dbtech.thanks.profile.count.1.4799"
1462793646.695169 "GET" "vbo_dbtech.vbactivity.profilepoints.4799"

This would make me think its working, However vboptimise stats are showing no resource savings.
 
The resource saving statistics requires the cache itself, with key vbo_vb.optimiser.stats. If this does not persist correctly across multiple pages, then the behaviour you are seeing is correct.
 
The resource saving statistics requires the cache itself, with key vbo_vb.optimiser.stats. If this does not persist correctly across multiple pages, then the behaviour you are seeing is correct.

Sorry, I don't understand the answer. Do I need to enter that key in the Redis config?
 
The redis monitor screenshot you outputted, notice how it says "GET" "vbo_<some_key_here>"?

For vBO to be able to update the statistics, a "GET" "vbo_vb.optimiser.stats" request needs to be sent and it needs to return a value > 0.
 
Ah yes. I see that line appear in the debug info

1462873037.837251 "GET" "vbo_template_29738"
1462873037.837284 "GET" "vbo_template_29776"
1462873037.837317 "GET" "vbo_template_30044"
1462873038.112606 "GET" "vbo_vb.optimiser.stats"
1462873038.322494 "INFO"
1462873038.417513 "GET" "vbo_pgc.738ddc501b9e1e8bdc7f43691f61d4c0"
1462873038.418350 "GET" "vbo_style_1"
1462873038.461259 "INFO"
1462873038.555842 "GET" "vbo_pgc.e52631da202169c4ddd4f617e92c4218"
1462873038.556679 "GET" "vbo_style_1"
1462873038.598128 "INFO"
1462873038.692715 "GET" "vbo_pgc.68f9e

When I manually query this in the monitor I get the following
redis 127.0.0.1:6379> get vbo_vb.optimiser.stats
(nil)

I am still seeing this at the footer of the page
Resources saved on this page: MySQL 0%
Page generated in 0.32710 seconds with 69 queries. Memory Usage: 11.56 MB


Checking things with the Info command
redis_version:2.4.10
redis_git_sha1:00000000
redis_git_dirty:0
arch_bits:64
multiplexing_api:epoll
gcc_version:4.4.6
process_id:9361
uptime_in_seconds:69070
uptime_in_days:0
lru_clock:1583895
used_cpu_sys:6.34
used_cpu_user:6.35
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
connected_clients:2
connected_slaves:0
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
used_memory:957536
used_memory_human:935.09K
used_memory_rss:11468800
used_memory_peak:2508480
used_memory_peak_human:2.39M
mem_fragmentation_ratio:11.98
mem_allocator:jemalloc-2.2.5
loading:0
aof_enabled:0
changes_since_last_save:3
bgsave_in_progress:0
last_save_time:1462804762
bgrewriteaof_in_progress:0
total_connections_received:100
total_commands_processed:74746
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:72811

pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
vm_enabled:0
role:master
db0:keys=0,expires=0

There are no keyspace hits and loads of missed. I can manually add in keys. and redo info
db0:keys=4,expires=0
I can call them back too.

MSET one 1 two 2 three 3 four 4
keys *
1) "four"
2) "three"
3) "one"
4) "two"
So storing and retrieving values in Redis appears to be working.
 
Last edited:
We're using Redis here @ DBTech and here's our stats for comparison:
keyspace_hits:2071323238
keyspace_misses:322939500

This leads me to believe there is an issue with your redis server, not vBO.
 
Yes that is what I was thinking. I dont know where to go from here, all Redis checks I do seem to come out okay.

Would you like to dial in for a fee (me pay you that is)?
 
If you PM me with an FTP and AdminCP account I can look into it, although I can't guarantee I can resolve it though :)
 
I've looked into this and every single call to the "get" method of the Redis object returns bool(false), meaning that it does not carry data over between requests.

Your redis server appears to not be configured correctly, there's nothing more I can do on my end :(

I don't know what config might be wrong as I did not experience this issue when installing Redis here @ DBTech.

Sorry I couldn't be of more help :(
 
Thanks for trying anyway, much appreciated.

I will have a tinker with config. Its gotta be something in there.

if I do a simple test of

Code:
get test

it returns
Code:
(nil)

Then do
Code:
set test testing123
and then
Code:
get test
"testing123"

So setting and recalling is working when testing in redis-cli

I notice there is no set commands coming in. Is it expecting a different value other than (nil) from a get command. So if a 'get' returns no value then surely it has to do a 'set' so its stored for next time a 'get' is requested.

I'll play with the config to see what I can find out.
 
I've tested this here and Redis is working fine for us:
Code:
1463590910.846759 [0 127.0.0.1:59664] "GET" "dbtech_template_89039"
1463590910.846790 [0 127.0.0.1:59664] "GET" "dbtech_template_89040"
1463590910.846832 [0 127.0.0.1:59664] "GET" "dbtech_vb.optimiser.stats"
1463590910.846878 [0 127.0.0.1:59664] "SET" "dbtech_vb.optimiser.stats" "a:2:{s:4:\"time\";i:1463590910;s:5:\"value\";i:1337;}" "ex" "3600"
1463590910.849501 [0 127.0.0.1:59664] "GET" "dbtech_notices_17235"
1463590910.849555 [0 127.0.0.1:59664] "SET" "dbtech_vb.optimiser.stats" "a:2:{s:4:\"time\";i:1463590910;s:5:\"value\";i:1338;}" "ex" "3600"
1463590912.059927 [0 127.0.0.1:59665] "INFO"
1463590912.345316 [0 127.0.0.1:59665] "GET" "dbtech_template_88815"
1463590912.345436 [0 127.0.0.1:59665] "GET" "dbtech_template_88817"

Code:
1463590967.479354 [0 127.0.0.1:59748] "GET" "dbtech_template_89038"
1463590967.479387 [0 127.0.0.1:59748] "GET" "dbtech_template_89039"
1463590967.479419 [0 127.0.0.1:59748] "GET" "dbtech_template_89040"
1463590967.479464 [0 127.0.0.1:59748] "GET" "dbtech_vb.optimiser.stats"
1463590967.479509 [0 127.0.0.1:59748] "SET" "dbtech_vb.optimiser.stats" "a:2:{s:4:\"time\";i:1463590967;s:5:\"value\";i:1480;}" "ex" "3600"
1463590967.479600 [0 127.0.0.1:59749] "SET" "dbtech_vbo_systest_temp" "a:2:{s:4:\"time\";i:1463590967;s:5:\"value\";s:23:\"vB Optimise System Test\";}" "ex" "3600"
1463590967.562076 [0 127.0.0.1:59750] "INFO"
1463590967.628661 [0 127.0.0.1:59751] "INFO"
1463590967.832236 [0 127.0.0.1:59750] "GET" "dbtech_template_87602"
1463590967.832397 [0 127.0.0.1:59750] "GET" "dbtech_template_59782"
1463590967.832551 [0 127.0.0.1:59750] "GET" "dbtech_template_59780"

After the Flush Cache command, a bunch of templates were instantly set in the system (output is too verbose to paste).
 
Its an odd one. Everything looks to be correct, but no keys being cached. I have a couple of Joomla installs on the same server for other domains, I've just enabled Redis caching on them, and checked the redis-cli monitor and info commands and can see items being cached and called out, and the key count cached has increased. So redis itself seems to be working on the server.
I'll keep with filecache for now in vboptimise. There may be some config issue in vbulletin or add on's. I've check the config.php and that looks to be correct. some quirk somewhere. It's not too important for redis to work, just thought I'd give it a go.

Thanks for your help and explanations. Much appreciated.
 
Hello RedWS600,

This ticket has now been closed with the status Answered.

We hope your issue or question has been addressed to your satisfaction. If not, please feel free to re-open it by clicking this link.

If you have any further issues or questions, please feel free to start a new support ticket via the button at the top of every page.

Thank you!
 
Status
Not open for further replies.

Legacy vB Optimise

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
1,977
Customer rating
0.00 star(s) 0 ratings
Back
Top