Web lists-archives.com

Re: Btrs vs ext4. Which one is more reliable?




Hi there,

On 08/11/2017 06:29 PM, Dejan Jocic wrote:
> On 11-08-17, Christian Seiler wrote:
>> You can also set DefaultTimeoutStopSec= in /etc/systemd/system.conf
>> to alter the default for all units (though individual settings for
>> units will still override that).
>>
> Thank you for suggestion. I did find that solution, some time ago, can't
> remember exactly where. But it was followed by warning that it is bad
> idea, can't remember exactly why. Do you have any hint of why it could
> be bad idea to limit timeout, or I've just misunderstood whatever I've
> read about it?

Well, there's a reason the default is 90s. And for some services even
that might be too short. Take for example a database server where the
regular stop script might take 10 minutes to shut down properly (when
no error occurs).

On the other hand for other services you can easily get away with a
lot less of a timeout. For example, I have apt-cache-ng running on
my system (to cache stuff for sbuild), and I think it's perfectly
reasonable to set the stop timeout for that service to 10s or even
lower because that's just a stupid proxy. On the other hand I've
never experienced apt-cacher-ng to take longer than 1s or so to stop,
so I haven't bothered.

The right timeout is always a balancing act - and systemd's default
is a compromise to provide something that won't break most use cases
but still cause the system to shut down after a finite time.

It's up to you to decide what the best option here is. I wouldn't
set the default to anything lower than 30s myself, but that's just
a gut feeling, and I don't actually have any hard data to back that
number up.

> As for more reliable during shutdown part, not in
> my experience, at least on Stretch.

I don't recall ever running into the timeout on shutdown since Stretch
has been released as stable. And I am running a couple of Strech
systems myself, both at home and at work.

> It was on Jessie though, where that
> feature was hitting me not more than once in every 15-20
> shutdowns/reboots. 

Even every 15-20 shutdowns is too much. I never experience those
unless something's wrong. And then I debug hat problem to see what
is causing it and get rid of the root problem so that it doesn't
occur again.

Regards,
Christian