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?

  • 1
    If you limited it, as soon as it hit that limit, it would bog down and swap through the pagefile. Oct 27 '17 at 17:51
  • I'm ok with Excel bogging down, it's the rest of the computer and other applications having no avilable memory that is the issue.
    – screampuff
    Oct 27 '17 at 17:52
  • 2
    Swapping will bog down the whole system. Everything competes for the available I/O bandwidth. Everything competes for access to the kernel subsystem that transitions memory between free and in use. And so on. If you could memory constrain one process, you would make the whole system slow. You're almost certainly better off getting the calculations done quickly and efficiently. Oct 27 '17 at 18:18
  • 1
    Unsure what the sheets are for, but it might be that Excel is the wrong tool: maybe a database would be a better choice.
    – Yorik
    Oct 27 '17 at 18:43
  • 3
    system job object? - lowleveldesign.org/2013/11/21/… might allow you to see the behaviour and if it's worth while. Oct 27 '17 at 20:15

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 :

  • 2
    In their web page they say it modifies CPU usage. How can memory-usage be managed in them? Apr 27 at 4:56

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

procgov --maxmem 40M your_app.exe

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: https://www.sevenforums.com/tutorials/83361-priority-level-set-applications-processes.html

  • What does “using memory that isn't being used by anything else” mean?  I believe that your answer would still allow Excel to gobble up all the memory, but it would cause it to hold onto it for a longer period of (real) time.  Do you have a reason to believe otherwise? Please do not respond in comments; edit your answer to make it clearer and more complete.
    – Scott
    Mar 6 '18 at 20:59
  • Edit made. I think some RAM might get reallocated by Superfetch but the point is to make other programs run faster. I might have the wrong idea though. Mar 7 '18 at 2:53

Not the answer you're looking for? Browse other questions tagged or ask your own question.