Skip to content

chore: updates for SQLite database #901

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions advanced/option-database-tuning.rst

This file was deleted.

14 changes: 4 additions & 10 deletions includes/env-vars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ STTRACE
Main and operational facilities:
config
Configuration loading and saving.
db
The database layer.
main
Main package.
model
Expand Down Expand Up @@ -51,6 +49,8 @@ STTRACE
REST API.
sha256
SHA256 hashing package (this facility currently unused).
sqlite
The SQLite database
stats
Persistent device and folder statistics.
sync
Expand Down Expand Up @@ -113,14 +113,8 @@ STPERFSTATS
Write running performance statistics to ``perf-$pid.csv``. Not supported on
Windows.

STRECHECKDBEVERY
Time before folder statistics (file, dir, ... counts) are recalculated from
scratch. The given duration must be parseable by Go's ``time.ParseDuration``. If
missing or not parseable, the default value of 1 month is used. To force
recalculation on every startup, set it to ``1s``.

STGCINDIRECTEVERY
Sets the time interval in between database garbage collection runs. The
STDBMAINTINTERVAL
Sets the time interval in between database maintenance runs. The
given duration must be parseable by Go's ``time.ParseDuration``.

GOMAXPROCS
Expand Down
1 change: 0 additions & 1 deletion rest/system-config-get.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ Returns the current configuration.
"stunServers": [
"default"
],
"databaseTuning": "auto",
"maxConcurrentIncomingRequestKiB": 0,
"announceLANAddresses": true,
"sendFullIndexOnUpgrade": false,
Expand Down
2 changes: 1 addition & 1 deletion rest/system-paths-get.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and others.
"certFile": "/home/user/.config/syncthing/cert.pem",
"config": "/home/user/.config/syncthing/config.xml",
"csrfTokens": "/home/user/.config/syncthing/csrftokens.txt",
"database": "/home/user/.local/share/syncthing/index-v0.14.0.db",
"database": "/home/user/.local/share/syncthing/index-v2.db",
"defFolder": "/home/user/Sync",
"guiAssets": "/home/user/src/syncthing/gui",
"httpsCertFile": "/home/user/.config/syncthing/https-cert.pem",
Expand Down
13 changes: 2 additions & 11 deletions users/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ corresponding environment variables (``$STDATADIR`` or ``STHOMEDIR``).
The database directory contains the following files, among others:

:file:`index-{*}.db`
A directory holding the database with metadata and hashes of the files
currently on disk and available from peers.
The database with metadata and hashes of the files currently on disk and
available from peers.

:file:`syncthing.log`
Log output, on some systems.
Expand Down Expand Up @@ -188,7 +188,6 @@ The following shows an example of a default configuration file (IDs will differ)
<stunKeepaliveStartS>180</stunKeepaliveStartS>
<stunKeepaliveMinS>20</stunKeepaliveMinS>
<stunServer>default</stunServer>
<databaseTuning>auto</databaseTuning>
<maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
<announceLANAddresses>true</announceLANAddresses>
<sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>
Expand Down Expand Up @@ -1046,7 +1045,6 @@ Options Element
<stunKeepaliveStartS>180</stunKeepaliveStartS>
<stunKeepaliveMinS>20</stunKeepaliveMinS>
<stunServer>default</stunServer>
<databaseTuning>auto</databaseTuning>
<maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
<announceLANAddresses>true</announceLANAddresses>
<sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>
Expand Down Expand Up @@ -1306,13 +1304,6 @@ The ``options`` element contains all other global configuration options.
feature. Set ``false`` to keep Syncthing from sending panic logs on serious
troubles. Defaults to ``true``, to help the developers troubleshoot.

.. option:: options.databaseTuning

Controls how Syncthing uses the backend key-value database that stores the
index data and other persistent data it needs. The available options and
implications are explained in a :doc:`separate chapter
</advanced/option-database-tuning>`.

.. option:: options.maxConcurrentIncomingRequestKiB

This limits how many bytes we have "in the air" in the form of response data
Expand Down
4 changes: 2 additions & 2 deletions users/syncing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ version of the file. This version is called the *global* version and is the
one that each device strives to be up to date with.

This information is kept in the *index database*, which is stored in the
configuration directory and called ``index-vx.y.z.db`` (for some version
x.y.z which may not be exactly the version of Syncthing you're running).
configuration or data directory and called ``index-*.db``, with some version
number in place of the asterisk.

When new index data is received from other devices Syncthing recalculates
which version for each file should be the global version, and compares this
Expand Down
10 changes: 0 additions & 10 deletions users/tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ is on an SSD. First some general options:
performance. If the underlying storage is a large array of disk,
then syncing many folders concurrently may be beneficial.

- :opt:`databaseTuning`
Set to ``large``. Regardless of the size of the actual database, this
increases a number of buffers and settings to optimize for higher
throughput.

- :opt:`maxConcurrentIncomingRequestKiB`
This sets the maximum amount of data being processed (loaded from
disk and transmitted over the network) concurrently at any given
Expand Down Expand Up @@ -152,11 +147,6 @@ General options:
- :opt:`maxFolderConcurrency`
Set to 1 to sync folders sequentially, reducing the peak memory usage.

- :opt:`databaseTuning`
Set to ``small``. Regardless of the size of the actual database size,
this reduces the size of a number of buffers to optimize for reduced
memory usage.

- :opt:`maxConcurrentIncomingRequestKiB`
Set to 32 MiB to reduce the amount of memory used for buffering
responses to incoming requests.
Expand Down