Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The performance of redis pipeline mode is unstable #255

Open
fairyqb opened this issue Sep 8, 2022 · 3 comments
Open

The performance of redis pipeline mode is unstable #255

fairyqb opened this issue Sep 8, 2022 · 3 comments

Comments

@fairyqb
Copy link

fairyqb commented Sep 8, 2022

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

@fairyqb
Copy link
Author

fairyqb commented Sep 8, 2022

TCP_NODELAY TCP_QUICKACK TCP_CORK TCP_SACK TCP_MIN_SND_MSS
Try the above parameters, no effect

@fairyqb
Copy link
Author

fairyqb commented Sep 9, 2022

image

Packet capture data round trip, most of the data is 0.2ms, where does 0.8ms occupy in 1ms

@fairyqb
Copy link
Author

fairyqb commented Sep 9, 2022

image

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant