root@mishypredis1:/var/lib/redis# redis-server --version Redis server v=4.0.10 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=3f5835c86b3727fb root@mishypredis1:/var/lib/redis# uname -a Linux mishypredis1 4.9.0-7-amd64 #1 SMP Debian 4.9.110-1 (2018-07-05) x86_64 GNU/Linux
While stracing to try to troubleshoot some high cpu workloads, i see the same message continuously on several of my redis instances read(3, 0x7ffee899e737, 1) = -1 EAGAIN (Resource temporarily unavailable)
When i do this, i see root@mishypredis1:/var/lib/redis# lsof -p 6713 | grep 3 root@mishypredis1:/var/lib/redis# lsof -p 6713 | grep 3 redis-ser 6713 redis cwd DIR 254,3 4096 129905 /var/lib/redis redis-ser 6713 redis rtd DIR 8,2 4096 2 / redis-ser 6713 redis txt REG 8,2 1093456 403657 /usr/bin/redis-check-rdb redis-ser 6713 redis mem REG 8,2 1689360 130078 /lib/x86_64-linux-gnu/libc-2.24.so redis-ser 6713 redis mem REG 8,2 135440 130107 /lib/x86_64-linux-gnu/libpthread-2.24.so redis-ser 6713 redis mem REG 8,2 219912 403625 /usr/lib/x86_64-linux-gnu/libjemalloc.so.1 redis-ser 6713 redis mem REG 8,2 1063328 130082 /lib/x86_64-linux-gnu/libm-2.24.so redis-ser 6713 redis mem REG 8,2 26768 403662 /usr/lib/x86_64-linux-gnu/libatomic.so.1.2.0 redis-ser 6713 redis mem REG 8,2 14640 130081 /lib/x86_64-linux-gnu/libdl-2.24.so redis-ser 6713 redis mem REG 8,2 153288 130074 /lib/x86_64-linux-gnu/ld-2.24.so redis-ser 6713 redis mem REG 8,2 1679776 390178 /usr/lib/locale/locale-archive redis-ser 6713 redis 0r CHR 1,3 0t0 1028 /dev/null redis-ser 6713 redis 1u unix 0xffffa06cad5c8000 0t0 87445778 type=STREAM redis-ser 6713 redis 2u unix 0xffffa06cad5c8000 0t0 87445778 type=STREAM redis-ser 6713 redis 3r FIFO 0,10 0t0 89703498 pipe redis-ser 6713 redis 4w FIFO 0,10 0t0 89703498 pipe redis-ser 6713 redis 5u a_inode 0,11 0 9806 [eventpoll] redis-ser 6713 redis 6u IPv4 89703500 0t0 TCP *:6381 (LISTEN) ...
Do you know if this behaviour is normal ?
Thanks
Comment From: AlexThaveau
Hello,
is this behaviour normal for you ?
Thanks very much
Comment From: kkmuffme
Same issue for me on 5.0.2
Comment From: WiFeng
Mark. Looking into this later.
Comment From: antirez
This should not be a problem AFAIK. For instance Redis uses this mechanism in order to awake the Redis event loop when loaded modules block, in order to awake the event loop. There are other similar uses. Better to dig into it to see if we can reduce the frequency of this happening by putting conditionals whenever possible.
Comment From: kkmuffme
It's not a problem per se, it's just that strace is showing it multiple times per second (no matter if master or slave, no matter if persistence or not), making debugging any other issues redis may have a bit complicated as its full of -1 EAGAIN (Resource temporarily unavailable)