Disk Space Optimization

Optimize disk space to boost network output

Blockchains tend to grow in adoption over time. The increase in blockchain usage could significantly affect its output, such as block speed and transaction amount. However, optimizing disk space could help to significantly reduce the cost of maintaining disk usage.

A good way to start this process is to configure the disk space. However, know that these changes could take effect when the disk space is in use.

Pruning

Usually, the 500th and last 100 states are stored on the disk. In the long run, this could consume a lot of disk space.

You can optimize this with the following configuration:

pruning = "custom" pruning-keep-recent = "100" pruning-keep-every = "0" pruning-interval = "10"

You might be moved to configure pruning-keep-recent = "0" , but keep in mind that this could corrupt the database, especially if the vinced is purged in the process. Hence, we recommend keeping the last few states.

Logging

By default, logs are set to info, and over time, produce more logs. The default log level might be good initially. But while syncing, you can lower the log level to warn (or error).

On config.toml, set the log_level = "warn"

Don't forget to configure your log rotation as well.

State-sync snapshots

Vince Chain disables this by default. You may still sync it with the following commands.

On app.toml set snapshot-interval = 0

You could sync a new node in minutes if the state-sync is already enabled and functioning properly. However, this node does not come with a transaction and block history.

Indexing

Indexing is optional, especially if you do not need to query transactions from the specific node.

On config.toml set indexer = "null"

On an already synced node, you will have to delete the collected index manually. You can find the index in the database directory with the title data/tx_index.db/.

Last updated