Open HanGuangyu opened 3 years ago
Anolis 8.4 [A down-stream of Centos 8]?
Let's try it !
Hello!
I'm trying to use your redis (io_uring) project (https://github.com/HanGuangyu/redis/tree/feat/io_uring) and reproduced the evaluation results. However, when I evaluated the SET command, I found that when the value size is larger than or equal to 32k, the request execution will often get stuck, causing the test to fail. Mainline redis that does not use io_uring will not have this problem.
In order to make redis support io with larger size, I made the following modifications in src/server.h to expand the io buffer:
- #define PROTO_IOBUF_LEN (1024*16)
+ #define PROTO_IOBUF_LEN (1024*1024)
If you can help me solve this bug or provide some debugging suggestions, thank you very much!
I used the following script
./src/redis-benchmark -t set -d 32768 -c 1 -n 100 -p 6379
Update:
It's found that when the the message is fragmented into multiple TCP packets and sent, Redis using io_uring will only read the first TCP packet and ignore the subsequent ones.
The problem/use-case that the
io_uring
addressesThe use of
io_uring
can improve the performance of redis on Linux compared to using epoll.Description of the feature
io_uring
is a powerful new asynchronous I/O API for Linux by Jens Axboe from Facebook. And it has been added to Linux kernel since 5.1 version. For more details aboutio_uring
, we can see Lord of the io_uring.Additional information
This work is a POC(Proof of Concept) cooperate by alibaba team of Anolis community and Uniontech Software Technology Co., Ltd. We have experimentally added io_uring support to redis and gotten good performance improvement in testes. If this work can be approved by the community, we will proceed.
The data of performance improvement as follows:
The test environment is as follows: System: Anolis 8.4 [A down-stream of Centos 8] Kernel: Linux 4.19 + patch of io_uring Test Tool: redis-benchmark Test Command: redis-benchmark -c 500 -n 10000000(Both redis-server and redis-benchmark are bound fixed CPU cores)
For more details, you can see the poll request of #9440 .