Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElasticSearch memory limit #77

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ It is best practice to work within a python virtual environment for both develop

```sh
# run the following from the top-level directory of your python project
python3 -m venv env-name # creates the environment
python3 -m venv venv # creates the environment
source venv/bin/activate # activates the environment
deactivate # deactivates the environment
```
Expand Down Expand Up @@ -210,4 +210,20 @@ docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d --build

then wait for the elastic search container to come up (use
`docker-compose logs -f` to see it if you like), then execute the
following (from the top-level directory of this repo):
following (from the top-level directory of this repo, having
activated the virtual environment you created earlier):

```
python -m pytest tests
```

## Examining memory usage in elasticsearch

```
$ docker-compose exec elasticsearch bash
elasticsearch@7b6eb4ff0455:~$ curl "localhost:9200/_nodes/stats?filter_path=nodes.*.jvm.mem.pools.old"
{"nodes":{"w9Hm2YGAT7iorZM3JTYlUA":{"jvm":{"mem":{"pools":{"old":{"used_in_bytes":29128704,"max_in_bytes":8589934592,"peak_used_in_bytes":41711616,"peak_max_in_bytes":8589934592}}}}}}}
elasticsearch@7b6eb4ff0455:~$ exit
```

This shows us 291M used, 8.5G max.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
- xpack.security.enabled=false
- http.cors.enabled=true
- http.cors.allow-origin=/http:\/\/(elasticsearch|localhost):9200/
- "ES_JAVA_OPTS=-Xms4g -Xmx8g"
volumes:
- es_data:/usr/share/elasticsearch/data:rw

Expand Down
Loading