Lots of files: high cpu load, slow transfer rate

Hi there,

i have set up syncthing to sync a huge amount of files. Its one folder tree with nearly half a million files. One of the machines is a linux server with a core i7 at 2.7GHz and the second machine is a win8.1, i7 3.4GHz quadcore.

On the linux machine, synchting eats all available CPU time (load avg 15.00) and on the desktop its eating between 15% and 35% (which is between one and two cores). Had to renice it to +20 on linux as it causes the CPU to go up to 100°C and more, but that didnt help.

This alone wouldnt be a huge problem, but the transfer rate is at 40 KiB/s or less now for unknown reason. Restarting the clients wouldnt raise it at all. Before everything was indexed, the transfer rate was somewhere at 1-2 MiB/s iirc. Had 7GiB transferred within one or two hours. Now as the server has finished indexing, transfer rate is as slow as ISDN.

Folder rescan interval is set to 60000 already.

So my guess: the code is busy with going though the huge index list for every block being transferred, or something like that.

Can you confirm that issue, or do you need some more input?

ps aux says: root 18629 237 2.5 799600 206052 pts/1 Dl+ 03:34 1416:54 ./syncthing

linux report: { “folderMaxFiles”: 459637, “folderMaxMiB”: 238326, “longVersion”: “syncthing v0.10.30 (go1.4.2 linux-386 default) unknown-user@syncthing-builder 2015-03-29 07:46:44 UTC”, “memorySize”: 7995, “memoryUsageMiB”: 203, “numDevices”: 2, “numFolders”: 1, “platform”: “linux-386”, “sha256Perf”: 107.95, “totFiles”: 459637, “totMiB”: 238326, “uniqueID”: “”, “version”: “v0.10.30” }

windows report: { “folderMaxFiles”: 756969, “folderMaxMiB”: 254109, “longVersion”: “syncthing v0.10.30 (go1.4.2 windows-amd64 default) unknown-user@syncthing-builder 2015-03-29 07:46:44 UTC”, “memorySize”: 16366, “memoryUsageMiB”: 257, “numDevices”: 2, “numFolders”: 2, “platform”: “windows-amd64”, “sha256Perf”: 114.72, “totFiles”: 756987, “totMiB”: 254166, “uniqueID”: “”, “version”: “v0.10.30” }

BR, g3gg0

Keep the web ui closed, or try the beta, that should help.

thanks, will try :smile:

BR, g3gg0

One bottle neck is that there will be a database transaction per synced file, on the receiving side. For many small files, this’ll be more expensive than the syncing itself. There’s a ticket for this somewhere, it could probably be improved fairly easily…