Hello,
Thanks for taking a look. I added some test cases and re-ran the whole thing:
Using T3.XLarge instance on AWS with local inmemory mongodb, 10 runs of each test with 100k updates. You can see the results here:
https://stuff.stooit.com/d/1/610bb36e642a9/com.sigfox.monitoring.MongoPerfTest.html
I removed the slowest & fastest run of each tests and ended-up with:
testRawWrappedWithConcurrency 7.125000
testRaw 6.250000
testReactiveRaw2 7.875000
testReactiveRaw3 9.500000
testReactiveRaw4 9.875000
testReactiveRaw5 10.625000
testReactiveRaw 9.125000
As you can see, the semaphore did not do much for me (testReactiveRaw4 / testReactiveRaw5). Maybe you implemented it in a different way?
With testReactiveRaw2 I managed to lower the total time, but it is still 26% slower. Is this still with-in expectations?