3 ms·
To fill the queue on Linux goroutine wont be enough you would need to use libaio directly. sudo apt-get install libaio1 libaio-dev.
by skyde 9y ago
To fill the queue on Linux goroutine wont be enough you would need to use libaio directly.
sudo apt-get install libaio1 libaio-dev.
- mrjn 9y agoGo has no native support for aio. Based on this thread, Goroutines seem to do the same thing, via epolls. https://groups.google.com/forum/#!topic/golang-nuts/AQ8JOHxm9jA https://groups.google.com/forum/#!topic/golang-nuts/AQ8JOHxm... I think the best bet is to build a fio equivalent in Go (shouldn't take more than a couple of hours), and see if it can achieve the same throughput as fio itself. That can help figure out how slow is Go compared to using libaio directly via C.
- skyde 9y agoWhile Network socket in Go are using epolls automatically, file are not. From looking at Badger code for example: fd.ReadAt(buf, offset) would block. See this issue: https://github.com/golang/go/issues/6817 https://github.com/golang/go/issues/6817