ApsaraDB for MongoDB lets you tune database parameters to match your workload. Some parameters require an instance restart after modification. Use the Force Restart column on the Parameter List page to identify whether a restart is required before making changes.
Prerequisites
Before you begin, ensure that you have:
-
A standalone, replica set, or sharded cluster instance
Configure parameters
Step 1: Open the Parameters page
-
Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region where the instance resides.
-
Find the instance and click its ID.
-
In the left-side navigation pane, click Parameters. The Parameters page shows the following columns for each parameter: Parameter Name, Default Parameter Value, Running Parameter Value, Force Restart, Value Range, and Parameter Description.
Note An instance restart interrupts all connections. Schedule parameter changes during off-peak hours to minimize impact on your workload.
Step 2: Modify parameters
Proceed based on your instance type.
Standalone and replica set instance
-
Click
in the Running Parameter Value column for the parameter you want to change. -
In the dialog box, enter the new value.
-
Click OK.
Sharded cluster instance
A sharded cluster has three node types. Modify parameters for each node type separately.
| Node type | Displays modifiable parameters for |
|---|---|
| DB | Shard nodes |
| Mongos | Mongos nodes |
| CS | Configserver nodes |
-
Select a node type from the Node drop-down list (DB, Mongos, or CS).
-
Click Batch Modify.
Note To change a single parameter, click
in the Running Parameter Value column instead. -
In the Modify Parameter panel, set the new values for one or more parameters.
-
Click OK. Repeat these steps for each node type whose parameters you need to change.