openresty / openresty/lua-resty-redis

The performance of redis pipeline mode is unstable

Open
#255 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2k
Forks
447
Avg merge
2h 24m
Merged PRs (30d)
3

Description

benchmark code:
redis_perf.lua.txt

result:
2d4a8ce7d3c49507f74e9d7feccb726

setsockopt(5, SOL_TCP, TCP_NODELAY, [1], 4) = 0
sendto(5, "2\r\n$4\r\nincr\r\n$3\r\ncat\r\n2\r\n$4\r\ni"..., 184, 0, NULL, 0) = 184
epoll_wait(3, [{EPOLLIN|EPOLLOUT, {u32=15020632, u64=15020632}}], 512, 60000) = 1
recvfrom(5, ":4459457\r\n:4459458\r\n:4459459\r\n:4"..., 4096, 0, NULL, NULL) = 80
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff1ca1ac000
write(1, "result:4459457\n", 15) = 15
write(1, "end\n", 4) = 4
close(5) = 0
unlink("/tmp/resty_MsvuPNYENK/logs/nginx.pid") = 0
munmap(0x7ff1ca15e000, 262144) = 0

@agentzh @thibaultcha @spacewander

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached redis_perf.lua.txt benchmark and compare its reported results with the included syscall trace. Reproduce the instability, determine whether it is in Redis pipeline behavior or measurement, and document a reproducible diagnosis and maintainer-confirmed resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, redis
Domain
databases, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.