mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
Online deletion: edits per reviews, new diagram of how it works
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Configure Advisory Deletion
|
||||
|
||||
The default config file sets `rippled` to automatically delete outdated history of XRP Ledger state and transactions as new ledger versions become available. If your server uses most of its hardware resources during peak hours, you can configure the server to delete ledgers only when prompted by a command scheduled to run during off-peak hours to reduce the chances of online deletion.
|
||||
The default config file sets `rippled` to automatically delete outdated history of XRP Ledger state and transactions as new ledger versions become available. If your server uses most of its hardware resources during peak hours, you can configure the server to delete ledgers only when prompted by a command scheduled to run during off-peak hours, so that online deletion is less likely to impact server performance.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -22,7 +22,7 @@ This tutorial assumes your server meets the following prerequisites:
|
||||
|
||||
- Your server has enough disk space to store your chosen amount of history in its ledger store.
|
||||
|
||||
See [Capacity Planning](capacity-planning.html) for details of how much storage is required for different configuration. With advisory deletion enabled, the maximum history a server may accumulate before deletion is equal to the number of ledger versions configured in the `online_delete` setting **plus** the amount of time between online deletion prompts.
|
||||
See [Capacity Planning](capacity-planning.html) for details of how much storage is required for different configurations. With advisory deletion enabled, the maximum history a server may accumulate before deletion is equal to the number of ledger versions configured in the `online_delete` setting **plus** the amount of time between online deletion prompts.
|
||||
|
||||
- You know which hours are least busy for your server.
|
||||
|
||||
@@ -48,7 +48,7 @@ To configure advisory deletion with a daily schedule, perform the following step
|
||||
|
||||
$ rippled --conf=/etc/opt/ripple/rippled.cfg can_delete now
|
||||
|
||||
The response indicates the maximum ledger index that may the server may delete from its ledger store. For example, the following message indicates that ledger versions up to and including ledger index 43633667 are to be deleted:
|
||||
The response indicates the maximum ledger index that the server may delete from its ledger store. For example, the following message indicates that ledger versions up to and including ledger index 43633667 can be deleted:
|
||||
|
||||
{
|
||||
"result": {
|
||||
@@ -71,7 +71,7 @@ To configure advisory deletion with a daily schedule, perform the following step
|
||||
|
||||
Be sure that you schedule the command to run based on your server's configured time zone.
|
||||
|
||||
**Tip:** You do not need to schedule a `cron` job to run online deletion if you have `advisory_delete` disabled. In that case, `rippled` runs online deletion automatically when the server has approximately twice the number of ledgers to keep after deletion.
|
||||
**Tip:** You do not need to schedule a `cron` job to run online deletion if you have `advisory_delete` disabled. In that case, `rippled` runs online deletion automatically when the difference between the server's oldest and current validated ledger versions is at least the value of `online_delete`.
|
||||
|
||||
4. Start (or restart) the `rippled` service.
|
||||
|
||||
|
||||
@@ -52,12 +52,12 @@ To configure your server to acquire and store full history, complete the followi
|
||||
0. If you have a database dump from another full-history server to use as a basis, set the `[import_db]` stanza of your server's config file to point to the data to be imported. (Otherwise, skip this step.)
|
||||
|
||||
[import_db]
|
||||
type=RocksDB
|
||||
type=NuDB
|
||||
path=/tmp/full_history_dump/
|
||||
|
||||
0. Remove your server's existing database files, if you have any from previously running `rippled`.
|
||||
|
||||
After disabling online deletion, the server ignores any data that was downloaded while online deletion was enabled, so you may as well clear up the disk space:
|
||||
After disabling online deletion, the server ignores any data that was downloaded while online deletion was enabled, so you may as well clear up the disk space. For example:
|
||||
|
||||
rm -r /var/lib/rippled/db/rocksdb/*
|
||||
rm /var/lib/rippled/db/*.db
|
||||
|
||||
@@ -21,7 +21,7 @@ To change the amount of history your server stores, perform the following steps:
|
||||
|
||||
1. Decide how many ledger versions' worth of history to store.
|
||||
|
||||
New ledger versions are usually validated 3 to 4 seconds apart, so the number of ledger versions corresponds roughly to the amount of time you want to store. See [Capacity Planning](capacity-planning.html) for details of how much storage is required for different configuration.
|
||||
New ledger versions are usually validated 3 to 4 seconds apart, so the number of ledger versions corresponds roughly to the amount of time you want to store. See [Capacity Planning](capacity-planning.html) for details of how much storage is required for different configurations.
|
||||
|
||||
Online deletion is based on how many ledger versions to keep _after_ deleting history, so you should have enough disk space to store twice as many ledgers as you set it to keep.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user