You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
both supervise-daemon and start-stop-daemon have the issue.
let's say we have 5 services to stop in a script :
forservicein A B C D E ;do rc-service $service stop ;done
A takes 0.09s to stop, but after that, each of B C D E takes about 1 seconds to stop.
tested distro
alpine linux, has the issue
alpine 3.11-3.17 and current edge, aarch64 and x86_64, all have the same issue
gentoo livecd with openrc 0.45.2, does not have the issue
Gentoo livecd install-arm64-minimal-20230305T233159Z.iso with openrc 0.45.2 , but no issue. every service takes about 0.05s~0.09s to stop
it would be nice if the devs could run below test on your favorite distro and verify, thanks a lot
test script
#!/bin/sh# what is this for# well, if we stop multiple services in a script# the first one is always fast, but after that, it becomes super slow## nc is a good program to test supervise-daemon# create 5 nc daemons, listen on 5 different port# prepareecho'+++ prepare 5 nc daemons +++'echoforiin 1 2 3 4 5 ;do
cat <<EOF > /etc/init.d/supervise-daemon_$i#!/sbin/openrc-runsupervisor="supervise-daemon"command="/bin/busybox"command_args="nc -l -s 127.0.0.1 -p 3000$i"EOF
chmod +x /etc/init.d/supervise-daemon_$iecho"created /etc/init.d/supervise-daemon_$i"doneecho# measure startecho"+++ measure time to start 5 daemons +++"echoforiin 1 2 3 4 5 ;doecho"==> starting supervise-daemon_$i"time rc-service -q supervise-daemon_$i start
echodoneecho"+++ measure time to stop 5 daemons +++"echo# measure stopforiin 1 2 3 4 5 ;doecho"==> stopping supervise-daemon_$i"time rc-service -q supervise-daemon_$i stop
echodone# cleanforiin 1 2 3 4 5 ;do
rm -f /etc/init.d/supervise-daemon_$iecho"/etc/init.d/supervise-daemon_$i deleted"done
test result (on alpine linux)
+++ prepare 5 nc daemons +++
created /etc/init.d/supervise-daemon_1
created /etc/init.d/supervise-daemon_2
created /etc/init.d/supervise-daemon_3
created /etc/init.d/supervise-daemon_4
created /etc/init.d/supervise-daemon_5
+++ measure time to start 5 daemons +++
==> starting supervise-daemon_1
real 0m 0.91s
user 0m 0.43s
sys 0m 0.49s
==> starting supervise-daemon_2
real 0m 0.09s
user 0m 0.02s
sys 0m 0.04s
==> starting supervise-daemon_3
real 0m 0.08s
user 0m 0.03s
sys 0m 0.03s
==> starting supervise-daemon_4
real 0m 0.09s
user 0m 0.02s
sys 0m 0.03s
==> starting supervise-daemon_5
real 0m 0.10s
user 0m 0.03s
sys 0m 0.03s
+++ measure time to stop 5 daemons +++
==> stopping supervise-daemon_1
real 0m 0.09s
user 0m 0.03s
sys 0m 0.04s
==> stopping supervise-daemon_2
real 0m 1.00s
user 0m 0.06s
sys 0m 0.33s
==> stopping supervise-daemon_3
real 0m 1.00s
user 0m 0.09s
sys 0m 0.36s
==> stopping supervise-daemon_4
real 0m 0.99s
user 0m 0.09s
sys 0m 0.35s
==> stopping supervise-daemon_5
real 0m 1.00s
user 0m 0.08s
sys 0m 0.39s
/etc/init.d/supervise-daemon_1 deleted
/etc/init.d/supervise-daemon_2 deleted
/etc/init.d/supervise-daemon_3 deleted
/etc/init.d/supervise-daemon_4 deleted
/etc/init.d/supervise-daemon_5 deleted
note : i reported the issue on alpine aport issue, but got closed, they say it is better to report to upstream.
The text was updated successfully, but these errors were encountered:
issue
let's say we have 5 services to stop in a script :
A takes 0.09s to stop, but after that, each of B C D E takes about 1 seconds to stop.
tested distro
alpine 3.11-3.17 and current edge, aarch64 and x86_64, all have the same issue
Gentoo livecd install-arm64-minimal-20230305T233159Z.iso with openrc 0.45.2 , but no issue. every service takes about 0.05s~0.09s to stop
it would be nice if the devs could run below test on your favorite distro and verify, thanks a lot
test script
test result (on alpine linux)
note : i reported the issue on alpine aport issue, but got closed, they say it is better to report to upstream.
The text was updated successfully, but these errors were encountered: