# Disk Space Optimization

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.&#x20;

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`).&#x20;

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

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

### State-sync snapshots <a href="#state-sync-snapshots" id="state-sync-snapshots"></a>

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

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.&#x20;

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/`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vincechain.gitbook.io/vince-chain-documentation/4.-technical-documentation/vince-chain-validators/disk-space-optimization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
