Displaying 2 results from an estimated 2 matches for "rate_debug_bucket".
2019 Mar 05
0
[PATCH nbdkit] Add new filter for rate-limiting connections.
...+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <inttypes.h>
+#include <string.h>
+#include <time.h>
+#include <sys/time.h>
+
+#include <nbdkit-filter.h>
+
+#include "minmax.h"
+
+#include "bucket.h"
+
+int rate_debug_bucket; /* -D rate.bucket=1 */
+
+void
+init_bucket (struct bucket *bucket, uint64_t rate, double capacity)
+{
+ bucket->rate = rate;
+
+ /* Capacity is expressed in seconds, but we want to know the
+ * capacity in tokens, so multiply by the rate to get this.
+ */
+ bucket->capacity...
2019 Mar 05
2
[PATCH nbdkit] Add new filter for rate-limiting connections.
For virt-v2v we have been discussing how to limit network bandwidth.
The initial discussion has been around how to use cgroups to do this
limiting, and that is still probably what we will go with in the end.
However this patch gives us another possibility for certain virt-v2v
inputs, especially VDDK. We could apply a filter on top of the nbdkit
plugin which limits the rate at which it copies