Skip to content

Commit

Permalink
PSMDB-1314 Simplified the Set Parameter guide (6.0) (#763)
Browse files Browse the repository at this point in the history
modified:   docs/set-parameter.md
  • Loading branch information
nastena1606 authored Sep 13, 2023
1 parent 2c17837 commit 9c3d66a
Showing 1 changed file with 22 additions and 79 deletions.
101 changes: 22 additions & 79 deletions docs/set-parameter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,93 +3,36 @@
Percona Server for MongoDB includes several parameters that can be changed
in one of the following ways:

=== "Configuration file"

* The `setParameter` admonitions in the configuration file
for persistent changes in production:
Use the `setParameter` admonitions in the configuration file
for persistent changes in production:

```yaml
setParameter:
cursorTimeoutMillis: <int>
failIndexKeyTooLong: <boolean>
internalQueryPlannerEnableIndexIntersection: <boolean>
ttlMonitorEnabled: <boolean>
ttlMonitorSleepSecs: <int>
```
```yaml
setParameter:
<parameter>: <value>
```

=== "Command line"

* The `--setParameter` option arguments when running the `mongod` process
for development or testing purposes:
Use the `--setParameter` command line option arguments when running the `mongod` process for development or testing purposes:

```{.bash data-prompt="$"}
$ mongod \
--setParameter cursorTimeoutMillis=<int> \
--setParameter failIndexKeyTooLong=<boolean> \
--setParameter internalQueryPlannerEnableIndexIntersection=<boolean> \
--setParameter ttlMonitorEnabled=<boolean> \
--setParameter ttlMonitorSleepSecs=<int>
```
```{.bash data-prompt="$"}
$ mongod \
--setParameter <parameter>=<value>
```

=== "The `setParameter` command"

* The `setParameter` command on the `admin` database
to make changes at runtime:
Use the `setParameter` command on the `admin` database
to make changes at runtime:

```{.javascript data-prompt=">"}
> db = db.getSiblingDB('admin')
> db.runCommand( { setParameter: 1, cursorTimeoutMillis: <int> } )
> db.runCommand( { setParameter: 1, failIndexKeyTooLong: <boolean> } )
> db.runCommand( { setParameter: 1, internalQueryPlannerEnableIndexIntersection: <boolean> } )
> db.runCommand( { setParameter: 1, ttlMonitorEnabled: <int> } )
> db.runCommand( { setParameter: 1, ttlMonitorSleepSecs: <int> } )
```
```{.javascript data-prompt=">"}
> db = db.getSiblingDB('admin')
> db.runCommand( { setParameter: 1, <parameter>: <value> } )
```

## Parameters

### cursorTimeoutMillis

**Type**: integer <br>
**Default**: `600000` (ten minutes)

Sets the duration of time after which idle query cursors
are removed from memory.

### failIndexKeyTooLong

**Type**: boolean <br>
**Default**: `true`

Versions of MongoDB prior to 2.6 would insert and update documents
even if an index key was too long.
The documents would not be included in the index.
Newer versions of MongoDB ignore documents with long index key.
By setting this value to `false`, the old behavior is enabled.

### internalQueryPlannerEnableIndexIntersection

**Type**: boolean <br>
**Default**: `true`

Due to changes introduced in MongoDB 2.6.4,
some queries that reference multiple indexed fields,
where one field matches no documents,
may choose a non-optimal single-index plan.
Setting this value to `false` will enable the old behavior
and select the index intersection plan.

### ttlMonitorEnabled

**Type**: boolean <br>
**Default**: `true`

If this option is set to `false`,
the worker thread that monitors TTL Indexes and removes old documents
will be disabled.

### ttlMonitorSleepSecs

**Type**: integer <br>
**Default**: `60` (one minute)


Defines the number of seconds to wait
between checking TTL Indexes for old documents and removing them.

See what parameters you can define in the [parameters list](https://www.mongodb.com/docs/v5.0/reference/parameters/#parameters).
>>>>>>> 52c6822... PSMDB-1314 Simplified the Set Parameter guide

0 comments on commit 9c3d66a

Please sign in to comment.