Module: workloads/snapshot_window

Compare performance of a writes + PIT reads workload using a dynamically versus statically maintained available snapshot history window size, and different storage engine cache sizes.

Setup

Creates a collection and inserts 'nb_docs' over a period of time of 'snpashot_window_size_in_seconds' seconds in order to establish an available snapshot history window of max size. THe data documents are very large, so cache pressure can be built quickly via the updates workload that will be run.

Test

Do the following workloads in parallel:

  • Continuous updates to the existing documents. This is done to build cache pressure as well as move the snapshot window forward in time so that it will dynamically adjust. The stable timestamp must move forward for the window between it and oldest timestamp to grow or shrink.

  • Point-in-time reads using atClusterTime between the latest timestamp and 'maxTargetSnapshotHistoryWindowInSeconds'. These reads will remain open for a time, pinning the snapshot in cache until it finishes. This attempts to simulate snapshot transaction user requests.

The test may run with a 'static_window' parameter. If this is true, then a failpoint will be activated to prevent changes to 'targetSnapshotHistoryWindowInSeconds', which is the size of the available snapshot history window that the system tries to maintain. Normally, the window size adjusts dymanically in response to cache pressure and PIT reads failing with SnapshotTooOld errors.

The throughput measurements will be - successful PIT reads/sec - total successful PIT reads - total failed PIT reads - updates/sec - total updates

Owning-team

mongodb/storage-execution

Source:

Members

(inner) nb_docs

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

Source:

(inner) server_cache_size_gb

Specifies the storage engine's cache size in GB.

Source:

(inner) snapshot_held_open_for_seconds

Each successful find operation will hold a snapshot open between 0 and snapshot_held_open_for_seconds seconds by delaying the getMore. The specific value is randomized since transcation will be held open for varying lengths of time.

Source:

(inner) static_window

Dictates whether the test is run with a statically or dynamically sized available snapshot window.

Source:

(inner) test_duration_secs

How long to run the workloads.

Source:

(inner) writer_threads

The number of parallel readers and writers, for the simultaneously running read and write workloads.

Source: