Changeset 230
- Timestamp:
- Jan 8, 2011, 11:09:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/README.OS2
r229 r230 91 91 92 92 Note that these values are gathered on a default eCS 2.0 GA system and may 93 vary depending on what system DLLs get loaded into each process ,they are93 vary depending on what system DLLs get loaded into each process; they are 94 94 given only as an example. You may get the real values on your system with 95 95 a variety of tools gathering system information, such as THESEUS. 96 96 97 97 On the other hand, when calculating the default amount of memory to reserve 98 for the theheap (which is called the maximum heap size in the documentation),98 for the heap (which is called the maximum heap size in the documentation), 99 99 Java uses the physical RAM size as a base, not the the size of the free block 100 100 in the private arena (where Java actually allocates the heap). Below is a 101 101 simplified version of the algorithm for these calculations: 102 102 103 1. Use MIN (MaxRAM, <physical_RAM>) as the base RAM value. MaxRAM is a Java [104 constant that defaults to 1G for the client ( regular) Java virtual machine105 and 4G for the server JVM.103 1. Use MIN (MaxRAM, <physical_RAM>) as the base RAM value. MaxRAM is a Java 104 constant that defaults to 1G for the client (default) Java virtual machine 105 and to 4G for the server JVM. 106 106 107 107 2. Divide this base RAM value by MaxRAMFraction (4 by default) and assign the … … 109 109 110 110 3. Use the MaxHeapSize value increased by 20-30% (for the needs other than the 111 Java heap) as the size of the private memory block to allocate. 111 Java heap) as the size of the memory block to allocate in the private 112 arena. 112 113 113 114 So, if your machine has, say, 2G of RAM and you attempt to start it in server … … 121 122 limiting the amount of memory Java wants for the heap to the actual size of 122 123 the available memory block in the private arena. So, in the above case Java 123 would actually get about 310M in server mode (instead of the requested 512M).124 You may change this limit by changing VIRTUALADDRESSLIMIT in CONFIG.SYS125 (according to the table above), but please note that values higher than 1024126 may cause problems with some drivers (for example, it is known that JFS and127 HPFS386 drivers cannot allocate a disk cache of the big size if the128 VIRTUALADDRESSLIMIT value is too high).124 would actually get about 310M in server mode (instead of performing a failed 125 attempt to allocate 512M). You may change this limit by changing the 126 VIRTUALADDRESSLIMIT value in CONFIG.SYS (according to the table above), but 127 please note that values higher than 1024 may cause problems with some drivers 128 (for example, it is known that JFS and HPFS386 drivers cannot allocate a disk 129 cache of the big size if the VIRTUALADDRESSLIMIT value is too high). 129 130 130 131 In either case, the above describes how Java calculates the defaulut maximum … … 132 133 command line option if you are not satisfied with the default value for some 133 134 reason or if your applcation gives you the "Could not reserve enough space for 134 object heap" message at startup. However, keep in mind that if you a -Xmx135 value which is bigger than the maximum free block in the private arena, you136 will get the same error and will have to decrease the requested size until it137 succeeds.135 object heap" message at startup. However, keep in mind that if you specify a 136 -Xmx value which is, increased by 20-30% as described in step 3 above, bigger 137 than the maximum free block in the private arena, you will get the same memory 138 allocation error which indicates that you should use a smaller value. 138 139 139 140
Note:
See TracChangeset
for help on using the changeset viewer.