Disk Optimization
Last updated
Last updated
When setting up a validator node for , it's crucial to optimize configuration settings to reduce disk space requirements while maintaining essential functionalities. The blockchain database tends to expand over time due to factors like block speed and transaction volume. However, by customizing certain settings, you can significantly lower the disk usage without compromising the node's performance.
If your node doesnβt require transaction querying, disabling indexing can save substantial disk space. To achieve this, modify the config.toml
file:
Note: If you disable indexing on a synced node, manually delete the index located at data/tx_index.db/
under the database directory.
Ensure that state-sync snapshots are disabled to prevent unnecessary data accumulation. In the app.toml
file, set:
Note: Enabling state-sync could facilitate rapid syncing for new nodes but sacrifices historical data.
Customize pruning settings to optimize disk usage over time. Adjust the pruning configurations in config.toml
:
Reduce unnecessary log data by adjusting the log level. Initially set to info, switch it to a lower level after confirming successful node syncing in config.toml:
Ensure proper log rotation settings for efficient log management.
Implementing these customized configurations reduces disk usage significantly from 90GB to 17GB while ensuring essential data is retained for optimal CosVM node performance. Adjustments like disabling unnecessary features, optimizing pruning, and minimizing logs can effectively manage disk space without compromising the node's functionality.
Here's a comparison of disk usage after two weeks on the mainnet: