powered by Jive Software

Integrating 64 bit Java(ver. 1.7) with Openfire

Hello, first let me say thank you for a fantastic community and forum here. I’ve been able to search around here and find answers to almost every question I’ve had so thank you very much. So here’s my issue now though, I have a Windows 2008 64 bit OS server with 8gbs of ram and a quad-core processor. However Openfire only wants to read the JRE that it installs. That version is a 32 bit version and is only 1.6.xxx. I would like to use the 64 bit version which is currently Java7 I’ve read around on here quite a bit and although there is a little information on it, most of what I’ve found is quite out-dated. I’m wondering if anyone has been able to successfully migrate to the 64 bit Java. As I mentioned I have 8gbs of ram and half of it is completely wasted as teh 32 bit runtime environment will not read past 4gbs. This is confirmed when I create a VMOPTIONS file and change the java heap memory. If I attempt to set it at say 4096mbs, which is completely fine as nothing else runs on that server, it will send an error back telling me that the Java machine can not accept these parameters or something along those lines. I even took out the jre that comes with openfire and put in the jre7 and then edited the folder names to match up with the original jre that comes with openfire but then i get an error saying my JVM is corrupt. If anyone has any ideas or suggestions I’d greatly appreciate it. Thanks again and have a great day everyone.

You should be able to modify the batch file in the openfire/bin directory to use whatever JRE you want to use. I don’t know what you have to change do to run it as a service though.

Are you trying to solve a specific problem by moving to a 64bit JRE? Openfire should not require more than 512Mb of heap to run. Obviously there are other important reasons to move to a current 1.6 JRE, however increasing the memory limits of the VM is probably not going to do much for you.

You may also want to wait on using a 1.7 JRE, as there are some SSL related issues which have not been addressed in 1.7u13 yet.

Hey thanks for your responses guys and sorry it took me so long to repsond. Here’s the long and short of it. I want to be able to have 15-20k concurrent users online. First thing I did was replace the embedded db with a MySQL one. That helped tremdendously as epected. Then I increased the java heap memeory. What I didn’t know at that time was that the more memory I allocate the less "back-end’ it has to pull from to create threads. So I ran into an issue there when i got to about 2500 online. I did some more reading and searching and I came across a fantastic explanation of what was going on here: http://java-monitor.com/forum/showthread.php?t=570. I had tried to set it at 4096mbs assuming that with 8gbs of ram that shouldn’t be a problem. Well it wouldn’t even accept it as a valid parameter, then when I bumped it back to 3072mbs it told me I didn’t have enough memory. That didn’t make any sense either so I lowered it to 1500mbs and that’s when i got the 2500 online. After reading that thread I realized I had allocated too much memory and bumped it back to 768mbs which did great. I was able to get almost 9,000 accounts online, but when I go past that I get "OutOfMemoryError: No more direct buffers available; trying heap buffer instead

". After some more reading and searching I was thinking that if I could use a 64bit JRE instead of the 32bit it would read all 8gbs of memory. I would be able to increase the java heap and still have plenty of memory for threads on the back-end. I’m still learning and have been doing a lot of searching and stuff so forgive me if I’m mistaken on anything and please feel free to correct me. I’ve also increase the roster cache for the contacts because it was refreshing it like 10x per second with the measly 0.25mbs that was allocated. Thanks again for all your help, not just in this thread but all over. I’ve found a wealth of information that’s allowed me to get this far from basically scratch and I’m truly thankful for that. Have a great day everyone.

1 Like

Hi Jason,

Did you got success in integrating 64 bit java with openfire??

My openfire takes lots of memory , when 1100 users online it takes almost 1.5GB Java memory,

If you got any tweak please share, it would help me to fine tune my openfire server… I expect almost 8000 users online and i suspect it will lead to out of memory???

If anyone around with solution please share…

Thank you