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.

I'm running a minecraft server on windows server 2008, and I'm going to run the world on a RAM disk. However, since a RAM disk is RAM heavy, I would like to minimize or disable block caching in RAM. The read/write speed to the disk will be virtually identical to a cache, and doesn't cause me double overhead.

Is it possible to do disable caching, and if so, how?

share|improve this question
    
Just to let you know, reading/writing a piece of data from/to a hard drive can take up to 10,000 times longer than performing the same operation with RAM. I can't quite tell if this is relevant to your question, but I thought you might want to know. –  murgatroid99 Oct 28 '11 at 20:39
    
A RAM disk lets me load the entire minecraft map file (about 500mb) into RAM for near instant access. Since it's already in RAM there's no reason to cache it again for "faster" access. Both places are RAM so they're basically the same. –  Kenneth Posey Oct 28 '11 at 20:53
    
Oh I see; I didn't notice that when I first read the question. You should be fine then. –  murgatroid99 Oct 28 '11 at 23:02

1 Answer 1

up vote 1 down vote accepted

Minecraft isnt caching it in the traditional sense of the word, the data has to be stored in memory owned by minecraft at some point, in order for minecraft to do anything with the data. Even reading it!

Therefor it is not possible to totally disable 'caching'. Its also not possible for minecraft to just use the memory of the RAM disk directly, it has to go through the operating system first, which adds quite a bit of latency (nothing compared to HD access, but compared to RAM access).

So it's not useful to just disable caching, it might be possible to reduce the time until chunks that aren't near any players are unloaded with a plugin, but I have been unable to find one. One hackish way that might work is to reduce the maximum memory minecraft can use, that would force it to unload unused chunks faster.

Of course, the only wasted RAM is RAM that's not being used, so (on a dedicated machine) there is no harm in letting minecraft store something it can access very fast.

share|improve this answer
    
"... it might be possible to reduce the time until chunks that aren't near any players are unloaded with a plugin..." That's what I needed, thanks. –  Kenneth Posey Oct 28 '11 at 21:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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