Skip to content

Bump commit interval to 30s#2103

Merged
agners merged 1 commit intohome-assistant:devfrom
agners:increase-ext4-commit-interval
Sep 2, 2022
Merged

Bump commit interval to 30s#2103
agners merged 1 commit intohome-assistant:devfrom
agners:increase-ext4-commit-interval

Conversation

@agners
Copy link
Member

@agners agners commented Sep 2, 2022

A higher file system commit interval can help to decrease the amount of
writes. In tests, a commit interval of higher than 30s seems not to help
much in practice. Settle with 30s for now.

Some tests about this change can be found here:
https://community.home-assistant.io/t/researching-i-o-write-improvements/456227

A higher file system commit interval can help to decrease the amount of
writes. In tests, a commit interval of higher than 30s seems not to help
much in practice. Settle with 30s for now.
@agners
Copy link
Member Author

agners commented Sep 2, 2022

It seems like big distributions like Ubuntu leave it as default. But those are also geared towards desktop type systems, so might not be a good indicator. ArchLinux has it as a "performance improvement" tip set to 60s in the example. Debian Wiki has a tip to set to 600s. ChromeOS synchronizes it with vm.dirty_expire_centisecs, and sets both to 600s (see files/00-sysctl.conf, there have been discussions to lower it, but it seems it stayed at 600s. It seems that the main reason is not to save writes, but to make sure fewer wake-ups are necessary and therefor maximize runtime when running on battery).

All in all, I expect this to create a bit more issues where files get corrupted (like the key.json corruption we are seeing, see #1706). But in the end those are software bugs which should be fixed (either the software needs to use a save write mechanism, or handle empty files properly).

@agners agners requested a review from pvizeli September 2, 2022 12:32
@pvizeli
Copy link
Member

pvizeli commented Sep 2, 2022

Let's test the 30s. I'm more worry about docker layers

@agners agners merged commit b1df444 into home-assistant:dev Sep 2, 2022
jens-maus added a commit to OpenCCU/OpenCCU that referenced this pull request Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants