Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why do I get an error message when I try to increase the values of these two parameters:

#cat /proc/sys/kernel/sched_latency_ns
#echo 2000000000 > /proc/sys/kernel/sched_latency_ns
bash: echo: write error: Invalid argument

I get the same error when I replace sched_latency_ns by sched_min_granularity_ns.

Can someone tell me the correct way to increase these parameters.

share|improve this question

One second is the absolute maximum accepted value for that setting. Values more than 1000000000 are not valid (the number of nanoseconds in one second).

See the kernel source code

262 static int max_sched_granularity_ns = NSEC_PER_SEC;     /* 1 second */


line 294

294         {
295                 .procname       = "sched_latency_ns",
296                 .data           = &sysctl_sched_latency,
297                 .maxlen         = sizeof(unsigned int),
298                 .mode           = 0644,
299                 .proc_handler   = sched_proc_update_handler,
300                 .extra1         = &min_sched_granularity_ns,
301                 .extra2         = &max_sched_granularity_ns,
302         },

Larger and larger values have a diminishing improvement on performance. Excessively high values can cause issues. One second is already an extremely high setting.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .