From 0e4c020d0f44bbd9b1c937e965c22e0d0a58008c Mon Sep 17 00:00:00 2001 From: "M. Rehan" Date: Thu, 27 Jun 2024 20:57:46 +0500 Subject: [PATCH] Always include zfs cache as a free memory in vm memory info --- src/middlewared/middlewared/plugins/vm/vm_memory_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewared/middlewared/plugins/vm/vm_memory_info.py b/src/middlewared/middlewared/plugins/vm/vm_memory_info.py index 6819626143e30..2e94d63606295 100644 --- a/src/middlewared/middlewared/plugins/vm/vm_memory_info.py +++ b/src/middlewared/middlewared/plugins/vm/vm_memory_info.py @@ -64,7 +64,7 @@ async def get_available_memory(self, overcommit): arc_total = await self.middleware.call('sysctl.get_arcstats_size') arc_min = await self.middleware.call('sysctl.get_arc_min') arc_shrink = max(0, arc_total - arc_min) - total_free = free + arc_shrink if overcommit else free + total_free = free + arc_shrink vms_memory_used = 0 if overcommit is False: