I want to download Bea JRockIt 5 because the JRE doesn’t seem to be able to allocate VM more than 1.6 GB.
please i not find the link for download the JRockIT jre
I use machine 32 bits windows7 and ram 3GB.
Thanks in advance
The bottom line is that the limit you are seeing is not actually a JVM imposed limit. So changing to JRockit is not going to help.
Most 32-bit Windows operating systems limit the virtual memory for a user application (such as a JVM) to 2Gb. However, there is a boot switch for Windows Server 2003 that enables applications up to 3Gb ... on hardware that supports PAE : http://msdn.microsoft.com/en-us/windows/hardware/gg487508.aspx.
Your alternatives are:
If you are running Windows Server 2003 - do what the link says.
Switch to 32 bit Linux or 32 bit Solaris. Both allow more than 2Gb for user applications.
Switch to a 64 bit operating system.
I don't know why a simple Google search didn't suffice, but this is clearly available on OTN.
As far as allocation of memory for the JVM is concerned, it is unlikely that you will be able to get any amount more than 2GB. See this related question and the most voted answer.
Related
Something wierd seems to be going on... I have an application on tomcat that used to be on a physical windows server 2008 standard 32-bit which I p2v'd with vmware converter over as a VM. I'm upgrading the server to windows server 2008 r2 64bit and instead of doing an inplace, I'm just building another one up and doing parallel side by side, and its a fresh VM from the start, no p2v stuff....
The strange part is I was able to set a max memory in the tomcat9w.exe configuration tool to about 1600 Megabytes and that was the hitting of the wall on that setup (the original physical one that I p2v'd to a VM), I can set less ram, but I cannot set it more than 1600 otherwise when I try to start the tomcat service in services.msc it will just crap outs.
So my thinking was since I have to stay on 32-bit of tomcat and 32-bit of Java JVM anyhow (long story...) that it might be better to put it in a 64-bit OS (server 2008r2) rather than the standard 32bit of server 2008. Long story short, from a fresh VM, on this box I'm only able to set a max total ram in tomcatw as around 1000 m (1GB) and if I set anymore it will not start, as in I cannot get tomcat service to start... so the wall is around 1GB...
As a test, I installed the tomcat (zip extract, not using msi or exe installer) to my own client workstation laptop running the latest windows 10 1809 etc and once again I hit the 1GB wall and cannot even get it to go up to 1.6GB, even though I have like 16GB ram on my laptop machine...
I have googled this for a long time and apparently it has to do with the way the operating system itself (in this case windows, be it windows server 2008 std, 2008 r2, or win10 etc) handles per process memory limitations and thread memory allocations that by default only allow around 1.5 to 2 g of ram per process and that this is what is constraining the tomcat apache jvm and not the programs itself....
But if this is indeed an OS difference, I checked on my original 32bit server2008 std, the one that I did P2V, and it didn't have anything special set in the boot.ini or any bcdedit parameters that allow it to see more ram per process nor anything like a /3GB flag etc etc
The only other thing I can think of is that maybe there is a difference between a VM and a physical raw bare metal box in how it allocates ram, and that I can get more contigous memory that tomcat/jvm requires when running on a 32bit OS on a physical box as opposed to and compared to a 64bit OS in a VM?
Why is it I can get the exact same version of Tomcat (bit by bit the same) to handle up to 1600m in 32bit version of server 2008 but on server 2008r2 64bit or even server 2016 64bit I can only get tomcat to do up to around 1GB total max? They are both using the same Java version jvm etc etc etc
See https://www.oracle.com/technetwork/java/hotspotfaq-138619.html#gc_heap_32bit:
Why can't I get a larger heap with the 32-bit JVM?
The maximum theoretical heap limit for the 32-bit JVM is 4G. Due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead, in practice the limit can be much lower. On most modern 32-bit Windows systems the maximum heap size will range from 1.4G to 1.6G. On 32-bit Solaris kernels the address space is limited to 2G. On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems.
As of Java SE 6, the Windows /3GB boot.ini feature is not supported.
If your application requires a very large heap you should use a 64-bit VM on a version of the operating system that supports 64-bit applications. See Java SE Supported System Configurations for details.
I have a computer with Intel I7 2600 3.4Ghz processor, 32GB RAM, Windows 7 professional x64, JVM updated.
In Zend Studio when run Source -> Format Code over many files, Zend crash with warning: Java Heap Size.
I read about setting values in ZendStudio.ini, my relevant settings:
-Xms1089M
-Xmx1089M
-XX:MaxPermSize=256m
But I can't increment these limit.
Any alternative for fix this problem?
Why can't you increment? 32 bit JVM?
UPDATE: Did some research. While it is possible to edit Zend Studio's JVM usage,
This support forum post states 32 bit JVM is needed (I guess they use 32 bit native DLLS.
A 32 bit JVM is limited to about 1.5 GB addressable space. You might be able to tweak things further, but it's gonna be a stretch.
Therefore your only solutions are mostly out of your hands
Zend Studio updates to 64 bit support
Zend Studio adjusts memory usage
You figure out a way not to use as much memory yourself.
I'm setting up production server Windows 2008 64bit with 8gb ram and 4core xeon cpu. It will have some oracle services and Glassfish. I wonder if it's worth to install 64 bit jvm or stay with 32 bit?
We will run e-commerce application and preapre for 100 users/day. We also use jpa caching.
Would 64bit jvm be faster?
The HotSpot FAQ seems to imply that it would be slower if anything:
The performance difference comparing an application running on a 64-bit platform versus a 32-bit platform on SPARC is on the order of 10-20% degradation when you move to a 64-bit VM. On AMD64 and EM64T platforms this difference ranges from 0-15% depending on the amount of pointer accessing your application performs.
If your want to go with 32-bit then it makes sense especially if your plan is to setup 4 or 5 32-bit Glassfish servers as a cluster on the same system, each with a max of 1.25GB of RAM or so. Otherwise, you could run one 64-bit Glassfish server and it would theoretically be able to use up all 8GB of ram if your code needed it.
So, you could start with one Glassfish JVM, and as users come online, increasing load, you could add addtional JVMs to your cluster and also a NGINX/Tomcat server to load balance.
I have a little Java application that I wrote for recording my work activities. Since I have it open all day, every day, one of the things that originally concerned me as to choice of language is the amount of memory it would use.
Happily, under Windows XP I it would typically consume about 5 MB when minimized and 12 or so when maximized, and happily runs with -Xmx5M (memory consumption according to Windows Task Manager).
When I upgraded my home PC with newer hardware, and at the same time, to Windows 7 64, (although I installed and am using the 32 bit JVM), I immediately noted that the JVM for this application now reports 68 MB+ always... and that's with -Xmx5M -Xss16K, according to Task Manager's "Working Set".
Both the old and new machines had/have 4 GB of RAM, of which 512 MB is used by video. Both were running recent builds of Java 6 - about update 15 for WinXP, and now update 24 for Win7. The application footprint on disk is 70 K in 12 classes. Moreover, my work computer is still Windows XP, running Java 6_24, and it shows about 12 MB for this identical application - and by identical I mean literally that, since the two systems are sync'd for all my development tools.
As a developer, I need to understand the reasons why my applications appear to chew up so much memory.
Can anyone shed some light on this, and suggest how to meaningfully reduce the memory footprint for a Java 6 application?
Edit
The answer may be in an excessive PermGen size. According to JVisualVM, I have a heap of:
Size: 5.2 MB, Used: 4.3 MB (peak) and Allocated 6.2 MB.
but for the PermGen
Size: 12.5 MB, Used: 4.6 MB (peak) and Allocated 67.1 MB.
So is it possible that the 68 MB shown in Task Manager in Win 7 is simply requested but unassigned virtual memory?
EDIT 2
Reducing PermGen to 12 MB had no effect on the process RAM, but JVisualVM did show it reduced (apparently 12 MB constitutes some sort of minimum, because going lower than that had no effect in JVVM).
The 64 bit OS uses 64 bits as the size of pointers while a 32 bit OS uses 32 bits. That might just be one of the reasons though.
Remember that everything in Java is a pointer (for the most part) so when switching to a 64 bit machine, with 64 bit memory addresses, your pointers double in size.
There is an option in the JVM (-XX:+UseCompressedOops) to turn on compressed object pointers. This will put your memory usage near the levels you saw on 32 bit machines.
For the 64-bit JVM you can specify an option that will reduce the overhead of 64-bit addressing. As long as the heap is under 32GB it can essentially compress the pointers back to 32-bit. In a typical Java application this saves about 40% of the memory. See Compressed oops in the Hotspot JVM for more details. Here's the option for it:
-XX:+UseCompressedOops
Note that if you use a 32-bit JVM on a 64-bit OS that you won't pay the overhead of 64-bit memory addresses (although there's a different overhead to pay there in translation, yet it's very minor).
I believe that Windows 7 doesn't report memory use the same as XP either (I don't have a reference offhand though). So for a fair comparison of 32-bit vs 64-bit you need to run both on the same version of Windows.
This has nothing to do with the operating system being 64-bit - Windows XP and Windows 7 use RAM in very different ways.
Because of this, Windows 7 will almost always report all programs as using more memory than Windows XP did. Don't worry about this - this is just a result of Windows 7 using your memory the way it should be: as a cache.
While it's not the whole story, the PermGen size is 30% larger on 64-bit plaforms:
-XX:MaxPermSize - Size of the Permanent Generation.
[5.0 and newer: 64 bit VMs are scaled
30% larger; 1.4 amd64: 96m; 1.3.1
-client: 32m.]
Java 6 HotSpot VM Options
I have a request to install a Linux server (preferably Ubuntu 64bit server),
and Java (64 bit) on the following machine:
Intel Core2Quad Q8200 - 2.33 GHz
8gb DDR2 ram
2x 320GB SATA HDD in soft RAID1 mirror (mirror)
The problem is how to configure system and Java because I need JVM to use more than 4gb of memory.
It cannot be distributed on many virtual machines. There is data more than 4GB large
and it has to be in memory because HDD is slow and performance is critical.
This is a configuration and performance question and I am interested in comments if anyone has experience?
thank you very much for helping me on this...
A 64 bit JVM should have no problem at all with giant heaps, certainly much larger than your available RAM. Just increase the heap size when you start the JVM, for example:
java -Xmx6g
You used to have to specify the 64bit flag (with -d64), but I don't think this is necessary any more.
32bit JVMs can manage something like 3GB of heap.
skaffman's answer which provides the required flag for allocating 6GB of memory is correct. If the 'g' does not do the trick you might want to try 6000m (check the link below for details on flags/platform)
For other options you can find useful information on all available options for the Java HotSpot VM here.
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
(Behavioral and performance options are available. Platform specific links also available on this page)
JVM (especially 64bit) does not hesitate taking all the memory, and 4Gb is not a problem. Just install 64-bit Ubuntu and default-jre package will also be 64 bit.
Also take special care about how your data is stored in memory. Again, 64-bit JDK is very hungry for memory due to higher overhead for pointers etc. so if you distribute these 4Gb in small chunks in some data structure, 8Gb will not be enough.
If you install a 64-bit Ubuntu, I believe that
sudo apt-get install sun-java6-jdk
gives you a 64-bit Java.
EDIT: The 64 bit Java can give you as much memory as you need with the appropriate switches. The limit is with the 32-bit JVM's which cannot go over 2-4 Gb depending on operating system.