How to limit bandwidth (solved for Linux)

Moderators: Site Moderators, FAHC Science Team

Post Reply
Markus_Laker
Posts: 20
Joined: Sun Dec 01, 2019 11:36 am

How to limit bandwidth (solved for Linux)

Post 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
Last edited by Markus_Laker on Wed Dec 11, 2019 12:07 am, edited 1 time in total.
Joe_H
Site Admin
Posts: 7870
Joined: Tue Apr 21, 2009 4:41 pm
Hardware configuration: Mac Pro 2.8 quad 12 GB smp4
MacBook Pro 2.9 i7 8 GB smp2
Location: W. MA

Re: How to limit bandwidth

Post 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.
Image

iMac 2.8 i7 12 GB smp8, Mac Pro 2.8 quad 12 GB smp6
MacBook Pro 2.9 i7 8 GB smp3
Markus_Laker
Posts: 20
Joined: Sun Dec 01, 2019 11:36 am

Re: How to limit bandwidth

Post 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.
rwh202
Posts: 425
Joined: Mon Nov 15, 2010 8:51 pm
Hardware configuration: 8x GTX 1080
3x GTX 1080 Ti
3x GTX 1060
Various other bits and pieces
Location: South Coast, UK

Re: How to limit bandwidth

Post 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"
Markus_Laker
Posts: 20
Joined: Sun Dec 01, 2019 11:36 am

Re: How to limit bandwidth

Post 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.
Post Reply