473,396 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

-server and -client; what do those flags do?

11,448 Expert 8TB
I run my Java programs on a small Linux laptop and today I installed it again on
a MS Vista laptop.My linux laptop ran quite a bit faster than my Vista laptop and
I decided to find out why.

After a bit of digging I found out that the 'server' hotspot comes with the Linux
JRE distribution but it isn't there in the MS Windows distribution; it comes with
the JDK though.

This is what I'm talking about: go to your JAVA_HOME location; that location
typically is c:\Program Files\Java. Look in the jreXXX\bin directory where XXX is
the version of your JRE. You'll find two subdirectories there: client and new_plugin.

On a Linux distribution you'll find another subdirectory there: server. If you go to
the JAVA_HOME\jdkXXX\jre\bin directory (XXX is the version of your JDK) you
do find a 'server' subdirectory. That is the one I was looking for.

Copy that entire subdirectory to your JAVA_HOME\jreXXX\bin directory so that
you end up with three subdirectories there: new_plugin, client and server.

Now you can use the -server flag for your java.exe or javaw.exe tools. What does
it do? It starts up the 'server' version of your JVM which basically means a better
hotspot mechanism (Sun calls it a more 'aggressive' mechanism) and another
optimizing JIT compiler (Just In Time compiler). So what?

That 'server hotspot' thing results in the following timing results for a few tests I
ran: client: 201s versus server: 95s; that means the server version is twice as
fast as the client version or even a bit faster.

On the other hand, the server version starts my application a bit slower and it is
a real cpu hog; i.e. other applications are a bit less responsive and my task
manager showed that both of my cores were really busy. I don't care, I want speed.

So if you want speed as well: copy that 'server' subdirectory from the JDK to
your JRE (see above) and use that -server flag when you start your JVM.

On my Linux distribution the -server option seems to be the default; I'm not sure
though; I'll experiment a bit more. The -server option doesn't buy you much when
you have to run small applications or applications that are highly interactive. The
cpu is just waiting for the user to click something and both versions are very
good at waiting for something ;-)

Concluding: now both of my Java installations on both my Linux and MS Vista
laptops run at comparable speed.

kind regards,

Jos
Jul 27 '08 #1
2 1789
r035198x
13,262 8TB
I wouldn't mind this being moved to the howTos.
Jul 28 '08 #2
JosAH
11,448 Expert 8TB
I wouldn't mind this being moved to the howTos.
Give me some time to rewrite it into something proper and complete.

kind regards,

Jos

ps. That server version also considerably speeds up my rpl stuff on Vista ;-)
Jul 28 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ian maclure | last post by:
I'm writing a client-server app. Client controls Server which in turn configures and controls a bunch of hardware. I want to be able to start the server from my client. Now in C/C++ one could...
0
by: Hüseyin DEMİRAĞ | last post by:
Hi all, I think that I should ask the question like that. I want to run MySQL on 14 client. What am I do. I try but There is a problem that i can't find... Please help me. Hüseyin DEMİRAĞ...
3
by: MBW | last post by:
The following code is for a simple server/client asplication that allows the user to toggle between serve and or client modes and send/recieve a message however i am getting an Attribute error on...
2
by: Prabhat | last post by:
Hi All, How can we fine if the SQL Server Client is Installed in the System or Not. (Using VB and/or Delphi) As My EXE Require SQL Server Client to Work so I have to Check that If the Client...
0
by: mandrivacsprof2030 | last post by:
Hi there. I have a problem in socket programming. I'm writing a server/client application in C#. When client connects to the server, a text-based communication between server and client. When...
0
by: 85ssp | last post by:
I am creating a small server client program that is meant for up to 70 connections from 70 different computers on a network. Everything in the program functions correctly except when testing...
1
by: vijayakumar | last post by:
hi all I'm beginner in CORBA Server-Client application development. My server- client application was worked well and i have tested it too. Due to some Network problem we have rebooted our...
3
by: Hukkky | last post by:
I'm testing simple server/client codes on linux. just server can wait for client's connect sign and accept, and client can't connect to server, this is all. There's no problems just for this...
2
by: fredszky | last post by:
Hello I am very new to perl, however i managed to make this server/client work with udp, now i would like to do the same thing but with TCP/IP, what must i do? Server: #!perl -w # Server...
3
by: supriya prasad | last post by:
I am trying to set up a server client network .Server will be able to stream live audio captured from a radio receiver connected to its line in port to multiple clients over the network. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.