How much unused RAM allocated to a Minecraft client or server is cached? If any program is not using all of the RAM allocated to it, that RAM becomes cached and can be used by other programs until the original program needs to use it. My question is just how much RAM is cached by Minecraft clients and servers when not in use. All of it? A fixed percentage? A percentage based on the amount of free RAM not used by any other programs? I tried to obtain the answer from the Minecraft Wiki but I was not able to. Thank you for any help you can supply me.
closed as off-topic by SevenSidedDie, Jeffrey Lin, Frank, Paralytic, Schism Jul 25 '13 at 23:53
- This question does not appear to be about videogames or videogame consoles within the scope defined in the help center.
Not that I'm an expert in such things, but it sounds like you're conflating Windows memory caching and Java's memory management.
A program used frequently ends up getting pre-loaded into RAM by newer Windows systems. If it is needed elsewhere it is overwritten - that's pre-loading or 'caching'.
Java has what's called a "garbage collector" which cleans up unused memory every now and then whilst your program is running. Its not really important to know how it works as its more of a concern for developers - but suffice it to say its the thing that actually frees unused memory.
When running Minecraft from a command line, you set Java's min/Max allowable RAM usage with the parameters
So in summary, if you run Minecraft often, Windows will preload/cache the files used by it into RAM. Depending on your minimum RAM setting, Java will reserve that much memory for Minecraft.