Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / March 2006

Tip: Looking for answers? Try searching our database.

64bit JVM - some help appreciated

Thread view: 
fuzzybr80 - 17 Feb 2006 10:43 GMT
I am drawing up the specifications for a machine to deploy a
potentially mem-grabbing application (might be up to the order of
several GB when doing batch processings), and am considering to go for
a 64bit JVM to circumvent the 2GB limit on linux.

I would really appreciate some answers to :
+ What is the JVM max memory limit for a 64bit JVM?
+ What is the practical limit that people are facing? (What's a
reasonable point beyond which java gc takes forever, or just too long)

I am deciding between Intel Xeon and AMD Opteron based servers. Does
anyone have comments on which is better?

Thanks.
Roedy Green - 18 Feb 2006 02:20 GMT
>+ What is the JVM max memory limit for a 64bit JVM?

You have to look at some real world possibilities:

Let's for example look at a Niagara server from Sun with Solaris

64 bit virtual ram should hold you for a few years.
+9,223,372,036,854,775,807 [263-1] aka Long.MAX_VALUE    or 9 exabytes,
or 9 billion gig

or double that if they let you use the sign bit.

Let's look at Sun Ultra-20 Opteron
http://www.sun.com/desktop/workstation/ultra20/specifications.jsp
but only 4GIG of real memory.

the ultra 40 goes to 16 gig of real ram.  

If you have a bigger budget, the SunFire 2000 supports 32GIGs or real
RAM.

http://www.sun.com/servers/coolthreads/t2000/features.jsp#Memory

Keep in mind that user processes just as the JVM only know about
virtual memory.  They are not limited to address spaces fitting in
real ram, though of course they run more slowly when they have to page
to disk.

For your other question, is there some VM  limit that JVMs/OSes
typically arbitrarily impose, you will have to ask the man who own
one.

There is the question, is the fully VM address space supported on real
chips or are some of the hardware for the high end bits missing? For
that you could read the chip specs or read up on how the VM->real
address translation works.

I would be highly surprised if a reputable company offered a 64-bit
design where the max USR VM was less than real RAM.

Early in the life an architecture availably of REAL ram is the major
concern. Late in its life, it is virtual ram. We are in the early
stages.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

fuzzybr80 - 18 Feb 2006 17:25 GMT
Hi,

Thanks for the answer - I knew 64bit JVM/addressing allows a
theoratical limit of a lot of mem.

But im looking for specific answers to:
(a) Deploying on 64-bit linux server (probably Fedora Core 4) - is
there a OS or implementation imposed max mem limit to the amount that I
can allocate to the JVM (as a process) in this case?

(b) Assuming that I am getting enough real RAM for the VM address space
that I will specify for the JVM, is there an "optimal" limit above
which performance decreases drastically due to garbage collection or
other things. I'm not looking for a crazy limit like several hundred GB
but if someone tells me like 8-12GB is the most you can go before gc
starts slowing down the application then it will affect how much RAM I
intend to get.

(c) Any other tips or "watch-out for"s that other experienced folks can
give for setting up such a deployment.

Thanks :)
Roedy Green - 19 Feb 2006 02:15 GMT
> Assuming that I am getting enough real RAM for the VM address space
>that I will specify for the JVM, is there an "optimal" limit above
>which performance decreases drastically due to garbage collection or
>other things.
yes. The optimal VM size can found by experiment. Generally it won't
be much larger than twice as big as real RAM.

If you allocate to much VM then you  inhibit GC and you have objects
scattered  over pages of paged out VM, mostly deadwood. In the worst
case one 1 byte object per 4096 byte page frame.

If you have a lot of inert objects you rarely reference, then a bigger
VM is a good idea.  If your objects have a very short lifetime then a
smaller VM will work better.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 19 Feb 2006 02:24 GMT
On Sun, 19 Feb 2006 02:15:46 GMT, Roedy Green
<my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or
indirectly quoted someone who said :

> yes. The optimal VM size can found by experiment. Generally it won't
>be much larger than twice as big as real RAM.

see http://mindprod.com/jgloss/tweakable.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Chris Uppal - 19 Feb 2006 16:23 GMT
>  yes. The optimal VM size can found by experiment. Generally it won't
> be much larger than twice as big as real RAM.

I would be extremely wary of running any GCed language/implementation
with settings that lead the VM to think it can use more memory space
(including "spare" space for GC overhead) than will fit in actual
physical RAM.

   -- chris
fuzzybr80 - 19 Feb 2006 17:08 GMT
er, im not following the discussion here, and I am not seeking to
assign more mem than available real RAM to the VM. I just want to know
whether there is a hard limit on the amount of mem assignable to JVM on
a 64 bit server (Fedora Core 4), due to any OS or implementation
imposed constraint, other than the amount of mem 64 bits can address.

Thanks :)
Alun Harford - 20 Feb 2006 18:20 GMT
> Hi,
>
[quoted text clipped - 13 lines]
> starts slowing down the application then it will affect how much RAM I
> intend to get.

Sun basically makes Java so that it can market its expensive machines (which
'happen' run Java well, because of the design of the Java specifications -
shouldn't be a suprise!)
Sun currently makes machines that take half a terabyte of RAM, and will
probably spend most of their time running Java. I'll guess they went to the
effort of getting the garbage collection to work with decent amounts of RAM.

Alun Harford
Cos - 20 Feb 2006 19:37 GMT
> Sun basically makes Java so that it can market its expensive machines (which
> 'happen' run Java well, because of the design of the Java specifications -
> shouldn't be a suprise!)

It's b..hit. Sun's Java works as good on x86 arch as on Sparc. The
reason of making so RAM capable computers is to keep with the market
trends: servers are needed that much to do whatever modern business
applications require...
Roedy Green - 21 Feb 2006 09:08 GMT
>It's b..hit. Sun's Java works as good on x86 arch as on Sparc
The big difference in optimising software is thinking whether the
underlying hardware is  32 or 64 bit.  Sun's code naturally gives an
extra edge to the more expensive 64-bit, which is handicapped to start
with by  the extra bytes used both in storing and fetching.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Roedy Green - 21 Feb 2006 09:04 GMT
On Mon, 20 Feb 2006 18:20:18 -0000, "Alun Harford"
<usenet@alunharford.co.uk> wrote, quoted or indirectly quoted someone
who said :

>Sun basically makes Java so that it can market its expensive machines (which
>'happen' run Java well, because of the design of the Java specifications -
>shouldn't be a suprise!

For example, have a look at how signum is implemented.  See the
alternatives and benchmark at http://mindprod.com/gloss/benchmark.html

One alternative algorithm beat it by a factor of 20. However, the
algorithm they use should work best on a Sun workstation.  That does
not even require any sort of conscious policy. I happens as a side
effect of Java's developers using and optimising on Sun hardware.

Sun's executives logically should not work that hard to figure out a
way to fine tune the implementations on each platform where you don't
resort to native classes.  That edge is about all the incentive Sun
gets for producing Java free.

That edge may also explain the reason the JNI interface overhead is so
high. I discourages people from using native code for micro
privatisation of short functions like signum.

It would be nice to win one of those 64 bit machines Sun is offering
to find bugs in 1.6, then these "wrong" algorithms would be somebody
else's concern..

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Bozo Bits - 21 Feb 2006 19:33 GMT
Not clear if there is a process limit in the 64 bit Linux that is
imposed but if the choice is going to be 64 bit OS, go with Solaris. It
is more mature and generally is more stable. Our experience has been
that 64 bit linux is very good and have used VM's with 12+gigs but when
uptime, stable and fair threading and just overall stability at scale
is critical then Solaris is a better choice. At around 8 gig on both
Solaris and Linux the GC became an issue in regards to performance and
even significant tuning didn't change this for our applications.

But if the application you are building uses lots of IO then getting
extra ram for OS file buffering will have a large impact on overall
performance. This provides a second level cache that will reduce IO
wait and can be a huge difference if the application is likely to be IO
bound.

Expect to spend lots of time tuning the GC and perm space parameters.
Jason S. Armstrong - 28 Feb 2006 03:45 GMT
> Not clear if there is a process limit in the 64 bit Linux that is
> imposed but if the choice is going to be 64 bit OS, go with Solaris. It
[quoted text clipped - 12 lines]
>
> Expect to spend lots of time tuning the GC and perm space parameters.

GC is definitely a problem when in heaps > 8gb.  There are a couple of
bugs in the CMS collector which are being fixed as part 1.5.0_07 and
1.5.0_08.  I've worked with 28g heaps on 64-bit Windows servers and
looked a little bit at it on Linux.  GC tuning is essential.

Have a look at:
http://forum.java.sun.com/thread.jspa?threadID=684017&tstart=15

There are some Solaris only settings that can help performance as well
if you have the choice of going with Solaris.

Of course, there are some obligatory questions that should be asked:

1.) Why does your app need so much memory?
2.) Is this a real-time app or a batch processing app (if it's batch
processing, super fast GC's may not be as essential)
fuzzybr80 - 03 Mar 2006 07:00 GMT
Thanks for the comments/answers.

> > Expect to spend lots of time tuning the GC and perm space parameters.
I am googling for these things and turning up lots of resources re: GC
and space tuning, tho I appreciate if someone could point me to a
definitive guide (I'm using JDK 1.5) they found useful.

> Of course, there are some obligatory questions that should be asked:
> 1.) Why does your app need so much memory?
> 2.) Is this a real-time app or a batch processing app (if it's batch
> processing, super fast GC's may not be as essential)

Our app serves searches on a Lucene index that might hit several GB
size range. We plan to buffer the whole index in RAM (if we get the
hardware to throw at it), that would drastically speed things up. I
guess this would mean all of it is in perm-space in the long run, so GC
might not be an issue with correct tuning. Its a intranet web
application, probably qualifies as real-time.
Cos - 03 Mar 2006 18:09 GMT
Hey.

Check Sun's GC tuning guide at
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

Hope it will help
 Cos


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.