Hmm, I’ll try try doing some actual testing then, and if I can reproduce the GUI slowness reliably, I will definitely come back with some profiles.
In the meantime, I’ve also observed that for some reason it takes extremely long time to rename directories and sync changes after doing so. For example, I’ve got a three device (instance) setup. Two of them run Syncthing v2 (beta5) and the last one runs Syncthing v1. On the first of the v2 instances, I renamed a directory containing 97,019 files and 16,374 directories. The rename synced to the last instance running Syncthing v1 in about an hour.
The problem is that when it comes to the other instance running Syncthing v2, after the same amount of time, the sync is still in progress, and it is moving extremely slowly.
This is what the current state looks like:
The number of “Out of Sync Items” does keep decreasing, but it seems to happen in bursts, decreasing only by a few hundred items per minute. At this pace, it looks like the process is going to take days to finish
.
This is all tested on very fast hardware, so there’re no other bottlenecks in place.
Edit 1
The number of “Out of Sync Items” has decreased by 20,000 from 157,000 to 137,000 in 3 hours time, so if the estimation is correct, the sync is going to take ~20 hours to finish. This is just a test set of data, so I’m cancelling the whole thing now. I’ll try to reproduce the issue with a smaller set, possibly without any private filenames, so that I can share the logs too.
Edit 2
Not sure if this is the culprit, but I’ve found out that with the new database, it takes much longer to process file deletions.
- Create an new directory with 100,000 empty files.
- Let Syncthing add them to the database. This seems to take the same amount of time when both using SQLite and LevelDB.
- Delete the newly created directory.
- With LevelDB, it took 1m 35s to process the deletion.
- With SQLite, the same process took 3m 40s.
