I just migrated one windows machine from 1.30 to 2.02
This machine is sharing a 1.5TB folder with a NAS on the same LAN (receive only).
As syncthing was installed in synctrayzor v1, I took the opportunity to uninstall everything. So I did not run the db migration: I reinstalled syncthing 2.0, restored the config files and let the service do the first scan by itself. This is not the first time I use this strategy, as in the past I occasionally had issues with the db, and the simplest fix was to nuke the db and restart with a âfirst scanâ, which was generally complete overnight.
However now it seems to take forever (the expected time is currently 5 days).
Is this expected?
Is there any config setting to speed this up?
Note that the computer is not doing anything else, syncthing uses only 3-5% of CPU. in particular, nobody is touching the files, neither on the PC nor on the NAS.
I have the same feeling. It is much much slower than previous syncthing version. I did exactly the same - instead of hoping that migration works I started everything from scratch. And as you I did it few times in the past to solve some issues.
It is not very scientific as I do not have exact measurements but it is noticeably slower.
What is your storage type? Is the database located on an SSD or an HDD?
Iâve been running Syncthing v2 on many devices since the beginning of its development, including very weak hardware, but for me performance-wise it seems at least on par with the v1 line, if not faster. This is all on SSDs or other types of flash storage though.
both the db and the files are on a very large traditional drive (internal). but irrespective of the actual setup, what Iâm saying is that syncthing 1.x used to be able to complete the first boot roughly overnight, while 2.x looks about 6-7 times slower.
note also that the folder contains ~50% large files and ~50% very small (think large=20Mb and small=1Kb), and since hashing small files may be slower, maybe itâs just the prediction that is wrong.
Yeah, I havenât done any actual benchmarks, but I do feel that the v2 database is heavier on the storage side, and if the storage is slow, you will experience bottlenecks.
I never said my disk is slow, I said itâs a spinning disk
Update: syncthing 2 is definitely much slower, itâs not just the prediction.
The local state is currently about 0.5TB (so 1/3 of the total); the estimated time left continuously varies between 2d and 30d more or less randomly⌠Iâm likely going back to 1.3, unless someone tells me there is a workaround
p.s.: the new database at the moment has the same size that the previous had after all the sync was done. Is this also expected?
For slow 2.0 instances it might also be relevant to know where the database is located (i.e. on an HDD or SSD? on the same HDD as the files or another?)
As for myself, I have no issues whatsoever on my MacBook (M1 Max) nor any of the iOS devices I test with. I do have a Synology RS422+ NAS that slowed down badly with 2.0. It doesnât seem to be related to CPU usage, swapping or memory usage, just slow I/O (scanner activity seems to be blocking the database?). Both the database as well as the files themselves are on rather slow HDDs (the database is on a mirror volume). I will be changing those out later for a faster HDD (for the files) as well as an SSD (for the database) and will report back whether that improves things.
Another update. yesterday at about 10pm I reverted syncthing.exe to 1.30 and it completed the sync in 7h 15m (taken from the log). As I said previously, âcompleted the syncâ means that no file was transferred, just the db was recreated.
I randomly looked at the screen in the first hour and the prediction of time left was always correct in order of magnitude (and not wildly oscillating between 2d and 2yearsâŚ), I think it started at 10hrs left.
For the curious, the drive is a seagate barracuda 2tb, 5400rpm.
Final note: when I stopped syncthing2.02, the db size was 1.2GB and sync was ~ 30% done. syncthing1.30 final db is 560MB.
Is everything located on this single drive? The new database is seemingly heavier on the storage side, so youâre not going to have a good experience if that is the case, especially as the drive in question is one the very slow side (i.e. weâre not talking about 15,000 rpm hard drives here).
Weâve always recommended keeping the database on an SSD, or at least on a separate drive, as otherwise the spinning disk will get boggled down with constant reading and writing at the same time.
@m.holmes Could you specify the hardware setup in a little more detail ? Is disk direct connected or via a converter like USB - Sata or directly to SATA? USB can fluctuate in transfer speed much more then SATA controller (somebody correct me if iâm wrong).
Given the available info above, youâre very likely looking at real world average throughput of around 125 MB/s (less than half of Syncthingâs 282.05 MB/s hashing performance on your Windows machine).
And with your Syncthing database on the same drive as the files being hashed, itâs a whole lot of disk thrashing. As others have already mentioned, separating Syncthingâs database from the files being synced is ideal, especially for large volumes.
You mentioned one of the folders being synced is 1.5TB, which is almost 80% of the available storage. Short term, itâd be worthwhile to check if the filesystem needs defragmenting.
Also consider if the current allocation/block size is a good fit (Iâm guessing the 2TB drive has a NTFS volume). If itâs too small, when combined with large files, results in more drive head movements on a HDD.
Iâm condensing a cumulative reply here, sorry if I miss some points
I think I mentioned the drive is an internal SATA drive. itâs NTFS and itâs sufficiently defragmented. also -let me restate- all the files are already in place, so there is no write to the disk except to the db
under the same conditions, syncthing1 is an order of magnitude faster and less erratic in predicting the time left, so irrespective of whether the disk is decent/old/appropriate/etc, I think there is a software regression.
about the setup (which is the same for v.130 and v.202), the only information I didnât mention is that this drive is not the only drive in the machine: drive C is an SSD, syncthing.exe is installed on C, its db folder is on D and the files to be synced are also on D. the âhashing performance 300MB/sâ might come from either C (which would be practically wrong) or D. however, I would bet itâs not really relevant, as itâs the same for v.130 and v.202
this computer is my workstation -not a dedicated server- so usually itâs being used by me. the disk is perfectly acceptable in performance in daily usage. however, I cannot keep the machine down forever to experiment, I will most definitely retry installing v.20x in the future but not right now. Anyway, if anyone wants to investigate, it should not be hard to replicate the experiment.
one point that was unanswered in the thread is about the db size.
when I stopped syncthing2.02, the db size was 1.2GB and sync was ~ 30% done. syncthing1.30 final db is 560MB.
Thereâs no real need to evaluate anything further then: You need to move the DB onto the SSD for decent performance. Anything else youâll do will pale in comparison for this change. And thatâs true in version 1 and 2. I understand that this is a regression for you, but rest assured there are reasons the change was made (and it wasnât performance).
The new DB is known to use more space. It is also known to grow under heavy write load and shrinking later.
I have made the exact same experience. On devices with SSD/flash storage there are no issues. Even under Android. On my server with the DB and data being scanned on the same HDD the scans and also the synchronization was notably slower. So I investigated the situation and noticed that one of my HDDs was in progress of dying. This was not the one with the Syncthing DB and also only one Syncthing folder was on it. So the brokenness was not the reason for the slow speeds. However, it meant that I needed to replace the HDD as fast as possible of course. So I replaced both of my HDDs and with my new SSD + HDD setup everything is quite fast again - despite the server still being quite slow CPU-wise. It really makes a difference when the Syncthing DB is on a fast SSD or at least not on the same slow HDD than the data to be synced/scanned (even if many Syncthing folders are still on an HDD).
This sounds interesting. I guess Iâll check that out myself, too.
Under Linux Iâd just systemctl edit the Syncthing unit so no other apps are affected.