Linux - only one core being used

Linux Mint Mate 17.3, ASUS Q533 laptop, i7 processor with 4 cores. Syncthing v0.12.24, also syncthing-GTK v0.8.3. I am syncing to folders on another Linux Mint Mate with 16 cores.

I am starting to sync 100 GB of files. I am 10% done. Only 1 of 4 possible cores are being used. I would like at least 3 of them to be processing during this initial sync. I set my “Startup applications” to include GOMAXPROCS just to see if that would make a difference. Still only 1 processor being used. Here is my startup script:

/usr/bin/syncthing -no-browser -GOMAXPROCS=2 -home="/home/tech/.config/syncthing"

I am thinking that there may be something wrong with my syncthing installation or settings, on both laptops. I may have corrupted something along the line by playing with various settings. I vaguely remember setting something, somewhere to use only 1 core but I’m not sure when or where that was.

I have one other laptop that is syncing a different set of folders and it also has the same problem. This problem occurs whether the laptops are on the LAN with the originating folders, or at a remote location.

Can you think of anything to try?

I have thought about uninstalling Syncthing and Syncthing-GTK, removing all configurations, then reinstalling them. Can I keep the two synced folders and the .stfolder for each when I do that? Or should I get rid of the .stfolder on the machine that is not fully synced? Do I have to start my syncing all over by deleting the existing folders along with the .stfolder?

Thanks in advance. John in Oregon

GOMAXPROCS is an environment variable, not a command line variable. It tries to use all cores by default, unless it’s sure it doesn’t need to.

Okay, I’ll remove the GOMAXPROCS from my command line.

How is it set as an environment variable?. I didn’t see it in the ~/.config/syncthing/config.xml file. Is something I have to add to /config.xml?

Thanks for helping.

Look up the bash export command. It will be helpful to you.

I assume you mean Syncthing uses all core by default. I have no idea what GOMAXPROCS does.

@oregonjohn if you have been playing in the advanced settings have a look at calmh’s first response in this thread:

When manually staring syncthing, setting the environment variable would be:

GOMAXPROCS=2 /usr/bin/syncthing -no-browser -home="/home/tech/.config/syncthing"

It depends on what it’s doing, too. Hashing (when scanning) will use more than one core - by default all of them (on Linux). If transferring data and the bottle neck is the TLS crypto, that’s not parallelizable so one core is all it can use. Other things fall somewhere in between those in the spectrum…

1 Like

Thank you all for your help. I learned a lot. I also learned while troubleshooting that my problem was from an errant VPN that was using 100% of one cpu. Once I got rid of that problem Syncthing showed it was sharing the cpu’s properly and the syncing increased in speed.

What I learned was to research the cause of 100% cpu usage, rather than assume it was the latest program I installed.

Thanks again. John from Oregon.

2 Likes

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