trickle does not limit the bandwidth of gsutil

2.5k views Asked by At

I have tried to copy a .mp4 file from my local directory to my google cloud bucket, using:

gsutil cp my_filefile.mp4 gs://my_bucket

This part works as expected, but when i try to limit the bandwidth, using:

trickle -d 10 -u 10 gsutil cp my_filefile.mp4 gs://my_bucket

the uploading happens at the same rate, and not with 10 kb/s. I have read that trickle does not handle static executable files, which the .mp4 appears to be since when running ldd my_file.mp4, in the terminal, it returns not a dynamic executable.

Has anyone experienced the same issue, and if that is the case, how was the problem handled, or am i approaching this issue the wrong way?

UPDATE 1: Turns out it does not matter what file i use. gsutil still bypasses trickle somehow. I have tested to see if trickle worked with other programs, and it performed as expected, with bandwidth control. I have also tested gsutil mv and gsutil rsync, with the same results, as with cp. I have also tested the bandwidth throttling on an arm64 system, with the same results.

1

There are 1 answers

4
guillaume blaquiere On

You should limit the number of thread and process as described in the documentation. Trickle shouldn't been applied in case of multi process.

trickle -d 10 -u 10 gsutil -o "GSUtil:parallel_process_count=1" \
  -o "GSUtil:parallel_thread_count=1" cp my_filefile.mp4  gs://my_bucket