hodgesds / iouring-go

io_uring support for go
MIT License
203 stars 10 forks source link

hi,distributed file system use iouring lib #6

Open awzhgw opened 4 years ago

awzhgw commented 4 years ago

I have a distributed file system and plan to use your iouring golang lib, it will open a lot of files, or there are a lot of sockets to communicate, then in the process of my implementation, ring, err = iouring.New(4096, &iouring.Params{ Features: iouring.FeatNoDrop, }) Is it a socket and a ring object? Or just share a ring object globally?

hodgesds commented 4 years ago

That's a good question, I haven't had time to test the optimal number of rings. Having more rings may not give better performance as there still could be goroutine contention/scheduler latency with more rings. I'm not sure if this is correct, but the thing to ask the io_uring mailing list is if all requests are serviced by the same kernel thread (kthread).