mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-19 16:15:07 +00:00
We set the scheduler wakeup granularity to 500usec, because that is the difference in runtime we want to see from a waking task before it preempts the running task (which will usually be Scylla). Scheduling other processes less often is usually good for Scylla, but in this case, one of the "other processes" is also a Scylla thread, the one we have been using for marking ticks after we have abandoned signals. However, there is an artifact from the Linux scheduler that causes those preemption to be missed if the wakeup granularity is exactly twice as small as the sched_latency. Our sched_latency is set to 1ms, which represents the maximum time period in which we will run all runnable tasks. We want to keep the sched_latency at 1ms, so we will reduce the wakeup granularity so to something slightly lower than 500usec, to make sure that such artifact won't affect the scheduler calculations. 499.99usec will do - according to my tests, but we will reduce it to a round number. Signed-off-by: Glauber Costa <glauber@scylladb.com> Message-Id: <20170427135039.8350-1-glauber@scylladb.com>