News for hackers. Stuff that matters.
Re:Badger: A fast key-value store written purely in Golang (... by mrjn on Saturday November 10, 2018 @01:38PM (#18422731)
Mmaping is optional. Badger doesn't require it, it gives you that option. Async IO in Go has been debated vigorously over the years, but there're little benefits in building that library. Because Goroutines do an equivalent job. Which is what we're doing, random reads (for value log access) spread over many goroutines.
Re:Badger: A fast key-value store written purely in Golang (... by grumpydba on Saturday November 10, 2018 @04:16PM (#18423553)
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.