How to limit writing speed?

The JuiceFS has strong writing performance due to the multiple concurrent connections that it makes when writing data to the object store(default is 50 connections). If the network bandwidth of your machine on which is the JuiceFS is mounted is insufficient when you’re writing large data to the JuiceFS quickly, you could add a parameter –max-uploads for the concurrent connections to limit the writing speed.

$ sudo ./juicefs mount NAME-OF-JUICEFS MOUNTPONT --max-uploads=5

Besides,you can also use the parameter –upload-limit to limit the bandwidth used for uploading data (Mbps) to precisely limit the writing speed. For example, limit the upload speed to 10Mbps:

$ sudo ./juicefs mount NAME-OF-JUICEFS MOUNTPONT --upload-limit=10

Because the JuiceFS automatically compresses files when they are written to the object store, the actual network bandwidth usage is less than the file writing speed. You could use nethogs to see how each process uses the network.

$ nethogs