Disable swap on Linux?

Hello

Reading this Disable swapping | Elasticsearch Guide [master] | Elastic it seems the general advice is to disable swap completely....That being said, I have Elastic, Logstash and Kibana all installed on the same server.

Is it still a good idea to disable it?

Thank you

Yep, still do it for Elasticsearch.

I was gonna disable it system wide.

I ask this since you said "still do it for Elasticsearch"

Yes that's what I mean, do it system wide, because Elasticsearch will be better off with it off.

OK, thank you.

Yes, for "well behaved" systems, but sometimes they don't behave :slight_smile:

What happens without swap when the system is critically low on memory? OOM Killer will usually kill the process that will free the most memory, which may be the elasticsearch process.

IMHO, having system swap available (see this) and setting bootstrap.memory_lock for elasticsearch may let your system recover from some low memory events without OOM Killer sacrificing some processes.

Moving unreferenced memory pages to swap disk IS cost effective. It's REFREENCING swapped pages that causes problems.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.