This page describes the Optimization Pack for MongoDb version 4.x.
Name | Unit | Description |
---|---|---|
Name | Unit | Description |
---|---|---|
Here are some constraints on parameters of MongoDB 4 that avoid common errors in the configuration of a MongoDB deployment:
Name | Unit | Type | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
Name | Unit | Type | Default | Domain | Restart | Description |
---|---|---|---|---|---|---|
Constraint |
---|
mongodb_document_deleted
documents/s
The average number of documents deleted per second
mongodb_documents_inserted
documents/s
The average number of documents inserted per second
mongodb_documents_updated
documents/s
The average number of documents updated per second
mongodb_documents_returned
documents/s
The average number of documents returned by queries per second
mongodb_connections_current
connections
The current number of opened connections
mongodb_heap_used
bytes
The total size of heap space used (only available in Linux/Unix systems)
mongodb_mem_used
bytes
The total amount of memory used
mongodb_page_faults_total
faults/s
The average number of page faults per second (i.e., operations that require MongoDB to access data on disk rather than on memory)
mongodb_global_lock_current_queue
ops
The current number of operations queued because of a lock
mongodb_cache_size
megabytes
Integer
You should select your own default value when you create a study, since it is highly dependent on your system (how much memory your system has)
You should select your own default value when you create a study, since it is highly dependent on your system (how much memory your system has)
No
The maximum size of the internal cache that MongoDB (WiredTiger) will use to operate
mongodb_eviction_trigger
percentage
Integer
95
1 → 99
No
The percentage threshold on the use of the MongoDB cache for which cache eviction will start and client threads will throttle
mongodb_eviction_target
percentage
Integer
80
1 → 99
No
The target percentage usage of the MongoDB cache to reach after evictions
mongodb_eviction_dirty_trigger
percentage
Integer
20
1 → 99
No
The percentage threshold on the use of MongoDB dirty cache for which cache eviction will start and client threads will throttle
mongodb_eviction_dirty_target
percentage
Integer
5
1 → 99
No
The target percentage usage of the MongoDB dirty cache to reach after evictions
mongodb_eviction_threads_min
threads
Integer
4
1 → 20
No
The minimum number of threads to use to perform cache eviction
mongodb_eviction_threads_max
threads
Integer
4
1 → 20
No
The maximum number of threads to use to perform cache eviction
mongodb_sync_delay
seconds
Integer
1min
1min → 6min
no
The temporal interval between fsync operations where mongod flushes its working memory to disk
mongodb_eviction_threads_min <= mongodb_eviction_threads_max
mongodb_eviction_dirty_target <= mongodb_eviction_target
mongodb_eviction_dirty_trigger <= mongodb_eviction_trigger
The MongoDB optimization pack helps you optimize instances of MongoDB to reach the desired performance goal. The optimization pack provides parameters and metrics specific to MongoDB that can be leveraged to reach, among others, two main goals:
Throughput optimization - increasing the capacity of a MongoDB deployment to serve clients
Cost optimization - decreasing the size of a MongoDB deployment while guaranteeing the same service level
To reach such goals the pack focuses mostly on the parameters managing the cache, being one of the elements that impact performances the most; in particular, the optimization pack provides parameters to control the lifecycle and the size of the MongoDB’s cache thus significantly impacting performance.
Even though it is possible to evaluate performance improvements of MongoDB by looking at the business application that uses it as its database, looking at the end to end throughput or response time or using a performance test like YCSB, the optimization pack provides internal MongoDB metrics that can shed a light too on how MongoDB is performing, in particular in terms of throughput, for example:
The number of documents inserted in the database per second
The number of active connections
The optimization pack supports the following version of MongoDB.
Component Type | Description |
---|---|
Here’s the command to install the MongoDB optimization-pack using the Akamas CLI:
MongoDB version 4.x
MongoDB version 5.x