opensearch-docs-cn/_opensearch/install/important-settings.md

41 lines
1.2 KiB
Markdown
Raw Normal View History

2021-05-28 13:48:19 -04:00
---
layout: default
title: Important settings
parent: Install OpenSearch
nav_order: 70
---
# Important settings
2021-07-23 15:34:17 -04:00
For production workloads, make sure the [Linux setting](https://www.kernel.org/doc/Documentation/sysctl/vm.txt) `vm.max_map_count` is set to at least 262144. Even if you use the Docker image, set this value on the *host machine*. To check the current value, run this command:
2021-05-28 13:48:19 -04:00
```bash
cat /proc/sys/vm/max_map_count
```
2021-07-23 15:34:17 -04:00
To increase the value, add the following line to `/etc/sysctl.conf`:
2021-05-28 13:48:19 -04:00
```
vm.max_map_count=262144
```
Then run `sudo sysctl -p` to reload.
2021-06-10 15:26:41 -04:00
The [sample docker-compose.yml]({{site.url}}{{site.baseurl}}/opensearch/install/docker#sample-docker-compose-file) file also contains several key settings:
2021-05-28 13:48:19 -04:00
- `bootstrap.memory_lock=true`
Disbles swapping (along with `memlock`). Swapping can dramatically decrease performance and stability, so you should ensure it is disabled on production clusters.
- `OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m`
Sets the size of the Java heap (we recommend half of system RAM).
- `nofile 65536`
Sets a limit of 65536 open files for the OpenSearch user.
- `port 9600`
Allows you to access Performance Analyzer on port 9600.