update the RPi guide regarding overclocking (#5135)

This commit is contained in:
Miran 2023-07-17 10:26:38 +02:00 committed by GitHub
parent 2efc44a8ab
commit 92da61ce88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 85 additions and 42 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -58,30 +58,30 @@ Use your microSD to USB adapter to plug the SD card into your computer.
Open Raspberry Pi Imager and click on **CHOOSE OS**:
![](https://storage.googleapis.com/ethereum-hackmd/upload_7b8cfa54f877218b6d971f09fa8d62ff.png)
![](./img/RPi_imager1.png)
Scroll down and click on **Use custom**:
![](https://i.imgur.com/ar88MTt.png)
![](./img/RPi_imager2.png)
Find the OS you downloaded in step 2:
![](https://i.imgur.com/NeOT8pf.png)
![](./img/RPi_imager3.png)
### 4b. Write to SD card
Click on **CHOOSE SD CARD**.
You should see a menu pop-up with your SD card listed -- Select it
![](https://storage.googleapis.com/ethereum-hackmd/upload_f90713c1ef782a94b5fce9eb8249c206.png)
![](./img/RPi_imager4.png)
Click on **WRITE**
![](https://i.imgur.com/NeOT8pf.png)
![](./img/RPi_imager3.png)
Click **YES**
![](https://storage.googleapis.com/ethereum-hackmd/upload_160208a5bc983165c2a1eb9bffed01c2.png)
![](./img/RPi_imager5.png)
Make a cup of coffee :)
@ -260,7 +260,50 @@ For more on `raspi-config`, see [here](https://www.raspberrypi.org/documentation
Once you're done, `ssh` back into your Pi.
### 11. Install the beacon node
### 11. Overclocking
Nimbus requires the Raspberry Pi to be overclocked.
To overclock your Raspberry Pi, you need to add two lines to the `/boot/firmware/usercfg.txt` file:
```sh
sudo nano /boot/firmware/usercfg.txt
```
Add the following two lines to the end of the file:
```
arm_freq=1800
over_voltage=3
```
Save the file and reboot.
This increases the CPU clock from 1500 MHz to 1800 MHz and raises the CPU voltage from 0.88 V to 0.93 V.
To read more about testing the stability of an overclock and benchmarking, follow the [RPi overclocking guide](https://docs.rocketpool.net/guides/node/local/prepare-pi.html#overclocking-the-pi) by Joe Clapis.
### 12. Install the beacon node
=== "Using package manager"
1. Add Status APT repository to your system.
```sh
echo 'deb https://apt.status.im/nimbus all main' | sudo tee /etc/apt/sources.list.d/nimbus.list
# Import the GPG key used to sign the releases:
sudo curl https://apt.status.im/pubkey.asc -o /etc/apt/trusted.gpg.d/apt-status-im.asc
```
2. Install Nimbus using APT:
```sh
sudo apt-get update
sudo apt-get install nimbus-beacon-node nimbus-validator-client
```
=== "Manual installation"
@ -277,20 +320,8 @@ Once you're done, `ssh` back into your Pi.
Now you can find the software in the nimbus-eth2 directory.
=== "Using package manager"
1. Add Status APT repository to your system.
Follow our [APT guide](https://apt.status.im).
2. Install Nimbus using APT:
```sh
sudo apt-get install nimbus-beacon-node
```
### 12. Copy signing key over to Pi
### 13. Copy signing key over to Pi
!!! note
If you haven't generated your validator key(s) and/or made your deposit yet, follow the [deposit instructions](./run-a-validator.md#1-make-a-deposit-for-your-validator) of our validator guide before carrying on.
@ -314,20 +345,31 @@ As usual, replace `195.177.101.93` with your Pi's IP address, and `<VALIDATOR_KE
Run `pwd` in your `validator_keys` directory to print the full pathname to the console.
### 13. Import signing key into Nimbus
### 14. Import signing key into Nimbus
To import your signing key into Nimbus, from the `nimbus-eth2` directory run:
Depending on your installation method, run these commands to import your signing key into Nimbus:
```sh
build/nimbus_beacon_node deposits import --data-dir=build/data/shared_prater_0 ../validator_keys
```
=== "Using package manager"
```sh
# Run import command as the `nimbus` user
sudo -u nimbus /usr/bin/nimbus_beacon_node deposits import --data-dir=/var/lib/nimbus/shared_prater_0 /path/to/keys
```
=== "Manual installation"
To import your signing key into Nimbus, from the `nimbus-eth2` directory run.
```sh
build/nimbus_beacon_node deposits import --data-dir=build/data/shared_prater_0 ../validator_keys
```
You'll be asked to enter the password you created to encrypt your keystore(s).
Don't worry, this is entirely normal.
Your validator client needs both your signing keystore(s) and the password encrypting it to import your [key](https://blog.ethereum.org/2020/05/21/keys/) (since it needs to decrypt the keystore in order to be able to use it to sign on your behalf).
### 14. Connect to Prater
### 15. Connect to Prater
We're finally ready to connect to the Prater testnet!
@ -336,11 +378,21 @@ We're finally ready to connect to the Prater testnet!
For instructions on how to do so, see the [eth1 page](./eth1.md).
To connect to Prater, run:
```
./run-prater-beacon-node.sh
```
### 15. Check for successful connection
=== "Using package manager"
```sh
sudo -u nimbus /usr/bin/nimbus_beacon_node --network=prater --data-dir=/var/lib/nimbus/shared_prater_0
```
=== "Manual installation"
```sh
./run-prater-beacon-node.sh
```
### 16. Check for successful connection
If you look near the top of the logs printed to your console, you should see confirmation that your beacon node has started, with your local validator attached:
@ -378,9 +430,10 @@ Keep an eye on the number of peers you're currently connected to (in the above c
## Mainnet advice
Whether or not your Pi is up to the task will depend on a number of factors such as SSD speed, network connectivity, etc.
As such, it's best to verify performance on a testnet first.
As such, it's best to verify performance on a testnet first.
The best thing you can do is to set your Pi to run Prater. **If you have no trouble syncing and attesting on Prater, your setup should be more than good enough for mainnet** as well (Mainnet is expected to use fewer resources).
The best thing you can do is to set your Pi to run Prater.
If you have no trouble syncing and attesting on Prater, your setup should good enough for mainnet as well.
<blockquote class="twitter-tweet" data-conversation="none"><p lang="en" dir="ltr">We&#39;ve been running lots of PIs and NanoPCs 24/7 for 3 years and never got a hardware fail. It is easy (and cheap) to get redundancy of components (even spare PIs in different locations, more of this to come).</p>&mdash; Ethereum on ARM (@EthereumOnARM) <a href="https://twitter.com/EthereumOnARM/status/1332772217420177408?ref_src=twsrc%5Etfw">November 28, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
@ -395,13 +448,3 @@ Systemd will also ensure your validator keeps running when you exit your ssh ses
For the details on how to do this, see our [systemd guide](./beacon-node-systemd.md).
### Overclocking
While you shouldn't need to, if you're feeling adventurous and want to try and squeeze out some extra performance out of your Pi's CPU, see the [overclocking guide](https://docs.rocketpool.net/guides/node/local/prepare-pi.html#overclocking-the-pi) by Joe Clapis.
!!! note
We have since improved performance in several ways which should make a vanilla Pi perform well.
However, overclocking may still give some benefits, in particular you have more performance to deal with anomalies (like spamming etc).