# Java VM + Huge Pages



## JustMZT (Aug 30, 2012)

Hi to all! Just a few days ago have set up FreeBSD for Minecraft server. In the past i used to use Arch Linux and Debian. On FreeBSD, I have several problems:

How to set up huge pages for VM? In Arch Linux, it was /etc/sysctl.conf.  Using Google didn't help me with this problem 

Need HugePages as without them server lags, like Crysis 2 on GTX 6600 
Another problem is VM. How to set up, configure, optimize it for FreeBSD?
(Now it is so "Could not create the Java virtual machine.")

And I would be glad to hear some interesting things which will help to optimize and make Java works faster 

I really have spend 2 days for google to find some info about that. May be problem was in that i don't know English very well 

RAM: 24 GB
CPU: i7 920 4.2 GHz
DISK: SSD 64 GB

Thx!


----------



## plamaiziere (Aug 30, 2012)

JustMZT said:
			
		

> Hi to all! Just a few days ago have set up FreeBSD for Minecraft server. In the past i used to use Arch Linux and Debian. On FreeBSD, I have several problems:
> 
> How to set up huge pages for VM? In Arch Linux, it was /etc/sysctl.conf.  Using Google didn't help me with this problem





Short reply: you can't.
FreeBSD (since 7.X) has a transparent support of huge pages (called superpages). If I understand well, that merges automagically small pages into super pages. But there is no way for an application (such java) to request some superpages (may be in 10-current?).

See: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2011-10/msg00123.html

For the rest I don't know, check the java documentation (performance tuning).

Regards.


----------



## JustMZT (Aug 31, 2012)

plamaiziere said:
			
		

> Short reply: you can't.
> FreeBSD (since 7.X) has a transparent support of huge pages (called superpages). If I understand well, that merges automagically small pages into super pages. But there is no way for an application (such java) to request some superpages (may be in 10-current?).
> 
> See: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/hackers/2011-10/msg00123.html
> ...


I have special -VM option and when there are no huge pages i will get error, will see this

But what about JVM? How to make it work


----------



## JustMZT (Aug 31, 2012)

Just don't work any VM option


----------

