From what I have seen the Sun JVM usually defaults to client mode. This can be verified by typing “java -vesrion” in a terminal window. It is better to to run Jive Messenger using the server mode. You can do this by editing the messenger.sh and adding the server argument as below. When you run in server mode you automatically get more memory allocated to the JVM, I think 512Mb might be adequate depending on your requirements, in any case I don’'t think you can really have less. You can add the memory arguments below and see how you get on.
could you give more details on how to run java in server mode? I’'m running Jive with jive-messengerd daemon at bootup. Do i have to edit messenger.sh? Maybe only /bin/messenger ? Or maybe there is an option to turn server mode in java? We are using this machine only for Jive, so Java could run in server mode all the time.
Seems like your default is client mode. On my solaris box the default is server mode as below, which happened at install time, I have seen other solaris installations where the default is client mode. The only way I know how to run in server mode is to add the -server switch.
bash-2.05# java -version
java version “1.5.0_01”
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot™ Server VM (build 1.5.0_01-b08, mixed mode)
You can verify the client and server versions as follows.
bash-2.05# java -client -version
java version “1.5.0_01”
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot™ Client VM (build 1.5.0_01-b08, mixed mode, sharing)
bash-2.05# java -server -version
java version “1.5.0_01”
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot™ Server VM (build 1.5.0_01-b08, mixed mode)
If you are running on windows the default is certainly client mode.
well, there is -server parameter in messenger script
already, w/o min/max params. Hm… this what i get
with “java -server”:
java version “1.5.0_01”
Java™ 2 Runtime Environment, Standard Edition
(build 1.5.0_01-b08)
Java HotSpot™ Client VM (build 1.5.0_01-b08, mixed
mode, sharing)
so it runs in client or what mode?
This probably means that you don’'t have the Hotspot server VM installed. Be sure to download the full JDK from java.sun.com. If you install that, you should have the server VM (and on Linux, the default should be the server VM).
i’‘m using Archlinux. And i have installed only j2re package. there is also j2sdk package. But i thought it’'s only for developers. So i have to install this package too?
hey matt,i used linux RH7.2,the default was the client VM.i necessary add ‘’-server’’ to messenger.sh that it can run in server VM.
another question want to discuss,When jive run in server mode ,default java memory is 64M,i am not add "-Xms248M -Xmx450M " to mesenger.sh,whether server can automatically increase more memory allocated to JVM.
RedHat 7.2 is very old, and we’'d definitely recommend upgrading to at least Red Hat 9 (but preferably something even newer).
another question want to discuss,When jive run in
server mode ,default java memory is 64M,i am not add
"-Xms248M -Xmx450M " to mesenger.sh,whether server
can automatically increase more memory allocated to
JVM.
The server VM will automatically use more memory if it thinks it can. For example, on a machine with 2GB of RAM it will use 512 MB for the heap. Maybe you don’'t have a lot of RAM in your server?
thanks matt ,my machine RAM is 512M , there is have a lot of application on it,it maybe not free memory to JAVA VM.
i try it in RH9 (Shrike),Java VM can’‘t automatic to adopt server VM,i think a part of linux can’‘t automatic find java server VM.i have seen it have “-server” option in messenger.bat,so i suggest to add ‘’-server’’ option to messenger.sh
so, as i’'m going to upgrade JM to 2.2.1 and java to 1.5.0_04 today, and the Server Vm was mentioned in “CPU load” thread, i have remembered this topic. So waht do i have to install to be able to run it in Server Mode?
j2sdk?
And do i have to turn it on somehow or it would switch to Serve mode automaticly upon restart?
but don’‘t understand nothing. i want to increase my java memory too, but don’‘t know how. now, it’'s 64MB, i want at least 100. how do i do that? i have JDK installed too, do i need to run it to make server? how does this work? now, as you can see, is client…
root@sepsrv123:~# java -version
java version “1.5.0_04”
Java™ 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot™ Client VM (build 1.5.0_04-b05, mixed mode, sharing)