Question

I have a single instance in server with 7 Processor and 15 Gb. In value default for wiredTigerConcurrentReadTransactions and wiredTigerConcurrentWriteTransactions is 128.

But is value default, how to calculate the ideal value for ConcurrentTransactions ?

[Reference]

https://www.datadoghq.com/blog/monitoring-mongodb-performance-metrics-wiredtiger/

https://docs.mongodb.com/manual/reference/parameters/#param.wiredTigerConcurrentReadTransactions

Was it helpful?

Solution

The read/write ticket values are set to 128 to prevent overwhelming WiredTiger with concurrent requests. They are chosen to cater for the typical server hardware. It's generally not recommended to change these values.

If you see stalling and observed that the read/write tickets to be maxed out, it's extremely likely that this is just a symptom. The cause of the stalling is typically somewhere else.

A couple of examples:

  1. A slow disk can cause write requests to pile up since they can't be serviced fast enough. If the read/write ticket is increased because it appears that the storage engine is hitting the ticket number limit consistently, what actually will happen is that you're putting even more pressure on the disk, which will result in further delay. The correct remediation in this case is to provision a faster disk.

  2. You have a deployment in AWS. For most of the day, read & write progress smoothly. There is an increase in write load, but the system can handle it just fine. Suddenly things start to stall, and you see read/write tickets exhausted for apparently no reason. In most cases like this, the root cause is because the disk has ran through its allotted burst IOPS and is being throttled by AWS. As you can imagine, increasing read/write ticket numbers in this case is not helpful and can make things worse.

In conclusion, you don't really need to tweak read/write tickets. If you find it constantly exhausted, check for possible causes of work piling up and waiting for the storage engine.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top