Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Increase max_result_window and prevent swapping (#1018)

* Increase max_result_window to 5000000

This is until we switch to the scroll API. We can't access pages after
~2000 without increasing it.

* Increase jvm heap ram

* Prevent elasticsearch from being swapped
Cette révision appartient à :
tomleb 2017-06-17 18:30:24 -04:00 révisé par ewhal
Parent ad3a44e2f8
révision d1f9886559
4 fichiers modifiés avec 12 ajouts et 2 suppressions

Voir le fichier

@ -13,5 +13,5 @@ nyaapantsu_elasticsearch_old_index: CHANGETHIS
nyaapantsu_torrent_tablename: torrents
# nyaapantsu_torrent_tablename: torrents_sukebei
nyaapantsu_max_open_files: 200000
nyaapantsu_jvm_heapsize_gb: 1
nyaapantsu_jvm_heapsize_gb: 8
# vim: ft=yaml

Voir le fichier

@ -36,7 +36,7 @@ settings:
index:
number_of_shards: 1
number_of_replicas: 0
max_result_window: 30000
max_result_window: 5000000
mappings:
torrents:

Voir le fichier

@ -46,6 +46,13 @@
line: 'ES_JAVA_OPTS="-Xms{{ nyaapantsu_jvm_heapsize_gb }}g -Xmx{{ nyaapantsu_jvm_heapsize_gb }}g"'
become: true
- name: Lock elasticsearch memory
lineinfile:
path: /etc/elasticsearch/elasticsearch.yml
regexp: '^bootstrap.memory_lock: true'
line: 'bootstrap.memory_lock: true'
become: true
- name: Create override folder
file:
path: /etc/systemd/system/elasticsearch.service.d/

Voir le fichier

@ -1,3 +1,6 @@
[Service]
LimitNOFILE=
LimitNOFILE={{ nyaapantsu_max_open_files }}
LimitMEMLOCK=
LimitMEMLOCK=infinity