Skip to main content

How to limit writing speed?

The JuiceFS has extreme writing performance thanks to the utilization of concurrent connections (default value is 50) when writing data to the object storage. Therefore, it\'s likely to occupy the full network bandwidth of internet connection when writing a mass of files rapidly in poor bandwidth machine. But don\'t worry, we can use the parameter --max-uploads <mount>{.interpreted-text role="ref"} when mounting JuiceFS to specify the maximum concurrent connections and accordingly limit the writing speed.

$ sudo juicefs mount $VOL_NAME $MOUNTPONT --max-uploads=5

Besides, we can also use the parameter --upload-limit <mount>{.interpreted-text role="ref"} to limit the upload bandwidth quota (Mbps) to a specific value. Let\'s say, limit the upload speed to 10Mbps:

$ sudo juicefs mount $VOL_NAME $MOUNTPONT --upload-limit=10

When writing files to object storage, the network bandwidth usage will lower than the write speed since JuiceFS would compress it ahead. You can inspect the network usage per process by using the nethogs tool.

$ nethogs