How to limit visible amount of physical RAM to an application?

Nicholas Steel 336 Reputation points

Is there a way to limit how much physical RAM a specific program will be able to utilize? Like limit how much it can see as available without impacting the ability to use Swap/Paging File and without impacting how much RAM other software can see & use.

For software running in Windows.

Anno 1800 likes to use around 24GB's of memory and will aggressively use all available physical RAM, resulting in any newly created task or operation that triggers an increase in RAM consumption, to page data in and out of RAM which is sloooow and manifests as system wide stutter and lag.

I'd like to limit the game to seeing only 15~GB's of my 16GB's of RAM and leave 1GB free for background tasks and multi-tasking (like how modern video game consoles have a portion of RAM dedicated to the O/S and background tasks).

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,113 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Laude 85,716 Reputation points

    Hi @Nicholas Steel ,

    As far as I know there is no Microsoft solution for this, you will have to find third-party software that may be able to do this.

    Here's also a similar thread which may be of interest to you:
    Is it possible to limit the memory usage of a particular process on Windows


    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Limitless Technology 39,506 Reputation points


    You could use something like Windows System Resource Manager which has similar features to ulimit (ulimit -v, it's a shell and it should do what you want((ulimit -v 400; myprogram) to limit the scope)) in that you can set CPU or memory limits on a process, user or session.

    More information is available on Technet(2008 R2 specific) or here is the Wiki article.

    Windows system resource manager is the tool to set cpu limits per process, and adds process accounting interfaces. In 2008 its a feature to be enabled. There is an API that lets you set disk IO priority explicitly but I am unaware of any utility to let you directly change just disk priority.

    I hope this will help you!