Start9Labs / syncthing-startos

Mozilla Public License 2.0
2 stars 4 forks source link

[feat]: Make syncthing run nicer #29

Open gStart9 opened 1 year ago

gStart9 commented 1 year ago

Prerequisites

Describe the Feature Request

We have a user who reports that his Embassy Pro:

fan spins up for about 45 seconds, fluctuating between two speeds, then spins down to an inaudible level for about 15 seconds, then starts another cycle.

I’m syncing three Macs via Synthing to my Embassy Pro.

When syncthing is on, I could see 2 cores spike to 100% cpu usage, then drop out, then spike back. When we stop the syncthing service, the fan oscillation goes away and it becomes inaudible.

Given that he's syncing 3 Macs, it may be that syncthing just takes too much resources and spins his fan up to unacceptably annoying levels every ~1 minute.

Describe the Use Case

We can probably make a heavily used syncthing process be less cpu or disk intensive.

Describe Preferred Solution

We can probably either add:

nice -n 19 before the invokation of syncthing to give it the lowest amount of processor priority

OR, if it's a disk io issue that's the real root of the problem,

ionice -c 3

One of the two of these or both should probably work.

Describe Alternatives

An alternative might be if we could permanently change the fan speed profile via userland or in the bios.

Anything else?

I will test my pro with syncthing to reproduce this issue.

Blu-J commented 1 year ago

Summary of Understanding: I uses 2/8 cores at 100% (it dares to use the system /s).

Can't effectively use suggestions because of docker.

Dumb Possible Solutions:

  1. Not have the program do anything/ Uninstall?
  2. Set the fan to 100% all the time
  3. Solve that doing any work makes heat (2nd law of thermodynamics)

Joking aside, I don't see any real practical solutions for fixing right away or a service itself. The only thing new is the idea of limiting the disk io which I don't know if the EOS does. But all the solutions would have to be be from the eos side, and I suggest that we close for that.

Possible EOS solutions: Setting per service the cpu/ ram/ and io per service to something custom?

k0gen commented 4 months ago

@gStart9 , could you please check this against the latest version? Thanks!