3 ms·
My bad, I just glanced at the code. Are you using O_DIRECT? Goroutines do an equivalent job but write is synchronous and thus blocks one thread of the go sch
by grumpydba 8y ago
My bad, I just glanced at the code.
Are you using O_DIRECT?
Goroutines do an equivalent job but write is synchronous and thus blocks one thread of the go scheduler, as far as I can tell.
Also the benefit of the async io API is that it allows sending multiple requests in ones call. Syscalls in go do have an overhead which can be mitigated this way, I guess.