Memory spikes win 2022 trying to defragment a 1TB disk

alejoga81

Member
Dec 24, 2020
4
0
6
42
Hi,

I have a mv with windows 2022 in pve 7.3-3, a week ago I added a 1TB disk, but the operating system eats all the RAM, when entering the OS I identified that what is eating the memory is a process that tries to deframe the disk

1700150019503.png

I have been adding to the RAM but it always has the same behavior, This is my disk information

1700150123669.png

The storage es type ZFS

1700150239509.png

this the disk from OS

1700150323863.png

I stopped the process of optimizing the drive to free up memory

1700150462008.png

I appreciate if someone can help me and recommend a solution, I have already visited several blogs and followed best practice guides but I have not been able to solve it.
 
You should enable the „Discard“ feature (below the dropdown „Default (no cache)“ and see if it‘s getting to normal RAM consumption level. Afaik you‘ll have to shutdown the VM before activating this.
 
Hi
Thanks for your respose, I enabled the Discard, The server stabilized, but I copied about 30 GB more information and within an hour it consumed all the memory again, both in the virtual machine and in the node.
 

Attachments

  • Captura de pantalla 2023-11-18 a la(s) 7.44.17 p.m..png
    Captura de pantalla 2023-11-18 a la(s) 7.44.17 p.m..png
    752.2 KB · Views: 5
  • Captura de pantalla 2023-11-18 a la(s) 7.44.25 p.m..png
    Captura de pantalla 2023-11-18 a la(s) 7.44.25 p.m..png
    474.9 KB · Views: 5
  • Captura de pantalla 2023-11-18 a la(s) 7.46.52 p.m..png
    Captura de pantalla 2023-11-18 a la(s) 7.46.52 p.m..png
    330.4 KB · Views: 4
  • Captura de pantalla 2023-11-18 a la(s) 7.47.02 p.m..png
    Captura de pantalla 2023-11-18 a la(s) 7.47.02 p.m..png
    161.3 KB · Views: 5
There are some points which are pretty normal when running Windows VMs on ZFS:

- ZFS uses RAM for caching (ARC) (up to 50% per default)
- Windows also „eats“ all available/configured RAM as shown in the GUI, but within the VM itself the task manager should display the actual RAM consumption

From the wiki:

Limit ZFS Memory Usage​

ZFS uses 50 % of the host memory for the Adaptive Replacement Cache (ARC) by default. Allocating enough memory for the ARC is crucial for IO performance, so reduce it with caution. As a general rule of thumb, allocate at least 2 GiB Base + 1 GiB/TiB-Storage. For example, if you have a pool with 8 TiB of available storage space then you should use 10 GiB of memory for the ARC.
 
ok, but I only have a storage of 1 TB and if you notice I have the virtual machine with 20 GB, additionally in the moments that win2k22 does the disk framentation it uses 100% of the memory available in the virtual machine and also occupies the 100% of the node memory, look at the following image, the node memory is used at 100%, that is, 40 GB
Captura de pantalla 2023-11-18 a la(s) 7.44.17 p.m..png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!