0

According to https://docs.mongodb.com/manual/administration/production-notes/#id5 The WiredTiger storage engine is multithreaded and can take advantage of additional CPU cores.

We will be running mongoDB in a VMware vSphere enviroment and I am tasked with allocating resources. Does that statement hold true when it comes to virtual CPU cores?

Thanks!

3
  • Only if you don't over-commit physical cores.
    – mustaccio
    May 3, 2019 at 18:21
  • @Dylan, What is the MongoDB version(x,y,z)? May 3, 2019 at 21:39
  • currently 3.4 looking to upgrade to 3.6 very soon
    – Dylan
    May 4, 2019 at 0:32

1 Answer 1

1

MongoDB - Does WiredTiger benefit from virtual cpus cores the same way it does with physical cores?

As per my understanding the MongoDB documents defines based on the physical cores.

As blog notes by @UmaPanda here this topic is always a perpetual debate to define the proper ratio of physical CPU to virtual CPU in virtualized environment.

First you understand the basic calculation:

The number of physical cores i.e. pCPU available on a host:
(# of processor Sockets) X (# of Cores) = # of Physical Processor (i.e pCPU)
The number of logical cores if hyper-threading is enabled on the host:
(# of Physical Processors i.e pCPU) x (2 cores) = # Virtual Processors (vCPU)
Total CPU resorces required for virtual machines at peak:
(# total number of virtual machines X average peak CPU utilization per system)

kindly note that hyper-threading does not actually double the available of Physical CPU. It works by providing a second execution thread to a processor core. So, a processor with 4 physical cores with hyper threading will appear as 8 logical cores for scheduling purpose only.

The WiredTiger storage engine is multithreaded and can take advantage of additional CPU cores.

The MongoDB document also states that here Specifically, the total number of active threads (i.e. concurrent operations) relative to the number of available CPUs can impact performance:

  • Throughput increases as the number of concurrent active operations increases up to the number of CPUs.

  • Throughput decreases as the number of concurrent active operations exceeds the number of CPUs by some threshold amount.

The threshold depends on your application. You can determine the optimum number of concurrent active operations for your application by experimenting and measuring throughput. The output from mongostat provides statistics on the number of active reads/writes in the (ar|aw) column.

And also from MongoDB blog notes here MongoDB will deliver better performance on faster CPUs. So, one of the MongoDB performance best practices is that the core speed is more important than the number of cores.

For further your ref here , here , here and here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.