Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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.

share|improve this question
6  
This question appears to be off-topic because it is about how Java's memory management algorithms and Windows's page caching algorithms interact, which is not specific to Minecraft or gaming. –  SevenSidedDie Jul 25 '13 at 21:12
1  
@SevenSidedDie +1 to the question because it deals with server handling and might be viewed or edited as a way to optimize a server/minecraft client, but I could be wrong. –  iananananan Jul 25 '13 at 21:31
1  
@ian There's lots of stuff relevant to gamers that is off topic here. In this case, we are not experts about memory management, so memory management questions are off topic. Superuser may be the place to ask this. –  SevenSidedDie Jul 25 '13 at 22:54
    
I think this should be put on hold, then referred to the meta to get more attention. –  Paralytic Jul 25 '13 at 23:28
    
I'll ask my question on Superuser then. –  Timtech Jul 25 '13 at 23:32
add comment

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.
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 4 down vote accepted

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 -Xms 512 (minimum 512mb) and -Xmx 1024 (Max 1gb). (Double clicking the icon uses the default values). What this means is that even if there's no chunks loaded and no one logged in, Java will reserve 512mb of RAM for Minecraft. It also means that if it reaches 1Gb of usage, you'll start experiencing lag and other slowdown effects as Java shuffles memory around.

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.

share|improve this answer
    
That makes sense! Thank you for defining file cache and RAM allocation for me. –  Timtech Jul 25 '13 at 23:30
add comment

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