Our strong recommendation is disabling swap over any other alternative to avoid the JVM from landing on disk. This commit clarifies the docs in this regard.
ansible-elasticsearch