# Memory tweaking for Minecraft?



## Monti (Aug 13, 2015)

Hello,

I would like to have my son learning BSD instead of other distributions out there, so I have installed FreeBSD with MATE.

In addition to this I am trying to set up a working Minecraft configuration. The problem is that the configuration is not handling the large worlds well. Meaning it is lagging so much that it is not playable. I first thought it had something to do with graphics rendering, but when joining servers with mini game play rooms it is running quite well. So my conclusion is that it has something to do with memory handling. Just for the record, it was working well on the same machine when GNU/Linux was installed, so I am thinking that maybe there is a way of tweaking how the game is using the RAM?

Tech info is:


```
FreeBSD 10.1-RELEASE-p16

minecraft-client-1.7.9_3
openjdk8-jre-8.51.16
lwjgl-2.9.1
```


Thanks


----------



## SirDice (Aug 14, 2015)

No idea about Minecraft but looking at it it seems to use Java? If that's the case there's usually a start script that launches the application. Look for `java -Xmx512m {...}` or something similar. The -Xmx option tells Java how much memory it can use. Try increasing that number.


----------



## ShelLuser (Aug 14, 2015)

About Minecraft: Make sure that the right Java version is installed, try using: `# pkg info -x java` and see what that tells you. Be sure you're using OpenJDK8 instead of 7, that can also be a source for problems. If you do need to upgrade OpenJDK then I'd recommend using ports-mgmt/portmaster for that.

Any specific optimization is usually done in the launcher. Edit your profile (see the option in the lower left corner). The last option in the now displayed screen allows you to set specific Java parameters, including the amount of memory which is allowed to use.


----------



## Monti (Oct 25, 2015)

So sorry guys for my late reply. Got distracted by a rather grave incident at my kids school where we ended up changing school. So no ungratefulness intended.

Thanks a lot for your replies SirDice and ShelLuser. I appreciate it.

Regarding memory tweaking it seems clear that it was not the issue. After doing both a system files and `pkg upgrade` things are running very smooth, also considering the machine has become somewhat old now. I did not do any thorough analysis of files being updated, so I am not sure what made the difference. I know though that java/openjdk8 is now version 8.60.24, so it might be the "trick" that made the difference. For the record no java Xmx tweaking.

Thanks


----------

