# System settings

Some settings may require attention before moving to production. While the steps below may not necessitate any action, there are cases where the host running both Snow Owl and Elasticsearch will require fine-tuning.

## Configure your host for Elasticsearch requirements

Some system-level settings need to be checked before deploying your own Elasticsearch in production.&#x20;

Following [this link](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-prod-prerequisites) there is an extensive guide on what to verify, but usually, it comes down to these items:

* [Set vm.max\_map\_count to at least 262144](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_set_vm_max_map_count_to_at_least_262144)
* [Increase ulimits for nofile and nproc](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_increase_ulimits_for_nofile_and_nproc)
* [Disable swapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#_disable_swapping)

## Configure your host for Snow Owl requirements

### Set permissions for folders and files appropriately

By default, Snow Owl runs inside the container as user `snowowl` using uid:gid `1000:1000`.

* If you are bind-mounting a local directory or file:
  * ensure it is readable by the user mentioned above
  * ensure that settings, data and log directories are writable as well

A good strategy is to grant group access to gid `1000` or `0` for the local directory.

### Bind-mount Snow Owl's temporary working folder

In case the file system of the docker service on the host is different from what the Snow Owl deployment uses, it could be worthwhile to bind-mount Snow Owl's temporary working folder to a path that has excellent I/O performance. E.g.:

* the root file system `/` is backed by a block storage that purposefully has lower I/O performance, this is the file system used by the docker service.
* the deployment folder `/opt/snow-owl` is backed by a fast local SSD

The definition of the `snowowl` service in the docker compose file should be amended like this:

```diff
snowowl:
    image: b2ihealthcare/snow-owl-<variant>:<version>
    ...
    volumes:
      - ./config/snowowl/snowowl.yml:/etc/snowowl/snowowl.yml
      - ./config/snowowl/users:/etc/snowowl/users
      - ${SNOWOWL_DATA_FOLDER}:/var/lib/snowowl
      - ${SNOWOWL_LOG_FOLDER}:/var/log/snowowl
+     - /path/to/folder/with/fast/performance:/usr/share/snowowl/work
    ports:
    ...
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2ihealthcare.com/snow-owl/9.x/setup-and-administration/configuration/system-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
