I read your updates, you put actual technical knowledge to my fevered reading of kernel documentation and gut feelings. ![]()
Thanks so much for your effort on this. Those of us that run big VMs greatly appreciate your time. ![]()
I read your updates, you put actual technical knowledge to my fevered reading of kernel documentation and gut feelings. ![]()
Thanks so much for your effort on this. Those of us that run big VMs greatly appreciate your time. ![]()
Fixes merged with upstream so my bug ticket was closed. Yay. Great find and fix by mav!
I got the fix in 25.04.1 and it seems to have resolved the issue. I tested with a regular swap device, a zram swap device, a swap device with zswap, and finally with a no swap at all (call that OEM). All behaved much more civilly when my sudden memory pressure was applied (3 scrub tasks simultaneously after ARC had enough runtime to fill the RAM). All configurations did not OOM, and ARC responded to the memory pressure by dumping a lot of its contents (expected behavior). Even when swap space was available there was only very minimal usage of it, like couple MB.
Something that confuses me still is that VM memory is still showing as cached memory for some reason. Linux defines caches memory as “In-memory cache for files read from the disk” which anon-pages of VM RAM are definitely not. This was probably the root cause of this problem, not sure if it’s an Incus issue or what, haven’t had time to test it yet.
Lastly, since I figured out how to tip toe around this memory issue on 25.04.0 and keep my VMs up for normal 24/7 uptime, I’ve noticed a minor issue. After about a week of uptime, I start seeing a lot of TLB interrupts and activity from kcompactd. This could just be a side effect of the workload I’m running, so I’m wondering if anyone else is seeing similar behavior.
VM memory is allocated as shared, so it is a bit special, that confused ZFS and may still confuse the reporting.
Interesting, I’ve been on a linux memory management learning adventure for the last 2 months because of the issues I had. I’ll start digging into shared memory.
The tidbit about Incus VM RAM being listed as shared memory does give me incite into the TLB issue I’m seeing. There are no shared memory THPs in RAM on my system. One of my VMs reports it has 16GB of THPs. Are those 2MB entries in the VM being translated to 512 4k pages at the hardware level and basically nuking the TLB on the processor?
Thank you so much for posting back in this original thread and keeping it alive for those that find this later ![]()
Please mark that post as solved so others can see the fix if you don’t mind @gedavids
It was a long and meandering road, with a lot of red herrings. I’m not sure how useful this thread will end up being. ![]()
I’ve marked this as solved. If your VMs are crashing due to OOM errors when you definitely have enough memory, make sure you try 25.04.1 at least.
As a LOTR fan…The journey is sometimes the most valuable part of the solution.
“You mean to tell me that the real treasure is the friends we made along the way?”