1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-04-29 05:04:27 +01:00
Files
operating-system/buildroot-external/rootfs-overlay/usr/lib/systemd/system/haos-mglru.service
Stefan Agner c7588e9350 Enable Multi-Gen LRU (#2392)
* Enable Multi-Gen LRU

Multi-Gen LRU should improve performance under memory pressure. This is
especially useful for embedded platforms where memory is scarce.

* Add service to configure Multi-Gen LRU

Use min_ttl_ms of 1 which is the least aggressive in terms of lag. Since
we are a server application, we can tune trashing prevention with a
higher acceptable lag.
2023-03-31 23:28:43 +02:00

12 lines
226 B
Desktop File

[Unit]
Description=Configure multigenerational LRU
ConditionPathExists=/sys/kernel/mm/lru_gen/enabled
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo 1 > /sys/kernel/mm/lru_gen/min_ttl_ms"
[Install]
WantedBy=basic.target