Heap Sizing and Swapping Elasticsearch The Definitive Guide [2 . When the server process starts, it will read this environment variable and set the heap sizes are the same to prevent the heap from resizing at runtime, a very costly process. . out clearly swapping main memory to disk will crush server performance. .