Skip to content

Commit

Permalink
docs: Removes accounts-on-ramdisk section (solana-labs#33655)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored and nickfrosty committed Nov 15, 2023
1 parent ed1f058 commit 020a65c
Showing 1 changed file with 2 additions and 40 deletions.
42 changes: 2 additions & 40 deletions docs/src/operations/guides/validator-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ The ledger will be placed in the `ledger/` directory by default, use the
`--ledger` argument to specify a different location.

> Note: You can use a
> [paper wallet seed phrase](../cli/wallets/paper.md#seed-phrase-generation) for your
> `--identity` and/or `--authorized-voter` keypairs. To use these, pass the
> [paper wallet seed phrase](../cli/wallets/paper.md#seed-phrase-generation) for
> your `--identity` and/or `--authorized-voter` keypairs. To use these, pass the
> respective argument as
> `solana-validator --identity ASK ... --authorized-voter ASK ...` and you will
> be prompted to enter your seed phrases and optional passphrase.
Expand Down Expand Up @@ -442,44 +442,6 @@ which starts the solana validator process uses "exec" to do so (example: "exec
solana-validator ..."); otherwise, when logrotate sends its signal to the
validator, the enclosing script will die and take the validator process with it.

### Using a ramdisk with spill-over into swap for the accounts database to reduce SSD wear

If your machine has plenty of RAM, a tmpfs ramdisk
([tmpfs](https://man7.org/linux/man-pages/man5/tmpfs.5.html)) may be used to
hold the accounts database

When using tmpfs it's essential to also configure swap on your machine as well
to avoid running out of tmpfs space periodically.

A 300GB tmpfs partition is recommended, with an accompanying 250GB swap
partition.

Example configuration:

1. `sudo mkdir /mnt/solana-accounts`
2. Add a 300GB tmpfs partition by adding a new line containing
`tmpfs /mnt/solana-accounts tmpfs rw,size=300G,user=sol 0 0` to `/etc/fstab`
(assuming your validator is running under the user "sol"). **CAREFUL: If you
incorrectly edit /etc/fstab your machine may no longer boot**
3. Create at least 250GB of swap space

- Choose a device to use in place of `SWAPDEV` for the remainder of these
instructions. Ideally select a free disk partition of 250GB or greater on a
fast disk. If one is not available, create a swap file with
`sudo dd if=/dev/zero of=/swapfile bs=1MiB count=250KiB`, set its permissions
with `sudo chmod 0600 /swapfile` and use `/swapfile` as `SWAPDEV` for the
remainder of these instructions
- Format the device for usage as swap with `sudo mkswap SWAPDEV`

4. Add the swap file to `/etc/fstab` with a new line containing
`SWAPDEV swap swap defaults 0 0`
5. Enable swap with `sudo swapon -a` and mount the tmpfs with
`sudo mount /mnt/solana-accounts/`
6. Confirm swap is active with `free -g` and the tmpfs is mounted with `mount`

Now add the `--accounts /mnt/solana-accounts` argument to your
`solana-validator` command-line arguments and restart the validator.

### Account indexing

As the number of populated accounts on the cluster grows, account-data RPC
Expand Down

0 comments on commit 020a65c

Please sign in to comment.