mirror of
https://github.com/syncthing/syncthing.git
synced 2026-11-20 00:51:22 -08:00
This improves performance when running with fsync enabled. The key observation is that the OS may coalesce multiple concurrent fsyncs, so we gain some performance by issuing them in parallell. Since they run from the finisher routine, a simple fix is to run multiple finisher routines. That's the `after` line in the graph below. The other step is to do the same for the directory fsyncs, issuing them concurrently with a limiter. In both cases I used the Copiers value as the concurrency factor. Additionally, add some buffering to the channels between routines to minimise stalls where a routine needs to wait for another. This is the `after2` line. All in all, this speeds up syncing 25k tiny files from 190s to 130s, a 30% improvement. <img width="821" height="540" alt="Screenshot 2026-07-25 at 22 58 34" src="https://github.com/user-attachments/assets/18272c89-a99e-4ee4-9b5e-b278967ea7c6" /> --------- Signed-off-by: Jakob Borg <[email protected]>
185 lines
8.8 KiB
XML
185 lines
8.8 KiB
XML
<configuration version="52">
|
|
<folder id="default" label="" path="~/tmp/dst" type="sendreceive" rescanIntervalS="60" fsWatcherEnabled="false" fsWatcherDelayS="10" fsWatcherTimeoutS="0" ignorePerms="false" autoNormalize="true">
|
|
<filesystemType>basic</filesystemType>
|
|
<device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" introducedBy="">
|
|
<encryptionPassword></encryptionPassword>
|
|
</device>
|
|
<device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy="">
|
|
<encryptionPassword></encryptionPassword>
|
|
</device>
|
|
<minDiskFree unit="%">1</minDiskFree>
|
|
<versioning>
|
|
<cleanupIntervalS>3600</cleanupIntervalS>
|
|
<fsPath></fsPath>
|
|
<fsType>basic</fsType>
|
|
</versioning>
|
|
<copiers>8</copiers>
|
|
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
|
|
<hashers>0</hashers>
|
|
<order>random</order>
|
|
<ignoreDelete>false</ignoreDelete>
|
|
<scanProgressIntervalS>0</scanProgressIntervalS>
|
|
<pullerPauseS>0</pullerPauseS>
|
|
<pullerDelayS>1</pullerDelayS>
|
|
<maxConflicts>-1</maxConflicts>
|
|
<disableSparseFiles>false</disableSparseFiles>
|
|
<paused>false</paused>
|
|
<markerName>.stfolder</markerName>
|
|
<copyOwnershipFromParent>false</copyOwnershipFromParent>
|
|
<modTimeWindowS>0</modTimeWindowS>
|
|
<maxConcurrentWrites>8</maxConcurrentWrites>
|
|
<disableFsync>false</disableFsync>
|
|
<blockPullOrder>standard</blockPullOrder>
|
|
<copyRangeMethod>standard</copyRangeMethod>
|
|
<caseSensitiveFS>true</caseSensitiveFS>
|
|
<junctionsAsDirs>true</junctionsAsDirs>
|
|
<syncOwnership>false</syncOwnership>
|
|
<sendOwnership>false</sendOwnership>
|
|
<syncXattrs>false</syncXattrs>
|
|
<sendXattrs>false</sendXattrs>
|
|
<xattrFilter>
|
|
<maxSingleEntrySize>0</maxSingleEntrySize>
|
|
<maxTotalSize>0</maxTotalSize>
|
|
</xattrFilter>
|
|
</folder>
|
|
<device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" name="s1" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
|
|
<address>tcp://127.0.0.1:22001</address>
|
|
<address>quic://127.0.0.1:22001</address>
|
|
<paused>false</paused>
|
|
<autoAcceptFolders>false</autoAcceptFolders>
|
|
<maxSendKbps>0</maxSendKbps>
|
|
<maxRecvKbps>0</maxRecvKbps>
|
|
<maxRequestKiB>0</maxRequestKiB>
|
|
<untrusted>false</untrusted>
|
|
<remoteGUIPort>0</remoteGUIPort>
|
|
<numConnections>3</numConnections>
|
|
</device>
|
|
<device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" name="s2" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
|
|
<address>tcp://127.0.0.1:22002</address>
|
|
<paused>false</paused>
|
|
<autoAcceptFolders>false</autoAcceptFolders>
|
|
<maxSendKbps>0</maxSendKbps>
|
|
<maxRecvKbps>0</maxRecvKbps>
|
|
<maxRequestKiB>0</maxRequestKiB>
|
|
<untrusted>false</untrusted>
|
|
<remoteGUIPort>0</remoteGUIPort>
|
|
<numConnections>3</numConnections>
|
|
</device>
|
|
<gui enabled="true" tls="false" sendBasicAuthPrompt="false">
|
|
<address>127.0.0.1:8082</address>
|
|
<metricsWithoutAuth>false</metricsWithoutAuth>
|
|
<apikey>abc123</apikey>
|
|
<theme>default</theme>
|
|
</gui>
|
|
<ldap></ldap>
|
|
<options>
|
|
<listenAddress>tcp://127.0.0.1:22002</listenAddress>
|
|
<listenAddress>quic://127.0.0.1:22002</listenAddress>
|
|
<globalAnnounceServer>default</globalAnnounceServer>
|
|
<globalAnnounceEnabled>false</globalAnnounceEnabled>
|
|
<localAnnounceEnabled>true</localAnnounceEnabled>
|
|
<localAnnouncePort>21027</localAnnouncePort>
|
|
<localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
|
|
<maxSendKbps>0</maxSendKbps>
|
|
<maxRecvKbps>0</maxRecvKbps>
|
|
<reconnectionIntervalS>5</reconnectionIntervalS>
|
|
<relaysEnabled>true</relaysEnabled>
|
|
<relayReconnectIntervalM>10</relayReconnectIntervalM>
|
|
<startBrowser>false</startBrowser>
|
|
<natEnabled>true</natEnabled>
|
|
<natLeaseMinutes>0</natLeaseMinutes>
|
|
<natRenewalMinutes>1</natRenewalMinutes>
|
|
<natTimeoutSeconds>10</natTimeoutSeconds>
|
|
<urAccepted>3</urAccepted>
|
|
<urSeen>2</urSeen>
|
|
<urUniqueID>x7AWqz5k</urUniqueID>
|
|
<urURL>https://data.syncthing.net/newdata</urURL>
|
|
<urPostInsecurely>false</urPostInsecurely>
|
|
<urInitialDelayS>1800</urInitialDelayS>
|
|
<autoUpgradeIntervalH>12</autoUpgradeIntervalH>
|
|
<upgradeToPreReleases>false</upgradeToPreReleases>
|
|
<keepTemporariesH>24</keepTemporariesH>
|
|
<progressUpdateIntervalS>5</progressUpdateIntervalS>
|
|
<limitBandwidthInLan>true</limitBandwidthInLan>
|
|
<minHomeDiskFree unit="%">1</minHomeDiskFree>
|
|
<releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
|
|
<overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
|
|
<tempIndexMinBlocks>10</tempIndexMinBlocks>
|
|
<trafficClass>0</trafficClass>
|
|
<setLowPriority>true</setLowPriority>
|
|
<maxFolderConcurrency>0</maxFolderConcurrency>
|
|
<crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
|
|
<crashReportingEnabled>true</crashReportingEnabled>
|
|
<stunKeepaliveStartS>180</stunKeepaliveStartS>
|
|
<stunKeepaliveMinS>20</stunKeepaliveMinS>
|
|
<stunServer>default</stunServer>
|
|
<maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
|
|
<announceLANAddresses>true</announceLANAddresses>
|
|
<sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>
|
|
<auditEnabled>false</auditEnabled>
|
|
<auditFile></auditFile>
|
|
<connectionLimitEnough>0</connectionLimitEnough>
|
|
<connectionLimitMax>0</connectionLimitMax>
|
|
<connectionPriorityTcpLan>10</connectionPriorityTcpLan>
|
|
<connectionPriorityQuicLan>20</connectionPriorityQuicLan>
|
|
<connectionPriorityTcpWan>30</connectionPriorityTcpWan>
|
|
<connectionPriorityQuicWan>40</connectionPriorityQuicWan>
|
|
<connectionPriorityRelay>50</connectionPriorityRelay>
|
|
<connectionPriorityUpgradeThreshold>0</connectionPriorityUpgradeThreshold>
|
|
</options>
|
|
<defaults>
|
|
<folder id="" label="" path="~" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" fsWatcherTimeoutS="0" ignorePerms="false" autoNormalize="true">
|
|
<filesystemType>basic</filesystemType>
|
|
<device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy="">
|
|
<encryptionPassword></encryptionPassword>
|
|
</device>
|
|
<minDiskFree unit="%">1</minDiskFree>
|
|
<versioning>
|
|
<cleanupIntervalS>3600</cleanupIntervalS>
|
|
<fsPath></fsPath>
|
|
<fsType>basic</fsType>
|
|
</versioning>
|
|
<copiers>0</copiers>
|
|
<pullerMaxPendingKiB>0</pullerMaxPendingKiB>
|
|
<hashers>0</hashers>
|
|
<order>random</order>
|
|
<ignoreDelete>false</ignoreDelete>
|
|
<scanProgressIntervalS>0</scanProgressIntervalS>
|
|
<pullerPauseS>0</pullerPauseS>
|
|
<pullerDelayS>1</pullerDelayS>
|
|
<maxConflicts>10</maxConflicts>
|
|
<disableSparseFiles>false</disableSparseFiles>
|
|
<paused>false</paused>
|
|
<markerName>.stfolder</markerName>
|
|
<copyOwnershipFromParent>false</copyOwnershipFromParent>
|
|
<modTimeWindowS>0</modTimeWindowS>
|
|
<maxConcurrentWrites>16</maxConcurrentWrites>
|
|
<disableFsync>false</disableFsync>
|
|
<blockPullOrder>standard</blockPullOrder>
|
|
<copyRangeMethod>standard</copyRangeMethod>
|
|
<caseSensitiveFS>false</caseSensitiveFS>
|
|
<junctionsAsDirs>false</junctionsAsDirs>
|
|
<syncOwnership>false</syncOwnership>
|
|
<sendOwnership>false</sendOwnership>
|
|
<syncXattrs>false</syncXattrs>
|
|
<sendXattrs>false</sendXattrs>
|
|
<xattrFilter>
|
|
<maxSingleEntrySize>1024</maxSingleEntrySize>
|
|
<maxTotalSize>4096</maxTotalSize>
|
|
</xattrFilter>
|
|
</folder>
|
|
<device id="" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
|
|
<address>dynamic</address>
|
|
<paused>false</paused>
|
|
<autoAcceptFolders>false</autoAcceptFolders>
|
|
<maxSendKbps>0</maxSendKbps>
|
|
<maxRecvKbps>0</maxRecvKbps>
|
|
<maxRequestKiB>0</maxRequestKiB>
|
|
<untrusted>false</untrusted>
|
|
<remoteGUIPort>0</remoteGUIPort>
|
|
<numConnections>3</numConnections>
|
|
</device>
|
|
<ignores></ignores>
|
|
</defaults>
|
|
</configuration>
|