1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-05-04 07:27:08 +01:00

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.
This commit is contained in:
Stefan Agner
2023-03-31 23:28:43 +02:00
committed by GitHub
parent bdb3bd3ab1
commit c7588e9350
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
[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