Sending many small files performance problem

I have 3 computers syncing 1.2M files right now on a 400Mbps LAN and the up/down speed of all three computers is around 5KiB/sec. I already went through the performance page trying to fix this and no luck. All three computers are running latest MacOS and have lots of free memory and CPU (nothing is constrained). Is this normal? Thanks!

BTW, a feature idea to help people with this kind of thing: simplify performance tuning by allowing the user to select some presets “optimize for resource use”, “optimize for performance”, “standard values for your system”, etc. This would help to ensure that people get a reasonable set of values to start with, and also they can be sure they can reset things if they make a mistake.

Jon

P.S. I have now tried shutting down one of the computers and double checking the memory, cpu, disk and network resources and nothing is constrained. Perhaps I have some bad setting?

There are still quite a few variables in play, so it would help to see screenshots from Syncthing’s web UI of the remote device panel from each Mac.

If the local firewall is enabled, Syncthing might be trying to use a Syncthing relay because it cannot directly connect to another paired device via the LAN.

1 Like

There was one firewall on. I shut it off and explicitly disabled relaying in the settings/connections (for all three machines).

update: i removed 1.2M files and things sped up to about 10-20KiB/s. maybe it’s just the sheer number of files. however, i also notice that some devices have only 1 connection even though i specified 20-50 connections.

Please check https://forum.syncthing.net/t/how-to-sync-files-in-parallel/20968. Increasing the number of connections probably won’t do anything when it comes to small file sync performance.

1 Like

From the screenshots, the network connections look fine with only LAN connections.

For sure, the high number of small files makes tuning for optimal performance more difficult.

Are extended attributes and permissions being synced? Given your average file size, if it’s not necessary, ignoring both will help avoid a lot of additional disk I/O.

Also, what’s the storage medium and filesystem?

Have you run any network tests to verify that there isn’t an issue with the LAN itself?

I recommend downloading and using the iperf network bandwidth test program on each computer so you can test the maximum throughput that you can get from one machine to the other using a standardized test program.

It comes in a command line format and you run it on two machines one is the server and one is the client and then you can reverse them.

You can download iperf here.

The network bandwidth is usually irrelevant for many small files. It boils down to transactions per second towards the disk and database. If you trust your systems to remain up for the duration of the sync, disabling fsync in the advanced options may help a bit.

It’s not quite that simple, but there is some guidance along those lines: Configuration Tuning — Syncthing documentation

1 Like

I understand.

I just like to be sure that there is nothing unrelated to Syncthing causing transfer issues. This test will either confirm there’s nothing wrong with the network connections, or it will expose a problem unrelated to Syncthing.

The test covers the speed of transfers. (Last column in pic.)

It only takes a few minutes to run the tests.

It will be fsync that kills you. You risk at data corruption disabling it however.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.