5

I'm trying to limit UPLOAD rates on my machine to 1 or 2 MB, It bottles at around 10 so want to make sure there is enough left over.

I've tried within my script to call my command with trickle limits:

/usr/bin/trickle -s -u 1000 -d 1000 acd_cli upload --remove-source-files /Store/

It does run the upload, but runs at around 11 MB/s.

I tried setting DAEMON limits, hoping this would limit all uploads across the entire machine to a max of 2 MB/s

trickled -u 2000

Having run my script again with this in place, with and without the program specific trickle options in the script, the same happens, it simply sits at 11.3 MB/s.

Any ideas?

Tarley
  • 51

1 Answers1

1

manage bandwidth using trickle

Check out this link.

With this command, the following parameters we want to manipulate

-s - standalone mode -u - upload rate

-w - window length

Additionally, to see the progress chose -v - verbose

trickle -s -u 100 -w 10 scp ./somelarge local file dajavex@myip:/home/dajavex/mytofile

After I enter my password the process starts. the parameters I ran -sv, provide these results at first, and then lower as time progresses. (see the last line is the section from SCP)

scp: [trickle] avg: 0.20 KB/s; win: 0.20 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 1.83 KB/s; win: 1.83 KB/s
scp: [trickle] avg: 1.83 KB/s; win: 1.60 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 15614.54 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 15613.25 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 6242.80 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 4024.28 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 3032.70 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 2382.57 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 1903.49 KB/s
scp: [trickle] avg: 0.23 KB/s; win: 0.23 KB/s
scp: [trickle] avg: 3.46 KB/s; win: 1628.55 KB/s


                                            0% 2208KB   2.2MB/s   05:13 ETAs

The file I started with is approximately 700 MB. As the file uploaded the transfer rate slowed, as shown:

scp: [trickle] avg: 87.71 KB/s; win: 3214085.75 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214084.41 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214082.28 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214079.73 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214077.85 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214076.45 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214075.61 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.71 KB/s; win: 3214074.61 KB/s
scp: [trickle] avg: 0.5 KB/s; win: 0.5 KB/s
scp: [trickle] avg: 87.70 KB/s; win: 3214074.59 KB/s
                                            1% 8864KB 104.0KB/s 1:49:51 ETAs

SCP estimated the time to transfer file inhouse from one server to another to be approximately 1 hr 49 minutes 51 seconds.

The window (-w) is what should be permitted +/- kb variance in either direction.

-t = time in seconds for smoothing

-l = lenth of packets for smoothing

So I would try the following:

/usr/bin/trickle -s -u 1000 -d 1000 -w 1000 -t 5 -l 500 acd_cli upload --remove-source-files /Store/
dajavex71
  • 474