-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: SSD_SCHEDULER env variable for start-stop-daemon #657
Comments
(found this while Googling stuffs relating to this) A little correction if its ok, don't you mean..
Note: Help information is from start-stop-daemon OpenRC version 0.53 |
Thanks for your comments. I meant, as you guessed, CPU scheduler and not IO scheduler. It is possible to use Perhaps something like this inserted at row 381? // Handle SSD_CPUSCHEDULER for scheduler type
if ((tmp = getenv("SSD_CPUSCHEDULER"))) {
scheduler = strdup(tmp);
}
// Handle SSD_CPUSCHEDULER_PRIO for scheduler priority
if ((tmp = getenv("SSD_CPUSCHEDULER_PRIO"))) {
if (sscanf(tmp, "%d", &sched_prio) != 1) {
eerror("%s: invalid scheduler priority `%s' (SSD_CPUSCHEDULER_PRIO)",
applet, tmp);
}
} Testing it.. # SSD_CPUSCHEDULER="batch" start-stop-daemon ls
Manifest files metadata.xml openrc-0.53.ebuild
# SSD_CPUSCHEDULER="foobar" start-stop-daemon ls
* Unknown scheduler: foobar
* start-stop-daemon: failed to start `ls' |
Yes and I suggest that more specific |
If I'm not mistaken, While SSD could make users aware of this by printing a warning, little else is gained by hard coding checks. What if the kernel adds or changes schedulers and we have hardcoded these options? https://www.kernel.org/doc/html/latest/scheduler/sched-design-CFS.html |
I think we should have the env variable
SSD_SCHEDULER
, similar toSSD_IONICELEVEL
andSSD_NICELEVEL
.It is currently possible to use
start_stop_daemon_args="--scheduler xxxx
, but it would be more coherent to use the SSD_ style variable.I'm currently involved with a new init.d script for a service that is very IO heavy, and letting users select
idle
orbatch
via conf.d would be great. Implementing the env variable would be much better than a service-specific option.The text was updated successfully, but these errors were encountered: