source: trunk/doc/README.OS2@ 229

Last change on this file since 229 was 229, checked in by dmik, 15 years ago

README.OS2: Added information about memory requirements and about how Java calculates the default heap size.

File size: 8.1 KB
Line 
1OpenJDK 6 Alpha for OS/2 and eCS
2
3Version 1.6.0 Build 19 Beta (2010-12-30)
4
5This is a beta build intended for testing purposes.
6
7
8
9INTRODUCTION
10
11This document contains a brief information on the OS/2 version of the
12OpenJDK 6 product. Please read it carefully before starting your work.
13You may also visit the project page at
14
15 http://svn.netlabs.org/java/wiki
16
17to get more information and the latest news and also to report bugs.
18
19To get a brief list of OS/2-specific changes from release to release
20please see the CHANGES.OS2 file included in this distribution.
21
22
23
24REQUIREMENTS
25
26In order to use this version of OpenJDK, you will need the following:
27
28 - A OS/2 Warp 4 Fixpack 16+, OS/2 Warp 4.5 or eComStation operating system.
29
30 - Odin32 library version 0.6.21541 (2010-12-30) or above:
31
32 ftp://ftp.netlabs.org/pub/odin/odin32bin-20101230-release.wpi
33
34
35
36INSTALLATION
37
38 The OpenJDK product is distributed in two packages: the JRE and the SDK
39 (which includes a copy of JRE). Simply take a necessary package and unzip it
40 to a directory of your choice. You will need to add the \bin subdirectory
41 inside this directory to PATH and BEGINLIBPATH to allow for starting Java
42 executables from an arbitrary location:
43
44 set PATH=<directory>\bin;%PATH%
45 set BEGINLIBPATH=<directory>\bin;%BEGINLIBPATH%
46
47 Also make sure there are no traces of other Java installations in the
48 environment because this is known to make problems (this in particular means
49 that the CLASSPATH environment variable should not be set).
50
51 Alternatively, you may add this subdirectory to PATH and LIBPATH statements
52 of your CONFIG.SYS (and reboot) to make the given Java installation the
53 default one.
54
55
56
57MEMORY REQUIREMENTS
58
59 Sometimes you may find out that starting a Java application fails with the
60 following error message:
61
62 Error occured during initialization of VM
63 Could not reserve enough space for object heap
64 Could not create the Java virtual machine.
65
66 This means that the amount of memory Java wants to reserve for its heap is
67 bigger than the maximum free block of memory available to the Java process.
68 Note that the size of this free block does not directly depend on the amount
69 of physical RAM installed in your computer (because the physical RAM may be
70 extended using the swap file, for instance). It rather depends on the virtual
71 address limit set by OS/2 for the process. In older OS/2 versions that don't
72 support high memory (e.g. the ones based on pre-WSeB kernels) this limit
73 is known to be 512M. In later versions it is controlled by the
74 VIRTUALADDRESSLIMIT parameter in CONFIG.SYS (which is specified in megabytes
75 and defaults to 1024M).
76
77 Furthermore, not all memory within the virtual address limit is available to
78 the process. Some small fraction of it is used by the kernel and the rest is
79 divided in two more or less equal parts: the private arena and the shared
80 arena. As said, the size of these arenas does not depend on the amount of
81 physical RAM and can be approximated using the following table. Note that the
82 values in the table are not the initial arena sizes but rather the sizes of
83 the maximum free block of memory available in the corresponding arena to a
84 dummy process that does nothing but queries these system values (all numbers
85 are in MB, the first column is for systems with no high memory support):
86
87 VIRTUALADDRESSLIMIT *512 | 1024 | 1536 | 2048 | 3072
88 -------------------------------------------------------------------
89 Max free block in private arena 267 | 432 | 880 | 1328 | 2224
90 Max free block in shared arena 228 | 404 | 852 | 1230 | 2196
91
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 are
94 given only as an example. You may get the real values on your system with
95 a variety of tools gathering system information, such as THESEUS.
96
97 On the other hand, when calculating the default amount of memory to reserve
98 for the the heap (which is called the maximum heap size in the documentation),
99 Java uses the physical RAM size as a base, not the the size of the free block
100 in the private arena (where Java actually allocates the heap). Below is a
101 simplified version of the algorithm for these calculations:
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 machine
105 and 4G for the server JVM.
106
107 2. Divide this base RAM value by MaxRAMFraction (4 by default) and assign the
108 result as the default value for the maximum heap size (MaxHeapSize).
109
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.
112
113 So, if your machine has, say, 2G of RAM and you attempt to start it in server
114 mode (using the -server command line option), Java will want 512M (2G/4) plus
115 additional 20-30%. This would obviously not fit into 432M of free private
116 memory available for the process when VIRTUALADDRESSLIMIT is set to 1024 and
117 it was the case with earlier releases of OpenJDK 6 for OS/2 as well as with
118 the releases of InnoTek Java 1.4.x for OS/2.
119
120 Starting with version 6 Beta 2, OpenJDK for OS/2 solves this problem by
121 limiting the amount of memory Java wants for the heap to the actual size of
122 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.SYS
125 (according to the table above), but please note that values higher than 1024
126 may cause problems with some drivers (for example, it is known that JFS and
127 HPFS386 drivers cannot allocate a disk cache of the big size if the
128 VIRTUALADDRESSLIMIT value is too high).
129
130 In either case, the above describes how Java calculates the defaulut maximum
131 heap size. You may always override this default using the -Xmx<size> Java
132 command line option if you are not satisfied with the default value for some
133 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 -Xmx
135 value which is bigger than the maximum free block in the private arena, you
136 will get the same error and will have to decrease the requested size until it
137 succeeds.
138
139
140
141CURRENT LIMITATIONS
142
143 1. OpenJDK will not work correctly under the OS/2 SMP kernel (Java process
144 hangs are very likely). This is a known problem of Odin32 which will be
145 addressed in further releases. The workaround is to use the OS/2 UNI or
146 Warp4 kernel instead.
147
148 2. The separate JRE package of OpenJDK is not currently available. You may
149 still extract JRE from the SDK package (it is located in the \jre
150 subdirectory of the SDK distribution archive).
151
152 3. AWT and Swing always use font anti-aliasing for all standard components.
153 If you want to disable anti-aliasing, you may use the following Java
154 command line argument:
155
156 -Dawt.useSystemAAFontSettings=off
157
158 However, this is not recommended since Java uses standard OS/2 Type1
159 fonts by default which look really ugly with anti-aliasing turned off.
160
161 3. Some rarely used Java system classes may be still missing in this release.
162
163 See the project roadmap for more information on the current progress and
164 future plans:
165
166 http://svn.netlabs.org/java/roadmap
167
168 Feel free to request new features and report bugs using the project bug
169 tracker abaialble at:
170
171 http://svn.netlabs.org/java/report
172
173
174
175CREDITS
176
177Dmitry A. Kuminov (development)
178Silvan Scherrer (management)
179
180netlabs.org (hosting & support)
181
182Oracle Corporation (original OpenJDK product)
183
184We also want to THANK all individuals and organizations who made the donations
185to this project and helped to make it happen.
186
187
188Oracle and Java are registered trademarks of Oracle and/or its affiliates.
189OS/2 and OS/2 Warp are trademarks of the IBM Corporation and/or its subsidiary(-ies).
190eComStation is a trademark of Serenity Systems International and/or its subsidiary(-ies).
191Other names may be trademarks of their respective owners.
Note: See TracBrowser for help on using the repository browser.