High CPU usage uploading on Windows

Resource monitor shows an 8.5% 60sec average that’s quite high for something communicating with a single host at slow speeds (~3Mbps). There’s no indexing going on. Libtorrent (with qBittorent as a frontend) on the other hand, connected to 83 peers and downloading from 25 of them at 10Mbps, writing to disk and managing a memory cache (as well as hashing multiple incoming pieces) hovers at around 1% average.

Is this inefficiency a due to St being written in Go as opposed to being a C/C++ program?


Please read the OP

No indexing/scanning is happening. My guess is that Go’s SHA256 implementation is not particularly optimized ( for example, hand-tuned assembly for various architectures or even basic optimization strategies).

I doubt it. Libtorrent doesn’t encrypt data sent in any meaningful manner as far as I know. Syncthing uses some fairly heavy crypto when sending data, plus compression.

For sure the Go compiler isn’t as good at optimizing as a modern C++ compiler. That’s not in question, but a. it’s comparing apples to oranges and b. it’s not something in scope for syncthing do something about.