Michael, we switched from memcached to Redis already some time ago as caching server.
Switching to Redis will not solve the problem as we have the same problem with caching locks.
I found out that it could be a performance issue, we tried the same functions on a server with
the same configuration and without user load, it wasn't a problem there to acquire a lock for
caching.
Anyone who has experience with Redis and io-threading? It's possible in the configuration file to
configure extra io-threads. I haven't tested yet if this could make a difference.
This is the io-threads section in redis.conf configuration:
################################ THREADED I/O #################################
# Redis is mostly single threaded, however there are certain threaded
# operations such as UNLINK, slow I/O accesses and other things that are
# performed on side threads.
#
# Now it is also possible to handle Redis clients socket reads and writes
# in different I/O threads. Since especially writing is so slow, normally
# Redis users use pipelining in order to speed up the Redis performances per
# core, and spawn multiple instances in order to scale more. Using I/O
# threads it is possible to easily speedup two times Redis without resorting
# to pipelining nor sharding of the instance.
#
# By default threading is disabled, we suggest enabling it only in machines
# that have at least 4 or more cores, leaving at least one spare core.
# Using more than 8 threads is unlikely to help much. We also recommend using
# threaded I/O only if you actually have performance problems, with Redis
# instances being able to use a quite big percentage of CPU time, otherwise
# there is no point in using this feature.
#
# So for instance if you have a four cores boxes, try to use 2 or 3 I/O
# threads, if you have a 8 cores, try to use 6 threads. In order to
# enable I/O threads use the following configuration directive:
#
# io-threads 6