You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi there- first, a complement, I've been using an early implementation of this redis-based support from afbjorklund in a 'build-only' production environment (i.e. does the code build and link, CI/CD env) for a couple of months and have a fork I'm experimenting with, bravo for doing this. Been working well for the use case I'm testing with, nicely done! In the meantime I'm also reading through other forks with windows CL support and merging into said fork to see where both redis and CL ccache support gets us - really cool! Will be contributing back as soon as reasonable. Thanks
One suggestion for a feature that I will be adding/needing is 'read-only' from the remote cache (redis or whatever), so folks who can read cannot necessarily write so local changes don't pollute the cache but blessed stuff from the build machines populate instead, if it's not already there.
Activity
jrosdahl commentedon Jun 27, 2021
The API and framework is now ready:
@afbjorklund: Would you like to work on a Redis implementation of that interface?
afbjorklund commentedon Jun 27, 2021
I can give it a try, hopefully some of the
hirediscode can be reused from 0576d54 :0576d54#diff-acef7c5833ac8a6b1a9e6972bc1c48625ce677affe9fc468bbfade72f06e18e6R99
Note: there will be no SSL support in the initial version, similar to decision for HTTP.
https://github.com/redis/hiredis#ssltls-support
jrosdahl commentedon Jun 27, 2021
👍
Here are attributes I think would be good to have available:
connect-timeout: Timeout (in ms) for network connection. Default: something quite small. 50? 100? 200?operation-timeout: Timeout (in ms) for Redis commands. Default: something quite large. 5000? 10000?password: Password for the RedisAUTHcommand.username: Username for the RedisAUTHcommand.jrosdahl commentedon Jun 27, 2021
Other suggestions:
kilozap commentedon Jun 27, 2021
hi there- first, a complement, I've been using an early implementation of this redis-based support from afbjorklund in a 'build-only' production environment (i.e. does the code build and link, CI/CD env) for a couple of months and have a fork I'm experimenting with, bravo for doing this. Been working well for the use case I'm testing with, nicely done! In the meantime I'm also reading through other forks with windows CL support and merging into said fork to see where both redis and CL ccache support gets us - really cool! Will be contributing back as soon as reasonable. Thanks
kilozap commentedon Jun 27, 2021
One suggestion for a feature that I will be adding/needing is 'read-only' from the remote cache (redis or whatever), so folks who can read cannot necessarily write so local changes don't pollute the cache but blessed stuff from the build machines populate instead, if it's not already there.
jrosdahl commentedon Jun 28, 2021
Yep, that's already in place: https://github.com/ccache/ccache/blame/39233da43f8c56e71d2727131bd63ad375898dba/doc/MANUAL.adoc#L905-L906
Add optional redis secondary storage backend
afbjorklund commentedon Jun 28, 2021
I added a mention in the ccache documentation about using RocksDB for redis, similar to using Couchbase* for memcached.
* Another similar option was using MemcacheDB.
See https://github.com/afbjorklund/memcachedb (uses LMDB)
It is up to the ccache user to provide a server for their storage, so they can best decide and make their own trade-offs...
The default
redis-serverwill fit everything into memory, while optionally keeping a transaction log or dumps for recovery.The alternative
ardb-serverwill instead persist data to disk, while mapping frequently used cache entries into memory.See https://github.com/afbjorklund/ardb (uses RocksDB/LMDB)
Default port:
redis://localhost:16379Add optional redis secondary storage backend
Add optional redis secondary storage backend
Add optional redis secondary storage backend
afbjorklund commentedon Jul 3, 2021
I ported my python script (from memcached), that will upload the primary storage into the redis secondary storage:
misc/upload-redisIf you configure LRU eviction, it will make sure to fill up the cache with the MRU entries. That is, similar to memcached.
https://redis.io/topics/lru-cache
jrosdahl commentedon Jul 10, 2021
I wrote:
I just found https://www.iana.org/assignments/uri-schemes/prov/redis and I now lean towards just using username/password from the URL and not have username/password attributes.
afbjorklund commentedon Jul 10, 2021
There is no support for username/password in the Url class (yet?), but when it is it should be simple to replace the attributes with it.
jrosdahl commentedon Jul 10, 2021
It's supported in user_info(), so just
util::split_onceon:and you should be home free.jrosdahl commentedon Jul 10, 2021
I'll have a look at this tomorrow.
afbjorklund commentedon Jul 11, 2021
Thanks for merging! I consider this redis storage backend a full replacement for the previous memcached branch.
The only thing that is not fully obvious is how to run multiple servers, but that is an upstream issue (Redis Cluster).
I don't think we need to add ccache support for it, though... It is possible to use a local redis proxy, such as nutcracker.
Otherwise it would add complexity, with something like hiredis-vip. Similar to replacing memcached with libcouchbase.
-ASK/-MOVED)Currently the recommendation is to use multiple servers, possibly with disk-based caching, instead of Couchbase/Cluster...
There is usually no need to replicate the cache, and the "consistent hashing" will make sure to distribute the keys (and load)