From 0bdbe59b3fb9ecbad398ca21b1a722049b78481e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 30 Jul 2025 11:36:43 +0200 Subject: [PATCH 1/5] Add docs for scanProgressFileLimit and improve scanProgressIntervalS docs --- users/config.rst | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/users/config.rst b/users/config.rst index 823f5869..1a1b7efa 100644 --- a/users/config.rst +++ b/users/config.rst @@ -493,7 +493,18 @@ The following child elements may exist: .. option:: folder.scanProgressIntervalS The interval in seconds with which scan progress information is sent to the GUI. Setting to ``0`` - will cause Syncthing to use the default value of two. + will cause Syncthing to use the default value of two. Setting a negative value will disable + scan progress information. + Enabling scan progress information will buffer the entire file list in RAM (using approximately 512 bytes per file): + this can cause high memory usage and GC thrashing on large folders, greatly slowing down scans, + so it is recommended to disable this for truly large folders. + +.. option:: folder.scanProgressFileLimit + + Disable emission of scan progress information if more than the specified number of files + are encountered during the scan, useful to avoid OOMs while buffering the entire file list + in RAM for truly large folders. + Setting to ``0`` will cause Syncthing to use the default value of ``2048``. .. option:: folder.pullerPauseS From 8dfa1f696fa6228d0d2ed86a1f1182db152cad06 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 30 Jul 2025 19:21:52 +0200 Subject: [PATCH 2/5] Update users/config.rst Co-authored-by: tomasz1986 --- users/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/config.rst b/users/config.rst index 1a1b7efa..1e7b8e79 100644 --- a/users/config.rst +++ b/users/config.rst @@ -496,7 +496,7 @@ The following child elements may exist: will cause Syncthing to use the default value of two. Setting a negative value will disable scan progress information. Enabling scan progress information will buffer the entire file list in RAM (using approximately 512 bytes per file): - this can cause high memory usage and GC thrashing on large folders, greatly slowing down scans, + this can cause high memory usage and :abbr:`GC (garbage collection)` thrashing on large folders, greatly slowing down scans, so it is recommended to disable this for truly large folders. .. option:: folder.scanProgressFileLimit From 57c3bd887443f64f1bc54e57b535d9d037860250 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 30 Jul 2025 19:21:56 +0200 Subject: [PATCH 3/5] Update users/config.rst Co-authored-by: tomasz1986 --- users/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/config.rst b/users/config.rst index 1e7b8e79..f2765377 100644 --- a/users/config.rst +++ b/users/config.rst @@ -502,7 +502,7 @@ The following child elements may exist: .. option:: folder.scanProgressFileLimit Disable emission of scan progress information if more than the specified number of files - are encountered during the scan, useful to avoid OOMs while buffering the entire file list + are encountered during the scan, useful to avoid running out of memory while buffering the entire file list in RAM for truly large folders. Setting to ``0`` will cause Syncthing to use the default value of ``2048``. From eaec6ed6ed0215e888f7dc2270ad980482d90ade Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 30 Jul 2025 19:22:53 +0200 Subject: [PATCH 4/5] Bump --- users/config.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users/config.rst b/users/config.rst index f2765377..2934c119 100644 --- a/users/config.rst +++ b/users/config.rst @@ -497,13 +497,13 @@ The following child elements may exist: scan progress information. Enabling scan progress information will buffer the entire file list in RAM (using approximately 512 bytes per file): this can cause high memory usage and :abbr:`GC (garbage collection)` thrashing on large folders, greatly slowing down scans, - so it is recommended to disable this for truly large folders. + so it is recommended to disable this for folders with a lot of files. .. option:: folder.scanProgressFileLimit Disable emission of scan progress information if more than the specified number of files are encountered during the scan, useful to avoid running out of memory while buffering the entire file list - in RAM for truly large folders. + in RAM for folders with a lot of files. Setting to ``0`` will cause Syncthing to use the default value of ``2048``. .. option:: folder.pullerPauseS From a926e43e8cdfc84e21a31917bbdac76ffa589481 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 30 Jul 2025 19:24:10 +0200 Subject: [PATCH 5/5] Bump --- users/config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/config.rst b/users/config.rst index 2934c119..ea6f6631 100644 --- a/users/config.rst +++ b/users/config.rst @@ -495,7 +495,7 @@ The following child elements may exist: The interval in seconds with which scan progress information is sent to the GUI. Setting to ``0`` will cause Syncthing to use the default value of two. Setting a negative value will disable scan progress information. - Enabling scan progress information will buffer the entire file list in RAM (using approximately 512 bytes per file): + Enabling scan progress information will buffer the entire file list in RAM (using approximately 512 bytes per file plus the length of all file names): this can cause high memory usage and :abbr:`GC (garbage collection)` thrashing on large folders, greatly slowing down scans, so it is recommended to disable this for folders with a lot of files.