Skip to content

Commit

Permalink
Update the memory management values. (Consensys#221)
Browse files Browse the repository at this point in the history
* Add  CLI option to disable built-in slashing protection for external signers.

Signed-off-by: Byron Gravenorst <[email protected]>

* Add instructions to connect to mainnet.

Signed-off-by: Byron Gravenorst <[email protected]>

* updating submodule to latest

* Add instructions to connect to mainnet.

Signed-off-by: Byron Gravenorst <[email protected]>

* Fix markdown issue.

Signed-off-by: Byron Gravenorst <[email protected]>

* Update memory management values.

Signed-off-by: Byron Gravenorst <[email protected]>

* Address reviewer feedback.

Signed-off-by: Byron Gravenorst <[email protected]>
  • Loading branch information
bgravenorst authored Jan 11, 2021
1 parent eed1f88 commit 54f6be5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/HowTo/Get-Started/Manage-Memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@ title: Teku memory management
Manage Teku's Java Virtual Machine (JVM) memory usage by setting a maximum heap size
using the `JAVA_OPTS` environment variable.

We recommend setting the maximum heap size to 2GB if you have less than 8GB of RAM, or if you have
more RAM, but want to free up memory for other processes. This results in an approximate process
size of 3.5GB (on Linux).
We recommend setting the maximum heap size to at least 3GB if you have less than 8GB of RAM, or if
you have more RAM, but want to free up memory for other processes. This results in an approximate
process size of 5GB (on Linux).

If you have more than 8GB of RAM, we recommend setting the maximum heap size to 5GB or more.

Set the heap size using the environment variable, or using the command line when starting Teku.

=== "Environment variable"

```bash
export JAVA_OPTS=-Xmx2g
export JAVA_OPTS=-Xmx3g
```

=== "Command line"

```bash
JAVA_OPTS=-Xmx2g ./teku [options]
JAVA_OPTS=-Xmx3g ./teku [options]
```

!!! note
Expand Down
8 changes: 8 additions & 0 deletions docs/HowTo/Troubleshoot/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ description: Frequently asked questions and answers for troubleshooting Teku

# Troubleshooting

## Out of memory error

If Teku exits with a `java.lang.OutOfMemoryError: Java heap space` error, it could mean that Teku's
Java Virtual Machine (JVM) ran out of memory.

To fix this, you can try [setting a maximum heap size].

## P2P port conflicts

If Teku fails to start with a `P2P Port 9000 (TCP/UDP) is already in use. Check for other processes
Expand Down Expand Up @@ -161,3 +168,4 @@ The shell does not see the tilde (~) in the command. To fix this, omit the equal
[Ensure your local network is configured correctly]: ../Find-and-Connect/Improve-Connectivity.md
[EIP-2335]: https://eips.ethereum.org/EIPS/eip-2335
[slashed]: ../../Concepts/Slashing-Protection.md
[setting a maximum heap size]: ../Get-Started/Manage-Memory.md

0 comments on commit 54f6be5

Please sign in to comment.