Replies: 5 comments 14 replies
-
|
In my testing using Virtual Manager the system starts up with the minimum configured of 1GB, so that looks good here. Technically, HAOS commes with VirtIO ballooning support, and the kernel module is loaded by default. So it really should work. Does ballooning in your Proxmox setup work with other Linux distribution? |
Beta Was this translation helpful? Give feedback.
-
|
It seems that Virtual Manager doesn't support dynamic ballooning, but changing the current assignment at any point in time seems to work and apply to the system: |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone, I've just installed my new Raspberry Pi 5, and as it's slightly overpowered to just run HomeAssistent I run an AlmaLinux 9 as a KVM base below. At first I gave HAOS 6 of 8GB of memory as I thought ballooning will prevent my memory to flow over (and Swap might clear the rest...). Or at least I can write some automations for that... I've tested with another VM running AlmaLinux 9 and setting current allocation limit works just fine. Given that, it seems the virtio ballooning driver is not included - or loaded - within the HAOS image. I'm using the Image haos_generic-aarch64-15.1.qcow2 . Am I missing a peace here, maybe using the wrong image? Best regards, |
Beta Was this translation helpful? Give feedback.
-
|
What does |
Beta Was this translation helpful? Give feedback.
-
|
Managed to get something working in Node-Red; though for performance and security reasons, it's probably best to recreate this as a shell script on the host and run it there. Nevertheless, I'm still testing how it works out. Some notes:
Node-red js nodes``` [{ "id": "6cc21fdecb4deef3", "type": "ssh-v3", "z": "6edd28544c3c6e49", "name": "", "conf": "ba6b74662ac26833", "debug": false, "x": 390, "y": 2600, "wires": [["fe59cc48dc519971"]] }, { "id": "cb76e37e78830a20", "type": "inject", "z": "6edd28544c3c6e49", "name": "", "props": [{ "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "17", "crontab": "", "once": false, "onceDelay": "10", "topic": "", "payload": "", "payloadType": "date", "x": 110, "y": 2580, "wires": [["3b518d35aa77f652"]] }, { "id": "08cbe2472ffaacc2", "type": "change", "z": "6edd28544c3c6e49", "name": "", "rules": [{ "t": "set", "p": "currentusage", "pt": "msg", "to": "payload", "tot": "msg" }, { "t": "set", "p": "payload", "pt": "msg", "to": "sudo virsh domstats --balloon linux2022", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 220, "y": 2660, "wires": [["6cc21fdecb4deef3"]] }, { "id": "fe59cc48dc519971", "type": "function", "z": "6edd28544c3c6e49", "name": "function 1", "func": "var current, max;\n\nmsg.session.stdout.forEach((cur) => {\n cur.split(/(\\s+)/).forEach((line) => {\n let regex = /balloon\\.(.+?)=(.+?)$/;\n let found = line.match(regex);\n if (found !== null && found[1] == \"current\") {\n current = found[2]; \n } else if (found !== null && found[1] == \"maximum\") {\n max = found[2]; \n }\n //msg.session.stdout.push(found)\n });\n});\nmsg.session = null;\n\nmsg.current = parseInt(current);\nmsg.max = parseInt(max);\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 540, "y": 2700, "wires": [["c630667fb2e40329"]] }, { "id": "3b518d35aa77f652", "type": "api-current-state", "z": "6edd28544c3c6e49", "name": "", "server": "ef06c680.510d68", "version": 3, "outputs": 1, "halt_if": "", "halt_if_type": "num", "halt_if_compare": "is", "entity_id": "sensor.system_monitor_memory_usage", "state_type": "str", "blockInputOverrides": true, "outputProperties": [{ "property": "payload", "propertyType": "msg", "value": "string", "valueType": "entityState" }, { "property": "data", "propertyType": "msg", "value": "", "valueType": "entity" } ], "for": "0", "forType": "num", "forUnits": "minutes", "override_topic": false, "state_location": "payload", "override_payload": "msg", "entity_location": "data", "override_data": "msg", "x": 280, "y": 2500, "wires": [["08cbe2472ffaacc2"]] }, { "id": "c630667fb2e40329", "type": "switch", "z": "6edd28544c3c6e49", "name": "Current Usage:\\n 1. < 70%\\n 2. > 90%", "property": "currentusage", "propertyType": "msg", "rules": [{ "t": "lt", "v": "70", "vt": "num" }, { "t": "gt", "v": "90", "vt": "num" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 720, "y": 2720, "wires": [["dbf8cf6c7ef6718d"], ["f7ce5a417e064be7"]] }, { "id": "f7ce5a417e064be7", "type": "function", "z": "6edd28544c3c6e49", "name": "Increase Ram Allocation by <= 500,000KiB", "func": "var newAlloc;\n\nif ((msg.max - msg.current) > 500000) {\n newAlloc = msg.current + 500000;\n/*} else if (msg.max == msg.current) {\n //commented out because we might think to save the service call\n //but it's too troublesome for now.\n //So if already max, still set again with max\n*/\n} else {\n newAlloc = msg.max;\n}\n\n//also todo, to set domain name externally\n\nmsg.payload = `sudo virsh setmem --domain linux2022 --sizeHeavily considering moving to a docker and seeing how I can make up the loss of the addons/apps with HACs. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone know if the HA OS VM build supports memory ballooning as described at the below link?
https://pmhahn.github.io/virtio-balloon/
I tried to set a minimum of 1GB and a max of 2GB, but the memory footprint always appears to be 2GB as reported in Proxmox. The actual memory utilized appears to only be about 835MB, so I'd have thought it would shrink to only 1GB.
It would be fantastic if this worked, so if anyone has attempted this and can share your experience, I would greatly appreciate it!
Thanks,
David
Beta Was this translation helpful? Give feedback.
All reactions