Module: workloads/snapshot_reads

Test performance of snapshot reads with and without background write load.

Setup

Populate a collection.

Test

Each thread performs a query of the form {_id: {$gte: }} with limit 100, batchSize 2, and read concern level 'snapshot'. This is executed as a find and 49 getMores. This exercises the stashing of locks and storage engine resources between find and getMore for snapshot reads. The throughput is measured as ops/sec*100, to account for the fact that each operation finds 100 documents.

The test may be run with a 'background_writes' parameter. If this is true, then background write load is generated in the form of updates to random documents in the collection. This tests the limits of cache usage while transactions are pinning snapshot history in cache. The write throughput is additionally measured in ops/sec.

Notes

Owning-team

mongodb/storage-execution

Source:

Members

(inner) background_currentOp

Run the test with the currentOp command running in the background.

Source:

(inner) background_writes

Run the test with background writes on.

Source:

(inner) nb_docs

The number of documents to insert into the collection during setup.

Source:

(inner) test_duration_secs

The test duration in seconds per thread level.

Source:

(inner) thread_levels

The number of threads to run in parallel.

Source:

(inner) useSnapshotReads

If true, reads are performed using read concern level 'snapshot'. useSnapshotReads=false is used as a control.

Source: