elasticsearch: Stop using mmap(2)
- It caused every JVM process to eventually use 1.1TB+ of virtual memory on our setup, causing excessive VM fragmentation and performance degradation. Elasticsearch nodes eventually became unable to process data after a while.
- Switching from mmap(2) to the niofs API also measurably decreased I/O wait and disk trashing, increasing performance under load.