Disabling filecaching during copy of large files on Windows 2012, Windows 2012R2

backupfileswindows-server-2012

I've huge problems with backup of Hyper-V on handful of HOSTS. During backup done by the software some machines become unavailable, host starts dying etc. We tracked this to not the software itself but file copying. Just doing file copy from drive D to C of size 30GB will kill off the HOST during file transfer. The ram usage before file copy is 48gb used out of 64GB. When you start the transfer of 30GB file the usage of ram changes and in 1 minute it's 64 out of 64 server starts crawling and even RDP, physical access stops working until the file copying is done. So during backup it can take hours for the servers to be avaialble.

This is a DELL Server R515 with RAID controller in mode Write-back. I've noticed this on other Windows 2012 servers. I tried using some old solutions to disable cache from 2003 but none are working. I've tested it on both IBM and Dell servers and behaviour was very similar. Ram usage going up. First it's starts with 700MB/s speed copy and then after ram is used it's going slowly. So the question is how to disable file caching or limit it to normal values.

Please don't give suggestions to use robocopy, or other "copying" tools because while it may solve the problem with copying by using external software my problem is actually about backups taken by 3rd party software which i have no influence on. I would like "Explorer" to behave normally 🙂

Best Answer

Run this as administrator at the command line:

fsutil behavior set memoryusage 0 

You can set three values to this entry: 0 for not set, 1 for default, and 2 for increased.