We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

hundertvolt
Posts: 12
Joined: Mon Oct 27, 2025 8:24 am

Re: Timesync service causing excessive SD card writes / fahe-hwclock redundancy

Fri Oct 31, 2025 7:57 am

jojopi wrote:
Fri Oct 31, 2025 7:46 am
pidd wrote:
Thu Oct 30, 2025 9:18 pm
Can't see why not, the setting is there to be used.
If the purpose is to avoid overlapping times on future boots (I have not checked), then one minute is a sensible option, and one hour is not.

Booting takes a significant fraction of a minute, but within an hour you might have started something like "make", that relies on relative timestamps.

(fake-hwclock never avoided overlapping timestamps adequately. It basically dealt with the 1970 problem only.)
Sure! But remember, if you reboot properly, the most recent timestamp is stored on shutdown, independent from the saving period.

You would only run into the trouble of confusing Make if you repeatedly build your code and reboot by pulling and inserting the power plug ;)

If you do make and sudo reboot, in a row, you're safe even if you completely disable the periodic saving.

The one minute period is a huge effort and SD write load only to cater for a margin case, that's what one hour feels completely sufficient to me.

pidd
Posts: 6603
Joined: Fri May 29, 2020 8:29 pm

Re: Timesync service causing excessive SD card writes / fahe-hwclock redundancy

Fri Oct 31, 2025 8:21 am

hundertvolt wrote:
Fri Oct 31, 2025 6:56 am
Can't see why not, the setting is there to be used.
Sure I can set the param for myself :D (of course I already did)....

But wouldn't it be way sensible to set it to one hour of saving period by default, as this is IMHO the best for most use cases, while anyone who really needs it to be one minute can adjust it accordingly?

Unless you are using a really flakey SD card or running off battery then it doesn't make any difference. Consider the hammering SD cards get in dashcams or CCTV where they are writing megabytes per minute yet they last for years. Does anyone routinely replace their dashcam SD card? When I get a new dashcam I usually use the old SD card, it only gets changed when I want to increase its size.

Most of my computers run flat out all the time (9 at this moment), I'm more concerned about the power supplies, fans or onboard inverters dying first than the storage devices whether SD or SSD.

Generally all my SSDs and HDDs are bought second-hand albeit selective makes/models (Kingston SSD's and WD Purple HDDs) that I trust, I have no concerns about the amount of writes I do to the SSDs. SDs are bought new and always Sandisk, despite an inherent distrust I ignore that and they end up fire-and-forget.

SD's in the early days were very flakey internally, the firmware was constantly playing whack-a-mole to keep them going with tons of error detection and correction, duplication etc, the hardware has become enormously more reliable but they still use the same level of OTT firmware which makes contemporary ones from decent makes just about bombproof.

hundertvolt
Posts: 12
Joined: Mon Oct 27, 2025 8:24 am

Re: Timesync service causing excessive SD card writes / fahe-hwclock redundancy

Fri Oct 31, 2025 10:05 am

SD cards becoming more reliable certainty is good news for such applications as mine,.

Still, one should be smart about using resources.

Just because something irrational comes at almost no cost and has always been done like that doesn't make it smarter.

Many little things sum up. And that's also about background activity, memory usage, etc., not only SD card.

If every system service would be configured like timesyncd is at the moment - spending its highest share of activity on the least probable corner case - the RPI would not know an idle state anymore.

That's the most important thing in my point of view. If I was just worried about my own personal SD card, I would set the parameter and be happy. But the clue lies a bit deeper ;)

hundertvolt
Posts: 12
Joined: Mon Oct 27, 2025 8:24 am

Re: Timesync service causing excessive SD card writes / fahe-hwclock redundancy

Sat Nov 08, 2025 8:17 pm

Hi again,

Well, meanwhile there were many very strong arguments that saving the last known timestamp when shutting down or rebooting is a really good idea for consistent, monotonic timestamps.

Anyway, I never doubted this the tiniest piece. :D

Still, I do not see a reason why keeping the highest of all timesyncd's efforts, namely storing a timestamp any minute, active for mitigating the most improbable (and generally harmful) corner case, namely hard and ungraceful resets.

That's the famous pareto trap - investing 95% of the effort for mastering the last 5% of perceived quality. Which use case really has a profit from that?

I would still conclude that it's safe and reasonable to reduce that period to one hour instead of one minute.

Return to "Raspberry Pi OS"

AltStyle によって変換されたページ (->オリジナル) /