By default grive installation from github, upload & download speed parameters would not work even if you pass
-U 50 or -D 50 , grive will use max upload / download bandwidth of your system.
Grive is using
CURL under its hood for file transmission and there is parameter in curl which can control bandwidth while transmission i.e
(curl_off_t) details here.
Pass a curl_off_t as parameter with the maxspeed. If an upload exceeds
this speed (counted in bytes per second) the transfer will pause to
keep the speed less than or equal to the parameter value. Defaults to
There is file named grive/libgrive/src/http/CurlAgent.cc in source code which contains
CURLOPT_MAX_SEND_SPEED_LARGE with mMaxUpload
as option for upload, mMaxUpload is the value in kbps which set by using grive with
-U 50 and
CURLOPT_MAX_RECV_SPEED_LARGE with mMaxDownload
as option for download, mMaxDownload is the value in kbps which set by using grive with
to control bandwidth just add
static_cast<curl_off_t>( mMaxUpload ) instead of only
static_cast<curl_off_t>( mMaxDownload ) instead of only
mMaxDownload in above file & save it.
After saving file, compile the source code & run it as described in repository & after successful compilation you can now set upload & download bandwidth by
-U 50 / -D 50 where 50 is kbps.