Why Mongodb Performance Better on Linux Than on Windows

Why is MongoDB slower on Debian than on Windows..?

I don't think this is a linux vs windows issue. I mean that i3 processor is pretty low end compared to the beast that i7 is on your windows machine.

If you really want to compare performance between the two operating systems, I recommend to get your setup running on identical hardware..

Mixing Linux and Windows MongoDB replica set and is equal hardware important for sharding

There shouldn't be a problem mixing Linux and Windows servers, assuming (as you stated) that the MongoDB versions are equivalent.

Regarding differences in hardware, MongoDB tries to distribute data evenly across shards, and each server will use as many available resources as possible to give the best performance possible. When another process on a server requests some resources, Mongo will relinquish those resources. This will usually mean swapping some data to disk until more RAM becomes available again.

Because your servers will do this, and other operations, at different speeds, the important question becomes "What happens when one server in a shard is running slowly". According to the FAQ:

If a shard is responding slowly, mongos will merely wait for the shard to return results.

So in practice, parts of your sharded collections will be slower than others, but everything should work just fine. You would probably have a better experience if the hardware matched, but it doesn't have to.

Can a sharded Mongo database be split (mongos and mongod) between Windows and Linux?

There is no reason why this should not work.

MongoDB clusters communicate via network. They aren't even aware of the operating systems other members of the cluster or replica-set run on. But keep in mind that a heterogeneous architecture has quite some maintenance problems:

  • All members of the database must have the same version to work together properly. That means you need to update all at the same time. Different operating systems add unnecessary complexity to this.
  • MongoDBs processes might have different performance characteristics when they run on different platforms. This makes load-balancing a lot harder (but also opens up new possibilities)
  • Lots of other reasons the guys on serverfault.com can explain much better than us.

By the way, virtualizing a heavy-duty database server is usually not a good idea. Any application where disc IO is the bottleneck runs much better on the bare metal (according to the sysadmins, which you will find on serverfault, not on stackoverflow).



Related Topics



Leave a reply



Submit