Page 1 of 1

How to limit bandwidth (solved for Linux)

Posted: Sun Dec 01, 2019 11:45 am
by Markus_Laker
I have a fast machine and no data cap, but my Internet connection is slow. Every time FAH completes a work unit (which takes between 45 and two hours), FAH soaks up my Internet bandwidth, and it becomes impossible to stream music or use Skype. Is there a way to throttle FAH so that it uploads and downloads more slowly?

I'm running Fedora 30. My current ideas are (a) to run FAH inside a KVM/QEMU VM, use the network throttling built into libvirt, and manually renice the VM every time I start it, or (b) work out how to use the Squid proxy, configure throttling there, and tell FAH to use that. But those are both cumbersome approaches, and I'd prefer to use a simple throttling option built into the FAH client if it has one.

Thanks!

Markus

Re: How to limit bandwidth

Posted: Sun Dec 01, 2019 2:28 pm
by Joe_H
The folding client does not have throttling built in, so you will need to use another solution. That could be router based. If you are doing GPU folding, not all VM setups provide adequate access to the GPU for the client to fold.

Re: How to limit bandwidth

Posted: Sun Dec 01, 2019 7:48 pm
by Markus_Laker
Thanks, Joe. I'm afraid my router isn't that clever. Useful tip about GPU folding in VMs, though -- thanks for that.

I've come up with a third possible solution, which is to use `trickle'. I've installed the `trickle' package (for Fedora, that's `sudo dnf install trickle') and modified the two $EXEC lines in /etc/rc.d/init.d/FAHClient to say

/usr/bin/trickle -s -d 256 -u 12 $EXEC $OPTS >/dev/null 2>/dev/null &

and

/usr/bin/trickle -s -d 256 -u 12 $EXEC $OPTS &

It's a total hack, but it's a zero-maintenance, low-overhead solution -- I won't need to build, run up or manage a VM or set up Squid.

I'll mark this question as solved in a few days if I don't see any more buffering problems with streaming music.

Re: How to limit bandwidth

Posted: Mon Dec 02, 2019 1:07 pm
by rwh202
Yep, trickle worked for me too - however, I just changed the 'local client command' in FAHControl to add an upload limit: "trickle -u 20 FAHClient"

Re: How to limit bandwidth

Posted: Wed Dec 11, 2019 12:06 am
by Markus_Laker
I did find that slowing down my uploads reduced my daily score from about 210kPPD to 190kPPD. So now I need to find the highest upload bandwidth that doesn't cause problems for streaming and video calls.