@@ -117,44 +117,45 @@ Flags:
117117
118118Environment Variables (Overrides):
119119 [Connection]
120- PLGM_URI Connection URI
121- PLGM_USERNAME Database User
122- PLGM_PASSWORD Database Password (Recommended: Use Prompt)
123- PLGM_DIRECT_CONNECTION Force direct connection (true/false)
124- PLGM_REPLICASET_NAME Replica Set name
125- PLGM_READ_PREFERENCE nearest
120+ PLGM_URI Connection URI
121+ PLGM_USERNAME Database User
122+ PLGM_PASSWORD Database Password (Recommended: Use Prompt)
123+ PLGM_DIRECT_CONNECTION Force direct connection (true/false)
124+ PLGM_REPLICASET_NAME Replica Set name
125+ PLGM_READ_PREFERENCE nearest
126126
127127 [Workload Core]
128- PLGM_DEFAULT_WORKLOAD Use built-in workload (true/false)
129- PLGM_COLLECTIONS_PATH Path to collection JSON
130- PLGM_QUERIES_PATH Path to query JSON
131- PLGM_DURATION Test duration (e.g. 60s, 5m)
132- PLGM_CONCURRENCY Number of active workers
133- PLGM_DOCUMENTS_COUNT Initial seed document count
134- PLGM_DROP_COLLECTIONS Drop collections on start (true/false)
135- PLGM_SKIP_SEED Do not seed initial data on start (true/false)
136- PLGM_DEBUG_MODE Enable verbose logic logs (true/false)
137- PLGM_USE_TRANSACTIONS Enable transactional workloads (true/false)
138- PLGM_MAX_TRANSACTION_OPS Maximum number of operations to group into a single transaction block
128+ PLGM_DEFAULT_WORKLOAD Use built-in workload (true/false)
129+ PLGM_COLLECTIONS_PATH Path to collection JSON
130+ PLGM_QUERIES_PATH Path to query JSON
131+ PLGM_DURATION Test duration (e.g. 60s, 5m)
132+ PLGM_CONCURRENCY Number of active workers
133+ PLGM_DOCUMENTS_COUNT Initial seed document count
134+ PLGM_DROP_COLLECTIONS Drop collections on start (true/false)
135+ PLGM_SKIP_SEED Do not seed initial data on start (true/false)
136+ PLGM_SEED_BATCH_SIZE Number of documents to insert per batch during SEED phase
137+ PLGM_DEBUG_MODE Enable verbose logic logs (true/false)
138+ PLGM_USE_TRANSACTIONS Enable transactional workloads (true/false)
139+ PLGM_MAX_TRANSACTION_OPS Maximum number of operations to group into a single transaction block
139140
140141 [Operation Ratios] (Must sum to ~ 100)
141- PLGM_FIND_PERCENT % of ops that are FIND
142- PLGM_UPDATE_PERCENT % of ops that are UPDATE
143- PLGM_INSERT_PERCENT % of ops that are INSERT
144- PLGM_DELETE_PERCENT % of ops that are DELETE
145- PLGM_AGGREGATE_PERCENT % of ops that are AGGREGATE
146- PLGM_TRANSACTION_PERCENT % of ops that are TRANSACTIONAL
147- PLGM_BULK_INSERT_PERCENT % of ops that are BULK INSERTS
142+ PLGM_FIND_PERCENT % of ops that are FIND
143+ PLGM_UPDATE_PERCENT % of ops that are UPDATE
144+ PLGM_INSERT_PERCENT % of ops that are INSERT
145+ PLGM_DELETE_PERCENT % of ops that are DELETE
146+ PLGM_AGGREGATE_PERCENT % of ops that are AGGREGATE
147+ PLGM_TRANSACTION_PERCENT % of ops that are TRANSACTIONAL
148+ PLGM_BULK_INSERT_PERCENT % of ops that are BULK INSERTS
148149
149150 [Performance Optimization]
150- PLGM_FIND_BATCH_SIZE Docs returned per cursor batch
151- PLGM_INSERT_BATCH_SIZE Number of docs in batch bulk insert
152- PLGM_FIND_LIMIT Max docs per Find query
153- PLGM_INSERT_CACHE_SIZE Generator buffer size
154- PLGM_OP_TIMEOUT_MS Soft timeout per DB op (ms)
155- PLGM_RETRY_ATTEMPTS Retry attempts for failures
156- PLGM_RETRY_BACKOFF_MS Wait time between retries (ms)
157- PLGM_STATUS_REFRESH_RATE_SEC Status report interval (sec)
151+ PLGM_FIND_BATCH_SIZE Docs returned per cursor batch
152+ PLGM_INSERT_BATCH_SIZE Number of docs in batch bulk insert
153+ PLGM_FIND_LIMIT Max docs per Find query
154+ PLGM_INSERT_CACHE_SIZE Generator buffer size
155+ PLGM_OP_TIMEOUT_MS Soft timeout per DB op (ms)
156+ PLGM_RETRY_ATTEMPTS Retry attempts for failures
157+ PLGM_RETRY_BACKOFF_MS Wait time between retries (ms)
158+ PLGM_STATUS_REFRESH_RATE_SEC Status report interval (sec)
158159 GOMAXPROCS Go Runtime CPU limit
159160```
160161
@@ -246,6 +247,7 @@ You can override any setting in `config.yaml` using environment variables. This
246247| ` documents_count ` | ` PLGM_DOCUMENTS_COUNT ` | Number of documents to seed initially | ` 10000 ` |
247248| ` drop_collections ` | ` PLGM_DROP_COLLECTIONS ` | Drop collections before starting (` true ` /` false ` ) | ` true ` |
248249| ` skip_seed ` | ` PLGM_SKIP_SEED ` | Do not seed initial data on start (` true ` /` false ` ) | ` true ` |
250+ | ` seed_batch_size ` | ` PLGM_SEED_BATCH_SIZE ` | Number of documents to insert per batch during SEED phase | ` 1000 ` |
249251| ` debug_mode ` | ` PLGM_DEBUG_MODE ` | Enable verbose debug logging (` true ` /` false ` ) | ` false ` |
250252| ` use_transactions ` | ` PLGM_USE_TRANSACTIONS ` | Enable Transactional Workloads (` true ` /` false ` ) | ` false ` |
251253| ` max_transaction_ops ` | ` PLGM_MAX_TRANSACTION_OPS ` | Maximum number of operations to group into a single transaction block | ` 5 ` |
@@ -482,6 +484,9 @@ These settings affect the efficiency of individual database operations and memor
482484 * * Default:* ` 10 `
483485* ** ` insert_batch_size ` ** : The number of documents to be inserted by bulk inserts.
484486 * * Default:* ` 10 `
487+ * ** ` seed_batch_size ` ** : The number of documents grouped into a single InsertMany call during the initial data seeding phase.
488+ * * Tip:* Keeps memory usage stable when seeding millions of documents. A value of 1000 is recommended for performance.
489+ * * Default:* ` 1000 `
485490* ** ` find_limit ` ** : The hard limit on documents returned for ` find ` operations.
486491 * * Default:* ` 5 `
487492* ** ` insert_cache_size ` ** : The buffer size for the document generator channel.
0 commit comments