Hi,
On Wed, Jul 30, 2025 at 07:31:56AM +0300, Andrei Borzenkov wrote:
29.07.2025 11:30, Marc Haber wrote:
Hi,
I have a template service unit which runs a oneshot service that
generates both high CPU and high I/O load for a couple of minutes. The
service is templated a couple of times and runs from an, also templated
timer.
In another use case, I have independent services that generate high CPU
and high I/O.
It is unclear what you want
I apologize for not making myself clear. Let me try doing this with
"traditional" things.
I have a unknown number of processes that would be one-shot services in
systemd lingo. Some of them are equal but differently parametrized,
others are completely different. I want only one of the to run at at
time, and if another one wants to start while one is still running, I
want the new one to wait.
In the classic way all those services would know the path to a shared
lock and run with flock(1) --exclusive with a very high value for
--timeout. This is probably what I'll do with my systemd 257 system.
I think that the new systemd 258 slice semantics might help, but I won't
have that for a few years. So I'll probably use the flock thing in
ExecStart.
From what I understand, in Before=/After= you need to know what the
processes are and you need to define an order in which they'll run.
That's not what I want. But I might have misunderstood that and would
appreciate an example of what the suggestion is.
I find the entire Before/After and Wants/Requires incredibly powerful
but also hard to grasp. I am not a newbie to systemd but this is
something that I have not fully understood yet.
Greetings
Marc
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421