Mongo 4 faster than Mongo 7?

Hey!

There were no comparison, I just have to use replicaSet to use transaction. So i download run-rs and just start it with defaults (ver 4.0.12, 3 replicaset members).

Everything was OK, but I decided to use latest version of Mongo and download it with brew. When I start it with replicaSet option and has 3 members too, I suddenly see my test slow down 2-3 times. I was suprprised by that, and start to look for reason, try to use only 1 memeber for example (27017), but it were still slower than run-rs.

I use Elixir, mongodb-driver 1.0.3, tests are the same -no differs there, before tests there are collections and indexes creating, but not during the tests. Before some db tests clearing of some collections happen deleteMany()

I tried that u asked for -download 7.0.1 version via run-rs

this is run-rs mongo version 4.0.12
(run-rs -h 127.0.0.1 --dbpath '/opt/homebrew/var/mongodb' --keep)
Finished in 2.4 seconds (1.0s async, 1.4s sync)
473 tests, 0 failures


Here is run-rs with 7.0.1
(run-rs -v 7.0.1 -h 127.0.0.1)
Finished in 17.8 seconds (2.4s async, 15.4s sync)
473 tests, 0 failures

By now it is not problem for me, I just curious. By the way, on my windows 10 desktop same tests run with the same high speed as run-rs but has latest Mongo there (no run-rs on Windows).

1 Like