Skip to content

Commit

Permalink
docs: updated db docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ohager committed May 5, 2024
1 parent 05609be commit db0b563
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DB_SETUP_MARIADB.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,13 @@ DB.Url=jdbc:mariadb://localhost:3306/signum_testnet
DB.Username=signumnode
DB.Password=s1gn00m_n0d3
```

# Faster Sync time

Do reduce I/O times and though causing significant speedup while syncing, one may run the following command:

```sql
SET GLOBAL innodb_flush_log_at_trx_commit = 0;
```

See more details [here](https://mariadb.com/docs/server/ref/mdb/system-variables/innodb_flush_log_at_trx_commit/).
2 changes: 2 additions & 0 deletions DB_SETUP_SQLITE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Occasionally, `SQL_BUSY` or `SQL_BUSY_SNAPSHOT` exceptions may occur due to SQLi

Running the `VACUUM` command periodically is advisable to defragment the database and reduce file size. Ensure the node is shut down before running `VACUUM`. This process can take several minutes to complete.

> When setting properties value `DB.Optimize=on`, this command will be executed on each node start.
## WAL Journal

The default journaling mode, "Write-Ahead-Logging" (WAL), creates an additional `.wal` file. During shutdown, a checkpoint is created to ensure data integrity. If using WAL mode, ensure both the `.db` and `.wal` files are copied together. Other journaling modes may be preferable if disk space is limited, though they may impact performance during syncing. The `MEMORY` mode is not supported to prevent database corruption issues.

0 comments on commit db0b563

Please sign in to comment.