hbz / lobid

Linking Open Bibliographic Data
https://lobid.org/
Eclipse Public License 2.0
16 stars 4 forks source link

Disable swap for elasticsearch #174

Closed dr0i closed 9 years ago

dr0i commented 9 years ago

Despite our 82 GB Ram, at some point elasticsearch begins to swap, slowly but steadily. The cause is the linux OS which wants to be clever (see https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html#setup-configuration-memory). It's best practice to disallow swap for elasticsearch, which is possible but only in tight cooporation with the OS:

It's of most importance to do the steps marked as root to do it as root, not just sudo.

Try: curl http://localhost:9200/_nodes/process?pretty |grep mlock, it should show true if it works.

dr0i commented 9 years ago

Put ulimit -l unlimited into elasticsearch start script in init.d. Restarted. urled mlock , all true. Closing.