How can I check how much ram it will use under a state where it's starving and to check that should I temporarily disable memory compression?
Windows 10/11 will automatically generate a notification whenever there is 10% or less available RAM remaining. It might even be 20%. I cannot recall the value (% of memory remaining) that triggers the notification.
To truly know what memory is being consumed you need to start by knowing what your actual available system memory is in kilobytes:
# Value of system available RAM in kilobytes
(get-wmiobject -class "Win32_ComputerSystem").TotalPhysicalMemory
With that value you can confirm that it matches the value that Windows Task Manager reports for Memory on the Performance tab by converting it to GB:
Instant free online tool for byte to gigabyte conversion or vice versa. The byte [B] to gigabyte [GB] conversion table and conversion steps are also listed. Also, explore tools to convert byte or gigabyte to other data storage units or learn more about data storage conversions.
www.unitconverters.net
After you have established that value then you can study your memory consumption through any of multiple ways (a graphical representation of memory utilized is informative enough - in most cases):
1. Using PowerShell
For example,
I am trying to get PowerShell to give me the RAM and CPU usage, but I can't figure out what WMI class to use. My computer has two processors, so it would be useful to have the information for both of
stackoverflow.com
I'm trying to get the physical memory size using PowerShell, but without using get-wmiobject. I have been using the following PS cmdlet to get the physical memory size, but the value changes with ...
stackoverflow.com
2. Using any of the widely-used system monitoring utilities
- Process Hacker
- Process Explorer
- System Explorer
- System Informer
- Windows Task Manager
- Windows Performance Monitor