aboutsummaryrefslogtreecommitdiffstats
path: root/src/bindfs.1
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2014-06-30 22:50:14 +0100
committerMartin Pärtel <martin.partel@gmail.com>2014-06-30 22:50:14 +0100
commit9bf3ec8cd48c835e02ff96cd97d1581b2f9ba5b3 (patch)
tree05e8bfc74fdb13c1724991e3ee57308c7cf4a9a7 /src/bindfs.1
parent3f7daee57d1e57ef522447fd601805971bb358c8 (diff)
downloadbindfs-9bf3ec8cd48c835e02ff96cd97d1581b2f9ba5b3.tar.gz
Implemented rate limiter.
Fixes #12.
Diffstat (limited to 'src/bindfs.1')
-rw-r--r--src/bindfs.124
1 files changed, 24 insertions, 0 deletions
diff --git a/src/bindfs.1 b/src/bindfs.1
index b183a78..8ed5d2f 100644
--- a/src/bindfs.1
+++ b/src/bindfs.1
@@ -204,6 +204,23 @@ The read/write permissions are checked against the (possibly modified)
file permissions inside the mount.
+.SH RATE LIMITS
+Reads and writes through the mount point can be throttled. Throttling works
+by sleeping the required amount of time on each read or write request.
+Throttling imposes one global limit on all readers/writers as opposed to a
+per-process or per-user limit.
+
+Currently, the implementation is not entirely fair. See \fB\%BUGS\fP below.
+
+.TP
+.B \-\-read\-rate=\fIN\fP, \-o read\-rate=\fIN\fP
+Allow at most \fIN\fP bytes per second to be read. \fIN\fP may have one of the
+following (1024-based) suffixes: \fBk\fP, \fBM\fP, \fBG\fP, \fBT\fP.
+
+.TP
+.B \-\-write\-rate=\fIN\fP, \-o write\-rate=\fIN\fP
+Same as above, but for writes.
+
.SH MISCELLANEOUS OPTIONS
.TP
@@ -375,6 +392,13 @@ This may constitute a security risk if you rely on bindfs to reduce
permissions on new files. For this reason, as of version 1.11
bindfs runs in single-threaded mode by default.
+Rate limiting favors the process with the larger block size.
+If two processes compete for read/write access, the one whose read()/write()
+calls specify the larger block size gets to read/write faster.
+The total rate limit is maintained though, and clients with equal block sizes
+and a similar rate of requests are treated fairly as long as the kernel orders
+their requests fairly.
+
Please report bugs and/or send pull requests to
\fBhttps://github.com/mpartel/bindfs/issues\fP.