[erlang-questions] couchdb performace 10x: using NIF for file io

Joel Reymont <>
Mon Oct 25 15:41:22 CEST 2010


Kenneth,

On Oct 25, 2010, at 2:27 PM, Kenneth Lundin wrote:

> Have you tried the very same benchmark with just using the 'raw'
> option when opening the file.

Couch uses the raw option by default. Search for raw in the patch, I left the options untouched and ignore the ones I don't care about in the NIF.

http://github.com/wagerlabs/couchdb/commit/23527eb8165f81e63d47b230f3297d3072c88d83

> You should then get about the same efficiency as you get with NIFs

Not the case. 

> If the NIF example still is much faster (which I doubt) please let me know.

NIF is still much faster! Note, however, that the difference on Linux is far less pronounced. 

It's a 2x speedup on Linux with a hard disk vs 10x on Mac OSX with SSD.

---
http://twitter.com/wagerlabs



More information about the erlang-questions mailing list