Is it possible to limit the memory usage of a particular process on Windows

A user is doing calculations in Excel on very large sheets (upwards of 500mb) even with 16GB of ram, Excel (64-bit) will eat up all existing memory,I have seen it use upwards of 11GB of system memory.

Is there a way to say limit it somewhere reasonable at like 8GB so the system isn't bogged down and swapping through the pagefile to open a new tab in Chrome?

6

3 Answers

I understand here the question is to find a way to limit the memory used by a process, no matter the impact of performance.

On Windows Server, you could do this using a tool called the Windows System Resource Manager which can limit the amount of working set that a process uses. This tool is installable (not installed by default) through the Add Features console on Windows Server 2008 R2.

On Windows 7/8/10 there is no Microsoft solution able to do this. You have to install a third party software like the following :

  • Process Tamer :

  • Process Lasso :

1

Process Governor worked great for me. Open source, MIT License, easy to use:

procgov --maxmem 40M your_app.exe
3

If the problem is that you're having trouble doing other things on the computer at the same time, you might want to try reducing Excel's CPU priority. So if you run something else, Excel will be forced to stop and wait since your program has a higher priority. It will take longer to finish, but you should be able to do other things at the same time.

Instructions for Windows 7:

  1. Open the Task Manager (Ctrl+Alt+Del)
  2. Open the Processes tab. Right-click on excel.exe and go to Set Priority.
  3. Choose a new priority. Most processes run at Normal, so you can use either Below Normal or Low.

This is temporary, so you'll have to do it again if you quit Excel.

Source:

2

You Might Also Like