Skip to content

Commit

Permalink
docs: update MEMORY-SETTINGS.md with additional guidance for configur…
Browse files Browse the repository at this point in the history
…ing memory and OOM troubleshooting.

Added a link to the official cgroups v1 documentation.

Added instructions for editing `grub.cfg` on the device.

Provided details on where to find OOM (Out Of Memory) messages.

Fixed minor punctuation issue in the section about EVE services hitting
memory limits.

Signed-off-by: Nikolay Martyanov <nikolay@zededa.com>
  • Loading branch information
OhmSpectator authored and milan-zededa committed Aug 27, 2024
1 parent ca96b4b commit f625788
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/MEMORY-SETTINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Cgroups are a Linux kernel feature that limits, accounts for, and isolates the
resource usage of a collection of processes. Cgroups are used to control the
memory, CPU, and I/O resources that a process can use.

Official documentation: [cgroups](https://www.kernel.org/doc/Documentation/cgroup-v1/cgroups.txt)

### Cgroups memory limits

Each cgroup has its own memory limits. In EVE OS, we use the memory limits of
Expand Down Expand Up @@ -174,6 +176,16 @@ set_global hv_eve_mem_settings "eve_mem=<value>,max:<value>"
set_global hv_ctrd_mem_settings "ctrd_mem=<value>,max:<value>"
```

It can be done on the device by mounting the config partition and editing the
`grub.cfg` file. The changes will be applied after the device reboot.

```bash
eve config mount /mnt
echo "set_global hv_dom0_mem_settings \"dom0_mem=1G,max:2G\"" >> /mnt/grub.cfg
eve config unmount /mnt
reboot
```

## User applications memory settings

Besides the obvious memory settings of RAM that comes from the controller, there
Expand Down Expand Up @@ -458,7 +470,7 @@ other user applications.
An indication that the EVE services require more memory can be the situation
when the EVE services are frequently hitting memory limits and the OOM killer is
fired with constraint `CONSTRAINT_NONE` and the `oom_memcg` value set to one of
the cgroups of the EVE services:
the cgroups of the EVE services.

#### Global vs app-specific VMM Overhead

Expand Down Expand Up @@ -493,3 +505,8 @@ it is not clear which exact process is responsible for that. Most likely, it is
a case when several processes are consuming a lot of memory, while none of them
is consuming too much to reach the memory limit. In this case step-by-step
debugging is required to find the solution to the problem.

## Where to find the OOM messages

The OOM messages can be found in the dmesg logs. They are also exposed via the
syslog subsystem, so they are aggregated in the controller logs.

0 comments on commit f625788

Please sign in to comment.