JVM & memory
I did some research and i found that the Sun JVM seems to be limited to about 1.5GB under Windows, 2GB under Solaris x86 and Linux, and 4GB under Solaris SPARC.
Is this correct? If no, what are the correct numbers? If so, i need for my application a lot of memory, so i'm looking for something that supports more RAM.
I heard that i have to take a 64-bit JVM or that Sun did some tests with the 1.5 JDK with 500 GB of RAM. Is this correct?
Any suggestion more than welcome.
Thanks
From my experience, your numbers are pretty accurate,
by HW+OS+JVM combinations needs to be precise.
Solaris/SPARC/HotSpot (1.4 or 1.5) is probably your
safest choice for running 64-bit VMs (but not the only
one).
This can be interesting to read:
http://blogs.sun.com/roller/page/moazam/20040719
-AlexisI'm looking specifically to numbers for the JDK1.5 on as much as possible combinations of HW + OS. I assume Sun did some testings about this. But where can you find these results?
Similar Messages
-
Hello, I am writing a program that requires me to read large files into memory. Since the JVM has a heap limitation, I am setting the max memory with the -Xmx"number"m command line command. I then create an exe wuing JBuilder. For some reason, I can't make an exe that is calls for more than 1475m. Does anyone know of a way to remove the JVM memory limitation all together? BTW, I can set any memory parameter I want to and run it in jbuilder so long as it is in my machine's limitations. It is only when i create an EXE that it gets theis limitation.
It is only when i create an EXE that it gets theis limitation.Then I guess you shouldn't create an EXE.
You might consider redesigning your application to use less memory. -
Optimization of the JVM memory - Garbage Collector
Hi ,
Just a question about JVM memory management.
There is memory limitation of memory usage limitation (1.6M) in JVM.
Is there any possibility to use "Garbage collector" mechanism to optimize the memory usage?
Or any suggestions for the JVM memory optimization?
Thanks a lot!!!nicolasmichael wrote:
Hi,
the "memory limitation" does not have anything to do with garbage collection, but with the address space your operating system provides. On a 32bit operating system, your virtual address space is limited to <= 4 GB, depending on your operating system (for example 1.something GB on Windows and 3.something GB on Solaris). No.
Windows 32 bit has a 2 GB application space and can be configured to allow a 3GB space.
The Sun VM does not allow more because of the way that the executable is linked.
[http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4358809] -
Hi,
My java application (with jdk1.5.0_03) shoots upto 169 MB of Process size (seen in Task manager)
and the heap size when printed (Runtime.totalMemory()-Runtime.freeMemory())
shows as 68 MB. I assume that the process size is the total JVM memory.
I would like to know exact breakup of JVM memory; is it possible to find out the individual parameters that contribute to the total process memory.
Thanks
SrilaHi,
I have a similar kind of problem.
We have a web-application running on jdk1.5 and tomcat 5. I want that my application should not take more than 48 MB memory on to my machine. I used the -Xmx48m option, but it just controls the heap memory. But what about the non-heap memory? Here are few things I have noticed
-> when I use JConsole to monitor the application, I found that my applications non-heap memory Max is set to 96M.
-> Another thing I have noticed that when I use "top" command to monitor memory footprint of my application, the RSS (which shows the PHYSICAL MEMORY USED ) shows an alarming 125MB of usage ( Sometimes when i use -server option it used to go upto 250M ) , which may harm my other applications which are memory prone. Even when the GC runs java do not free any memory for other application.
-> I have tried many options like
-XX:+UseConcMarkSweepGC
-XX:NewSize=8m -XX:MaxNewSize=8m -XX:SurvivorRatio=2 -Xms48m -Xmx48m -Xss64k
-XX:MaxHeapFreeRatio=20 -XX:MinHeapFreeRatio=10 -XX:NewSize=32m -XX:SurvivorRatio=32 -Xss256k -Xms48m -Xmx48m
-XX:+UseParallelGC -XX:GCTimeRatio=20 -Xms30m -Xmx30m -Xss2048k
but failed to restrict it to 48M
Before using Sun JDK5 we are using IBM jdk1.3 with tomcat 3 with green thread. So we were able to configure it with just one option -mx48m. I am really stuck. I cannot believe that Sun have not given us any control on the maximum memory usage. Please help me .
Regards
Purav Gandhi -
Increasing JVM memory size at runtime
I want to increase the JVM memory size at runtime.
I found out that I can do this with oracle.aurora.vm.OracleRuntime.setMaxMemorySize(...)
Which JAR do I have to put on the classpath to be able to acces OracleRuntime???
What would be the proper implementation to incerase the memory size?aurora.zip
-
When i upload the files thorugh internet jvm memory is taking so much.
i have integrated a file upload in my webapplication(JSP)
when i upload the files thorugh internet jvm memory is taking so much.
how can i reduce it.
any open source for file upload process is there?
thax,
R. Ramasubramaniam.Suggestion: read [the documentation|http://commons.apache.org/fileupload/using.html] for it.
By default it will store files in memory up to about 10k. Larger than that will be written to disk.
If you are really worried about memory, perhaps you should take a look at the [streaming API|http://commons.apache.org/fileupload/streaming.html]
How large are the files being uploaded?
How many users are we talking about? -
JVM performance in case of JVM memory usage is high
Hi All
Here is some query about JVM performance in case of JVM memory usage is high.
I have a server of 16GB. For JVM 12GB and for OS 4GB.
Let say, My Application creating many Unnecessary Objects and consumes very high memory.
Also, there is a gaurenty that limit of memory is it never exceed 2GB.
No, in worst scenario memory used by JVM is 2GB.Ok.
I have free memory available for JVM is 10GB(16GB - 2GB - 4GB(any OS memory usage)).
Now, for any Application processing I have 10GB.
So, does it affect application processing for which I have 10GB.
I mean does JVM performance decreses in high JVM memory usage even I have occupied more memory to JVM.Hi All
Here is some query about JVM performance in case of JVM memory usage is high.
I have a server of 16GB. For JVM 12GB and for OS 4GB.
Let say, My Application creating many Unnecessary Objects and consumes very high memory.
Also, there is a gaurenty that limit of memory is it never exceed 2GB.
No, in worst scenario memory used by JVM is 2GB.Ok.
I have free memory available for JVM is 10GB(16GB - 2GB - 4GB(any OS memory usage)).
Now, for any Application processing I have 10GB.
So, does it affect application processing for which I have 10GB.
I mean does JVM performance decreses in high JVM memory usage even I have occupied more memory to JVM. -
Hi All,
This is about the JVM memory issues I am getting on CentOS 5.2.
I have the following configuration export CATALINA_OPTS="-Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m" and the line is being added in catalina.sh file.
When I run the process after say around 12hrs I get the following error code java.lang.OutOfMemoryError: Requested array size exceeds VM limit this looks to be the jvm error.
What is the work around for preventing the above error? My RAM size is 4 gb and JVM heap size configured to be 2 gb.
Another query is , if I do a top -p on the particular java process I do see the RES grows more than the heap size configured like 2gb configured in this case but have seen the process RES is more than 2 gb.I am not clear about this.
Let me know if I can provide more information.
Thanks in advance.
-Rajuseige wrote:
... CentOS 5.2.
export CATALINA_OPTS="-Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=1024m"
I get the following error code java.lang.OutOfMemoryError: Requested array size exceeds VM limit
What is the work around for preventing the above error? Use a 64-bit processor a 64-bit CentOS and a 64-bit Java.
When I run the process after say around 12hrsHuh? It does not happen always? -
Increase JVM memory using Java Code
Hi Friends
I am in a critical situtation and not able get the solution. My application is huge and need of increase in JVM memory. I am able to increase JVM memory in command prompt
java -Xmx500m classname
Simarly I am able to run jar file also
java -Xmx500m -jar sample.jar
I need to know how to set JVM memory for executable JAR. When I just double-click the JAR application load and i am getting Out Of Memory. I dont what ti use command prompt to execute. Please help me with this program. Thanks in advanceI gone through the code of ImageJ software. ImageJ is
a freeware and wrtten in Java. They are setting jvm
memory in code, getting the description of the code
was difficult.
long memoryBytes =
s = Runtime.getRuntime().maxMemory();
long memoryMB = memoryBytes/1024/1024;
long memoryDiff = memoryMB - 64;
String s = "Runtime.maxMemory: " + memoryMB +
B + "MB\n";
s = s + "Difference: " + memoryDiff + "MB";
System.out.println("s..." + s);
The above code will give you the memory allocated for JVM. Yes.
When there is a way to find the memory space,
there should be some way to set it. No.
I am still trying to set the memory in code r using external resource.Read reply 4.
I want to just give the executable jar to users. They
are not satisified with the bat file and hidding
command prompt in background.You may be able to use Runtime.exec() to launch another instance of java, with whatever heap setting you desire. -
Display jvm memory use of the server
hello ,
I'm trying to display a graph of jvm memory use of the server.
my problem is how to communicate data between the server and the client ,
should I use applet to display the graph ? , the use of memory change with the time , how manage that ?
thanksA method to retrieve the call graph would be great!
I just discovered that NI Idea Exchange only has a forum for LabVIEW. Maybe it's time to add TestStand the the Idea Exchange. Where do I suggest this idea?!
Message Edited by Phillip Brooks on 08-19-2009 01:56 PM
Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.
"You are what you don't automate"
Inplaceness is synonymous with insidiousness -
CF 8 JVM memory is not being garbage collected.
I am baffled by something I am seeing on my QA server. I have
an app that we load tested but when the test completed the JVM
memory used was not released. I used CF Server Monitor to watch the
memory usage and sometimes it spiked to the max and either the app
failed or I got timeout exceptions.
This is the only app running on this server and the testing
completed over an hour ago but the memory has not been released
yet.
CF Admin settings:
Maximum JVM Heap Size (MB) 512
The CF Server JVM Setting arguments include: -server
-Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m
-XX:+UseParallelGC
I found a script that uses java.lang.Runtime and
java.lang.management.managementFactory that dumps a JVM memory
usage profile The latest dump follows:
JVM Monitor - ColdFusion Server - Enterprise v8,0,1,195765
JVM Memory Monitor - struct
Heap Memory Usage - Committed 481 MB
Heap Memory Usage - Initial 0.00 MB
Heap Memory Usage - Max 493 MB
Heap Memory Usage - Used 437 MB
JVM - Free Memory 44.0 MB
JVM - Max Memory 493 MB
JVM - Total Memory 481 MB
JVM - Used Memory 449 MB
Memory Pool - Code Cache - Used 8.80 MB
Memory Pool - PS Eden Space - Used 6.37 MB
Memory Pool - PS Old Gen - Used 428 MB
Memory Pool - PS Perm Gen - Used 52.4 MB
Memory Pool - PS Survivor Space - Used 3.50 MB
Non-Heap Memory Usage - Committed 62.8 MB
Non-Heap Memory Usage - Initial 18.3 MB
Non-Heap Memory Usage - Max 240 MB
Non-Heap Memory Usage - Used 61.2 MB
According to the CF Server Monitor JVM memory usage builds up
to 477 MB then the app fails or timesout.
Session Scope memory usage: 0.27 KB
Application Scope memory usage: 1.370 KB
Server Scope memory usage: 3.12 KB
Since the test ended JVM Memory Usage has dropped back to 438
MB?
Besides CFAdmin nothing else is running on this CF Server.
I've read several other memory related topics but none of them have
helped.
Can someone tell me why the memory isn't being release? How
can I further troubleshoot the problem?
Thx
pwp> Adam Cameron wrote:
>
The maximum stable heap size I've managed to get is around
> 1.0-1.2GB, on a win32 system. On Solaris (running a
32-bit JVM),
> about 1.4GB. It *seems* like GC doesn't actually clear
out RAM
> properly if more than that much RAM is being
addressed.
>
> Yes, there is a well-known
>
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19359&sliceId=1
Not really what I was talking about. One might be able to get
the CF
instance to *start* with 1.8GB allocated to the heap, but it
won't actually
work. I've managed to get a server to idle for a reasonable
length of time
on 1.5GB, but as soon as the thing started to ramp up, it
face-planted,
once it started actually trying to *use* the higher end of
the RAM
allocated to it. At 1.2GB, it'll seem to run OK for a
reasonable length of
time, but eventually it starts leaking memory; at around 1GB,
it was pretty
stable.
Hence my comment about it being *stable* at that allocation.
Not that "it
simply won't start if more than 1.8GB is allocated to it".
My point was that your rule of thumb:
maximum heap size(Xmx) = RAM(in MB) / (2 * number of servers
using the
JVM)
Is not a very good one. Plug 4GB RAM (so a small server) and
one CF
instance into that equation. Your rule suggests I should be
allocating 2GB
to the heap. Which - as you yourself pointed out - won't
work.
Adam -
Increase JVM memory size in build.xml?
Hi,
I want to know if it is possible to increase the JVM memory size in the "build.xml" file of my java fx project itself?If so,how to go about it?
Thanks a lot.I think you can achieve that by specifying <fx:jvmarg>.
For example:
<fx:deploy width="${applet.width}"
height="${applet.height}"
embedJNLP="true"
nativeBundles="all"
outdir="${dist.dir}"
outfile="${application.title}"
verbose="true">
<!--
Increase JVM memory size.
http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm#CIAGFFIF
-->
<fx:platform javafx="2.2+" j2se="7.0">
<fx:jvmarg value="-Xms64M"/>
<fx:jvmarg value="-Xmx512M"/>
</fx:platform>
</fx:deploy>Hope that helps!
Edited by: ytw on Nov 16, 2012 12:30 PM -
Reading system and JVM memory ?
How would one get started in locating the current system memory use and current memory use of the JVM running the java application.
Primarily for windows but I would prefer platform independant.I found how to get the current JVM Memory, but I still dont know how to find current system memory usage ?
-
Help - JVM memory issue w RH3 and Apache (Oracle 11.5.9)
We have an issue where we need to increase the memory on our JVM on 32 - bit Linux OS past 1.9G addressable. 64 - bit is not an option and niether is hugetbl. are there some settings I am missing to enable the JVM to address more than 1.9 G. I have set Xmx and can allocate 2.6 G but cant address more than 1.9G. This is a huge issue that can hold up a critical go live
-any ideas???11.5.9 does not use AK for any OAF pages, we migrated all the AK data way before 11.5.9 was released.
dont worry about the regionname and the URL param, there will be a regionmap to specify the xml that replaced this AK region.
look for one of my threads to understand how to get the xml for the ak region appearing in the URL
Thanks
Tapash -
DPS 6.x jvm memory heap size?
I am setting up directory proxy server 6.3 and have the java setting for memory heap size in my notes from testing last year. Is it important to set this? Is the argument as stated ok? And is 500 ok? Doubt anything has changed since last year, but want to be sure. Thanks.
dpadm set-flags /opt/dps jvm-args="-Xmx500M -Xms500M -XX:NewRatio=1"crosspost
-
What would make a JVM memory size 1.9GB ?
This is on Solaris 2.6, JDK 1.2.2_05a, JDK1.2.2_07, possibly JDK 1.3 (it crashed).
WLS 5.1, SP8. With inline_instrs_jit=0.
This is the [heap] segment shown by /usr/proc/bin/pmap. This is native heap, it is
NOT the Java Heap.
I know it could be the Type 2 db drivers - but I doubt it.
With JDK1.3 we set -XX:MaxPermSize=128m - it crashes after an hour.
One part of the application creates its own threads for some parallel processing.
Is this a known
problem with the JVMs?
Any help is much appreciated.
Mike ReicheWhat is the 'Break difference' that the debug JVM shows? Is that the Java Heap? Or
is memory in the C Heap that is wasted by fragmentation?
============== C Heap Report ========================
mmap space 300515328
Committed space 95690752
Allocated space 34049316
Break difference 66060288
Breakdown by type:
ClassSpace 15252128
JITCompiledStackMaps 5277188
StackMap 1892672
Dependency 1856760
utf8_space 1854838
untagged 1783520
basicBlocksState 1664992
utf8_table 1055903
Class 811520
JITPrestub 610480
NearClass 531360
CardObjectTable 386048
JavaStack 257024
CheckingDone 200367
SummaryCardTable 193024
name_loader_cache_entry 65976
ScratchRecord 65548
basic_block_t 50896
IntfMethodTable 48960
stringTableOverflowRecord 46480
BitVectorElem 32768
ObjectMap 30724
ClassName 28407
Clinit 18752
Table_mem 18628
LoaderConstraintsTableEntry 11668
JITInlineByteCode 1928
LoaderConstraintsTableLoaderEntry 520
stateVecBuf 237
=====================================================
Total GC time: 2987981 ms
- Mike
"[email protected]" Mike wrote:
>
>
Aslo - GC[1] are taking way long (Debug JVM) - I'm used to seeing them taking
500
ms with the regular JVM. With -ms32m -m256m - I wanted GC[1] to run often
because
that has helped with other memory problems in the past - it doesn't work
so hot here.
GC[1] in 5514 ms: (38Mb, 0% free) -> (38Mb, 69% free)
GC[1] in 6300 ms: (38Mb, 0% free) -> (38Mb, 65% free)
GC[1] in 7130 ms: (38Mb, 0% free) -> (38Mb, 64% free)
GC[1] in 6158 ms: (38Mb, 2% free) -> (38Mb, 62% free)
GC[1] in 6171 ms: (38Mb, 0% free) -> (38Mb, 65% free)
GC[1] in 6885 ms: (38Mb, 0% free) -> (38Mb, 64% free)
GC[1] in 7403 ms: (38Mb, 0% free) -> (38Mb, 61% free)
GC[1] in 689101:25:49 PM PST {218} - Evaluation is: true
GC[1] in 6545 ms: (38Mb, 1% free) -> (38Mb, 61% free)
GC[1] in 7459 ms: (38Mb, 0% free) -> (38Mb, 62% free)
GC[1] in 6861 ms: (38Mb, 2% free) -> (38Mb, 58% free)
GC[1] in 6090 ms: (38Mb, 0% free) -> (38Mb, 56% free)
GC[1] in 6413 ms: (38Mb, 0% free) -> (38Mb, 60% free)
GC[1] in 8230 ms: (38Mb, 1% free) -> (38Mb, 58% free)
GC[1] in 7649 ms: (38Mb, 0% free) -> (38Mb, 54% free)
GC[1] in 7912 ms: (38Mb, 0% free) -> (38Mb, 55% free)
GC[1] in 7696 ms: (38Mb, 1% free) -> (38Mb, 57% free)
GC[1] in 6543 ms: (38Mb, 1% free) -> (38Mb, 60% free)
GC[1] in 7036 ms: (38Mb, 1% free) -> (38Mb, 59% free)
GC[1] in 7483 ms: (38Mb, 0% free) -> (38Mb, 56% free)
GC[1] in 5132 ms: (38Mb, 1% free) -> (38Mb, 59% free)
GC[1] in 8186 ms: (38Mb, 0% free) -> (38Mb, 53% free)
GC[1] in 5691 ms: (38Mb, 0% free) -> (38Mb, 58% free)
GC[1]01:35:49 PM PST {575} - Evaluation is: true
GC[1] in 8176 ms: (38Mb, 0% free) -> (38Mb, 46% free)
GC[1] in 8463 ms: (38Mb, 0% free) -> (38Mb, 47% free)
GC[1] in 7342 ms: (38Mb, 0% free) -> (42Mb, 41% free)
GC[1] in 6920 ms: (42Mb, 0% free) -> (49Mb, 41% free)
GC[1] in 8610 ms: (49Mb, 1% free) -> (60Mb, 40% free)
GC[1] in 9581 ms: (60Mb, 1% free) -> (60Mb, 50% free)
GC[1] in 10514 ms: (60Mb, 0% free) -> (60Mb, 59% free)
GC[1] in 9865 ms: (60Mb, 0% free) -> (60Mb, 60% free)
GC[1] in 11323 ms: (60Mb, 0% free) -> (60Mb, 57% free)
GC[1] in 18768 ms: (60Mb, 0% free) -> (60Mb, 60% free)
GC[1] in 11147 ms: (60Mb, 0% free) -> (60Mb, 55% free)
GC[1] in 7293 ms: (60Mb, 0% free) -> (60Mb, 42% free)
GC[1] in 9372 ms: (60Mb, 0% free) -> (60Mb, 53% free)
GC[1] in 8814 ms: (60Mb, 0% free) -> (60Mb, 55% free)
GC[1] in 9695 ms: (60Mb, 1% free) -> (60Mb, 54% free)
GC[1] in 7309 ms: (60Mb, 0% free) -> (60Mb, 53% free)
GC[1] in 8713 ms: (60Mb, 0% free) -> (60Mb, 54% free)
GC[1] in 11955 ms: (60Mb, 0% free) -> (60Mb, 55% free)
GC[1] in 12685 ms: (60Mb, 1% free) -> (60Mb, 55% free)
GC[1] in 18906 ms: (60Mb, 0% free) -> (60Mb, 58% free)
GC[1] in 13333 ms: (60Mb, 0% free) -> (60Mb, 51% free)
"[email protected]" <[email protected]> wrote:
Rob -
Thanks for your attention -
We create lots of threads - up to five threads for each DB hit (i didn't
design it).
The multi-threading will be disabled/removed and tested later on today.
Both 'top'
and pstack show around 85 threads.
I've read articles on the bea newsgroups about WL hanging on to threadreferences
so that the threads could not be GC'ed, but it sounded more like a customer's
impression
of what might be going on than something from BEA engineering.
Right now we are running with the 1.2.2_05a 'Debug' JVM with -verbose:gc
-verbose:gc
-verbose:gc
JVMARGS=verbose_c_heap,inline_instrs_jit=0
Unfortunately, some of the code being tested is now broken and not being
excercised
today. I will keep you posted.
- Mike
Rob Woollen <[email protected]> wrote:
How many threads are you creating?
Each thread uses some memory (stack etc.), but 1.9GB would be a lot of
thread creation.
-- Rob
Mike Reiche wrote:
This is on Solaris 2.6, JDK 1.2.2_05a, JDK1.2.2_07, possibly JDK 1.3
(it
crashed).
WLS 5.1, SP8. With inline_instrs_jit=0.
This is the [heap] segment shown by /usr/proc/bin/pmap. This is nativeheap, it is
NOT the Java Heap.
I know it could be the Type 2 db drivers - but I doubt it.
With JDK1.3 we set -XX:MaxPermSize=128m - it crashes after an hour.
One part of the application creates its own threads for some parallelprocessing.
Is this a known
problem with the JVMs?
Any help is much appreciated.
Mike Reiche--
Coming Soon: Building J2EE Applications & BEA WebLogic Server
by Michael Girdley, Rob Woollen, and Sandra Emerson
http://learnweblogic.com
Maybe you are looking for
-
Adobe exchange panel does not load in cc applications
I cannot launch the Adobe Exchange Panel in Photoshop or Illustrator. The option to launch this extension is not available in my menu. In Photoshop "Extensions is grayed out". In Illustrator it is not grayed out but it is simply not populated. I
-
Using a VB-6 app to connect to BOE-XI (R2) - SDK?
I'm pretty sure the answer is NO, but I wanted to post it here for confirmation. We have a large legacy VB-6 application that uses RAS-9 for reporting. The version 9 tools are no longer supported by Crystal/BOBJ - and we have an existing BOE-XI (R2)
-
How to install windows from usb??
Ok i am trying to install windows on a mid 2007 macbook. in some forums it says no and in other it says you can . What i dont understand is how to install it if you do not have the option to click when you are going thru boot camp. The mac is runnin
-
I have a problem with elements 8. When ever I start a new project, the program searches for the old, latest used filmmaterial, I have used before. That means, if I use a different DVD, it take so much time, until the program starts. So how can I stop
-
I can buy music in itunes, but I can't get my ipod to update
I am connected to the internet. I download music all the time but I need to update my ipod and when I try to update my ipod it tells me that I am not connected to the internet? What do I do?