Skip to content

Instantly share code, notes, and snippets.

@prateek
Last active May 13, 2018 14:52
Show Gist options
  • Save prateek/572cc8a1c270a0539fafc75f2986a410 to your computer and use it in GitHub Desktop.
Save prateek/572cc8a1c270a0539fafc75f2986a410 to your computer and use it in GitHub Desktop.
upstream roaring v pilosa simple perf benchmarks

For sure. So using some tests I had while testing mem <-> fst segment serialization, as a poor man's benchmark:

# pilosa 
❯ time go test ./index/segment/tests -count=10
ok  	github.com/m3db/m3ninx/index/segment/tests 2.192s
/Users/prungta/code/go1.10.2/bin/go test ./index/segment/tests -count=10  3.81s user 0.47s system 131% cpu 3.266 total

# roaring binary 
❯ time go test ./index/segment/tests -count=10
ok  	github.com/m3db/m3ninx/index/segment/tests 1.966s
/Users/prungta/code/go1.10.2/bin/go test ./index/segment/tests -count=10  3.76s user 0.46s system 137% cpu 3.073 total


# roaring msgpack 
❯ time go test ./index/segment/tests -count=10
ok  	github.com/m3db/m3ninx/index/segment/test 8.219s
/Users/prungta/code/go1.10.2/bin/go test ./index/segment/tests -count=10  17.38s user 0.78s system 197% cpu 9.211 total

conclusions:

  • upstream roaring msgpack is a pos
  • binary perf of upstream roaring v pilosa is comparable.

This is despite the fact that in the case of the pilosa tests, we're only using pilosa for serialization; and always convert from []byte -> pilosa -> upstream roaring (and vice versa during writes) to satisfy our existing interfaces. So once we switch our postings implementation to pilosa, it'd be able to avoid a bunch of things it's having to do now.

Also checked mem usage, binary roaring v pilosa were about 15% different - 103MB v 119MB alloc space (again, despite the extra work our pilosa impl had to do for conversions) roaring-binary-mem pilosa-mem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment