tune.runqueue-depth <number>
Sets the maximum amount of task that can be processed at once when running
- tasks. The default value depends on the number of threads but sits between 35
- and 280, which tend to show the highest request rates and lowest latencies.
- Increasing it may incur latency when dealing with I/Os, making it too small
- can incur extra overhead. Higher thread counts benefit from lower values.
- When experimenting with much larger values, it may be useful to also enable
- tune.sched.low-latency and possibly tune.fd.edge-triggered to limit the
- maximum latency to the lowest possible.
+ tasks. The default value is 280, which tends to show high request rates and
+ low latencies. Increasing it may incur latency when dealing with I/Os, making
+ it too small can incur extra overhead. When experimenting with much larger
+ values, it may be useful to also enable tune.sched.low-latency and possibly
+ tune.fd.edge-triggered to limit the maximum latency to the lowest possible.
tune.sched.low-latency { on | off }
Enables ('on') or disables ('off') the low-latency task scheduler. By default
#endif
// The base max number of tasks to run at once to be used when not set by
-// tune.runqueue-depth. It will automatically be divided by the square root
-// of the number of threads for better fairness. As such, 64 threads will
-// use 35 and a single thread will use 280.
+// tune.runqueue-depth.
#ifndef RUNQUEUE_DEPTH
#define RUNQUEUE_DEPTH 280
#endif
if (global.tune.max_rules_at_once <= 0)
global.tune.max_rules_at_once = MAX_RULES_AT_ONCE;
- if (global.tune.runqueue_depth <= 0) {
- /* tests on various thread counts from 1 to 64 have shown an
- * optimal queue depth following roughly 1/sqrt(threads).
- */
- int s = my_flsl(global.nbthread);
- s += (global.nbthread / s); // roughly twice the sqrt.
- global.tune.runqueue_depth = RUNQUEUE_DEPTH * 2 / s;
- }
+ if (global.tune.runqueue_depth <= 0)
+ global.tune.runqueue_depth = RUNQUEUE_DEPTH;
if (global.tune.recv_enough == 0)
global.tune.recv_enough = MIN_RECV_AT_ONCE_ENOUGH;