Skip to content

Commit 05789db

Browse files
non-fungible-nelsonAlexandra Tranalexandratran
authored
Update for OpenJ9 instructions. (#1334)
* Update for OpenJ9 instructions. Signed-off-by: Matt Nelson <[email protected]> * fix lint Signed-off-by: Matt Nelson <[email protected]> * more lint/spelling. Signed-off-by: Matt Nelson <[email protected]> * edit pr Signed-off-by: Alexandra Tran <[email protected]> --------- Signed-off-by: Matt Nelson <[email protected]> Signed-off-by: Alexandra Tran <[email protected]> Co-authored-by: Alexandra Tran <[email protected]> Co-authored-by: Alexandra Tran Carrillo <[email protected]>
1 parent 990b26c commit 05789db

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

docs/public-networks/get-started/system-requirements.md

+84
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,90 @@ Grafana provides a [sample dashboard](https://grafana.com/grafana/dashboards/102
1414
CPU requirements are highest when syncing to the network and typically reduce after the node is
1515
synchronized to the chain head.
1616

17+
## Java distribution and installation
18+
19+
Besu requires an installation of Java 17+ to run.
20+
We currently recommend two Java distributions, [OpenJDK 17](https://jdk.java.net/17/)
21+
and [OpenJ9](https://www.eclipse.org/openj9/), though you can experiment based on your needs.
22+
23+
OpenJDK is the default for many Java users and is balanced in performance and garbage collection.
24+
OpenJ9 consumes less memory and system resources, but can have worse performance on some setups.
25+
26+
If you have more than 32GB RAM (for Besu and your [consensus client](../concepts/the-merge.md)), use OpenJDK.
27+
If you have less RAM:
28+
29+
* If you're on Linux (or Unix-based) and your CPU is x86-64 bit architecture (like Intel), use OpenJ9.
30+
* If you're on ARM-64 CPU architecture (Mac M-series, Raspberry Pi), use OpenJDK.
31+
32+
If you have OpenJDK installed or need a fresh installation of OpenJ9, you can pick up the OpenJ9
33+
docker image, or install the OpenJ9 JDK using the following steps:
34+
35+
1. Get the [binaries](https://github.com/ibmruntimes/semeru17-binaries/releases) corresponding to
36+
your OS architecture.
37+
For example:
38+
39+
```bash
40+
wget https://github.com/ibmruntimes/semeru17-binaries/releases/download/jdk-17.0.5%2B8_openj9-0.35.0/ibm-semeru-open-jdk_x64_linux_17.0.5_8_openj9-0.35.0.tar.gz
41+
```
42+
43+
2. Uncompress the binaries:
44+
45+
=== "Command"
46+
47+
```bash
48+
tar -xvf YOUR_J9_IMAGE.tar.gz
49+
```
50+
51+
=== "Example"
52+
53+
```bash
54+
tar -xvf ibm-semeru-open-jdk_x64_linux_17.0.5_8_openj9-0.35.0.tar.gz
55+
```
56+
57+
3. Move the binaries to `bin` directory:
58+
59+
=== "Command"
60+
61+
```bash
62+
sudo cp -r YOUR_IMAGE/ /usr/bin/
63+
```
64+
65+
=== "Example"
66+
67+
```bash
68+
sudo cp -r jdk-17.0.5+8/ /usr/bin/
69+
```
70+
71+
4. Specify OpenJ9 for Java on your machine:
72+
73+
=== "Command"
74+
75+
```bash
76+
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/bin/YOUR_IMAGE" 1
77+
sudo update-alternatives --config java (and choose OpenJ9)
78+
```
79+
80+
=== "Example"
81+
82+
```bash
83+
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/bin/jdk-17.0.5+8/bin/java"
84+
```
85+
86+
Change your `JAVA_HOME` to OpenJ9 (if using the JDK implementation), where `jdk-install-dir` is
87+
the installation location you specified:
88+
89+
=== "Command"
90+
91+
```bash
92+
export JAVA_HOME=jdk-install-dir`
93+
```
94+
95+
=== "Example"
96+
97+
```bash
98+
export JAVA_HOME=/usr/bin/jdk-17.0.5+8
99+
```
100+
17101
## Java Virtual Machine size
18102

19103
For Mainnet and testnets, the minimum [Java Virtual Machine (JVM) memory requirement is 8 GB](../how-to/configure-jvm/manage-memory.md).

0 commit comments

Comments
 (0)