twemproxy icon indicating copy to clipboard operation
twemproxy copied to clipboard

redis-benchmark failed on my Mac with the latest repo sources

Open EasonYi opened this issue 10 years ago • 1 comments

After I cloned the latest repo and built it successfully, I ran the redis-benchmark 2 times and got the same error. And I checked that the redis server was still running normally.

➜  ~  redis-benchmark -q -t set,get,incr,lpush,lpop,sadd,spop,lpush,lrange -c 100 -p 22121
SET: 9943.32 requests per second
GET: 11759.17 requests per second
INCR: 12838.62 requests per second
LPUSH: 12484.39 requests per second
LPOP: 13073.60 requests per second
SADD: 12603.98 requests per second
SPOP: 8874.69 requests per second
LPUSH (needed to benchmark LRANGE): 5545.39 requests per second
Error: Server closed the connection55.43

[2015-09-23 07:13:15.209] nc_request.c:96 req 1652720 done on c 70 req_time 0.281 msec type REQ_REDIS_LRANGE narg 4 req_len 43 rsp_len 906 key0 'mylist' peer '127.0.0.1:51440' done 1 error 0
[2015-09-23 07:13:15.209] nc_request.c:96 req 1652721 done on c 71 req_time 0.257 msec type REQ_REDIS_LRANGE narg 4 req_len 43 rsp_len 906 key0 'mylist' peer '127.0.0.1:51441' done 1 error 0
[2015-09-23 07:13:15.209] nc_request.c:96 req 1652722 done on c 72 req_time 0.283 msec type REQ_REDIS_LRANGE narg 4 req_len 43 rsp_len 906 key0 'mylist' peer '127.0.0.1:51442' done 1 error 0
[2015-09-23 07:13:15.209] nc_util.c:324 assert 'conn->send_active' failed @ (nc_message.c, 872)
[2015-09-23 07:13:15.219] nc_util.c:302 [0] 2   nutcracker                          0x000000010fef7a6c msg_send + 92
[2015-09-23 07:13:15.219] nc_util.c:302 [1] 3   nutcracker                          0x000000010fef1a9d core_core + 557
[2015-09-23 07:13:15.219] nc_util.c:302 [2] 4   nutcracker                          0x000000010ff13cdc event_wait + 476
[2015-09-23 07:13:15.219] nc_util.c:302 [3] 5   nutcracker                          0x000000010fef1d60 core_loop + 32
[2015-09-23 07:13:15.219] nc_util.c:302 [4] 6   nutcracker                          0x000000010ff04558 main + 1416
[2015-09-23 07:13:15.219] nc_util.c:302 [5] 7   libdyld.dylib                       0x00007fff8f51a5c9 start + 1
[1]    17426 abort      src/nutcracker -i 2000 -a 127.0.0.1

➜  twemproxy git:(master) git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

➜  twemproxy git:(master) uname -a
Darwin Eason 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

➜  ~  redis-server -v
Redis server v=3.0.4 sha=00000000:0 malloc=libc bits=64 build=ee774adfcab9032f

➜  ~  redis-benchmark -q -t set,get,incr,lpush,lpop,sadd,spop,lpush,lrange -c 100 -p 6379
SET: 50100.20 requests per second
GET: 50150.45 requests per second
INCR: 51255.77 requests per second
LPUSH: 49975.02 requests per second
LPOP: 49850.45 requests per second
SADD: 50632.91 requests per second
SPOP: 50251.26 requests per second
LPUSH (needed to benchmark LRANGE): 49627.79 requests per second
LRANGE_100 (first 100 elements): 16129.03 requests per second
LRANGE_300 (first 300 elements): 8232.49 requests per second
LRANGE_500 (first 450 elements): 5983.72 requests per second
LRANGE_600 (first 600 elements): 4517.94 requests per second

EasonYi avatar Sep 23 '15 00:09 EasonYi

Not a maintainer, but there are 3 asyncronous event backends that set send_active that can be chosen by ./configure - kqueue, evport, and epoll (see src/event) - epoll is the first choice in builds if it is available. Inspecting the binary may tell you which it was compiled with if the issues can be reproduced

strings `which nutcracker`

I haven't had time to try to run these steps.

Does it work when --enable-debug ISN'T passed in? I'm not famliar with the reasons for asserting send_active is true and the only backend I've used is epoll

Existing integration tests in tests/test_redis have some tests of pipelining, and those are passing in CI, so the issue may be limited to certain lesser used src/events backends

TysonAndre avatar Apr 29 '21 04:04 TysonAndre