Negative free swap space size

I installed ES 7.8.0 to my local kubernetes cluster using the helm chart into my docker-for-windows and WSL2. I'm seeing this error message in my logs constantly.

{"type": "server", "timestamp": "2020-07-26T03:23:47,931Z", "level": "WARN", "component": "o.e.m.o.OsProbe", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "OS reported a negative free swap space size [-1331200]", "cluster.uuid": "VRfCMzqyRLe8OFpAMl949A", "node.id": "RL0hcyEiTIWmMLDZH3vdwQ"  }
{"type": "server", "timestamp": "2020-07-26T03:23:57,931Z", "level": "WARN", "component": "o.e.m.o.OsProbe", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "OS reported a negative free swap space size [-1331200]", "cluster.uuid": "VRfCMzqyRLe8OFpAMl949A", "node.id": "RL0hcyEiTIWmMLDZH3vdwQ"  }
{"type": "server", "timestamp": "2020-07-26T03:24:07,932Z", "level": "WARN", "component": "o.e.m.o.OsProbe", "cluster.name": "elasticsearch", "node.name": "elasticsearch-master-0", "message": "OS reported a negative free swap space size [-1331200]", "cluster.uuid": "VRfCMzqyRLe8OFpAMl949A", "node.id": "RL0hcyEiTIWmMLDZH3vdwQ"  }

2 Likes

I had the same issue too. I installed ES 7.8.0 using Elastic Cloud Kubernetes. I implement this "sysctl -w vm.swappiness=1" and "swapoff " on init containers for disabling swap, because I had an issue if disabling swap using "bootstrap.memory_lock: true". is it possible that my configuration below to disable swap might cause the negative free swap space?

initContainers:
            - name: sysctl
              command:
                - sh
                - '-c'
                - |
                  sysctl -w vm.max_map_count=262144
                  sysctl -w vm.swappiness=1
                  swapoff -a
1 Like

I also receive the WARN log OS reported a negative free swap space size [-4096] on a hosted Elastic Cloud deployment running 7.8.1.

The warning only comes from a single data node that is not unique from other data nodes in any way I can think of.

I submitted a ticket, will see what they follow up with.

1 Like

I got this https://github.com/elastic/elasticsearch/pull/60444

1 Like

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