Memory Usage by Mapped Files (Win7 64Bit)

3

3

When copying files from/to my external USB3 HDD memory usage in Win7 goes up to 100% and remains there. I'm not sure whether this is a problem caused by faulty drivers or not, but I already have the current version of them (Etron USB3 controller on a Gigabyte 990fxa board)..

Using RAMMap it becomes obvious that the files, that are to be copied, are mapped into memory. Clicking on

Empty > Empty System Working Set

seems to temporarily fix the problem (without causing any trouble with the file copy process), but it needs to be done every few seconds. Is there any way to schedule this operation to happen ever 10 or so seconds on its own? What underlying system command is RAMMap using? Or, alternatively, is there any way to limit how much RAM mapped files may use in Windows 7?

I know mapped files would usually be removed from memory if other programs need the memmory, but while memmory usage is at 100% the system starts freezing up for half a second or so everytime I click anything .. thus the automatic removal of unused memory contents seems to be failing here.

Dexter

Posted 2012-09-10T17:46:02.577

Reputation: 315

1Since Vista, there's an optimisation to fill unused memory with files buffers. When your application requests memory, the OS will automatically flush these buffers. It's pointless to have "free" memory when they're doing nothing but using the same amount of electricity. – billc.cn – 2012-09-10T19:05:57.093

1When the system starts freezing up its obviously way past any optimizations - and needs fixing. – Dexter – 2012-09-10T20:07:52.263

Use XCOPY with the /J switch as a workaround, but I suspect your USB drivers are faulty. – None – 2012-09-11T06:55:40.447

@RandolphWest: Is there any way to set that option in SyncToy? – Dexter – 2012-09-11T18:29:10.490

SyncToy is a front-end for Robocopy, and as far as I know, Robocopy does not support the /J feature. – None – 2012-09-11T22:20:16.040

Answers

4

I guess this is a complex issue. Part of the problem is most certainly the drivers, but the other parts are SyncToy/robocopy and Truecrypt (the USB3 drive is encrypted) - the issue does not manifest itself when just copying files with Ctrl+C/V. The RAM still fills up with the mapped file of the Truecrypt container, but the usage does not show up in the Task Manager (only in RAMMAP) and the system does not freeze up.

So MS, Etron/Gigabyte and the Truecrypt folks probably all deserve some of the blame for this..

Either way, after years of pain, I finally found a simple solution to the issue, thanks to this other Superuser thread about Windows screwing up with its filecache, leading to this discussion on the Sysinternals forum, finally leading to someone having created a tool ("SetSystemFileCacheSize") that essentially just calls the windows API to end this nightmare. (..so much for Windows working as intended @billc.cn)

Usage is fairly simple: SetSystemFileCacheSize off 2048 fixes it for me. First argument is the lower limit to cache, second argument the upper cache size limit. Depending on how much memory one has other values may make more sense for them - see the link for more details. There's also a x64 version for values beyond 4G.

Dexter

Posted 2012-09-10T17:46:02.577

Reputation: 315

1

magicandre1981

Posted 2012-09-10T17:46:02.577

Reputation: 86 560

1

There's a download link http://www.microsoft.com/downloads/details.aspx?FamilyID=e24ade0a-5efe-43c8-b9c3-5d0ecb2f39af

– Mark Sowul – 2016-11-17T15:51:26.830

@MarkSowul thx, at the time of answering the download was not available. You can edit posts and add such a new link. I did it this time. – magicandre1981 – 2016-11-17T16:13:51.033

The link is in the article, I'm just responding to Beowulf's comment that says otherwise – Mark Sowul – 2016-11-17T16:15:14.103

I tried contacting M$ for this tool and they wouldn't give it to me unless I paid up for a support case first. Any other suggestions? – BeowulfNode42 – 2013-09-03T04:45:32.093

if this is so urgent pay the support. – magicandre1981 – 2013-09-03T15:57:52.293