0

I am trying to find what is the limitation of the RestartSec time in systemd. I know that the default time is 100ms, and I have changed this time in system.config to 60ms and it works but is there limit for how much I can go down in time? Does anyone knows what is the limitation there? an example to my service:

[Unit]
Description="test"

[Service]
ExecStart=/home/test.sh
Type=simple
Restart=on-failure
RestartSec=60ms

[Install]
WantedBy=default.target

Thanks.

1 Answers1

0

Technically you can also use "1 ms", only 0 seconds will trigger the service. I also search if there are some documentation about microseconds (µs) but it seems that in this case you cant use it.

I hope that that was enough exhaustive, this is my first Answer, tell me if there are something that I could improve.

  • Thanks for your answer. Where did you find that I can use "1ms" ? Can you share the link here? – Magnus Zaza Feb 16 '22 at 15:50
  • Yes of course, in this link I've found an example where a guy just try it: https://github.com/systemd/systemd/issues/13667 in this one you can read that the CPU range was from 1ms to 1000ms https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html I hope I was helpful – Davide Ferrero Feb 17 '22 at 09:32