You are not logged in.

#1 2014-03-13 09:46:29

joximus
Member
Registered: 2014-03-11
Posts: 7

journald SyncIntervalSec

In order to reduce frequency of writing journal files to filesystem (sd card on cubieboard) I have set SyncIntervalSec in journald.conf to 60m.
Man page for journald.conf states :
"The timeout before synchronizing journal files to disk. After syncing, journal files are placed in the OFFLINE state. Note that syncing is unconditionally done immediately after a log message of priority CRIT, ALERT or EMERG has been logged. This setting hence applies only to messages of the levels ERR, WARNING, NOTICE, INFO, DEBUG. The default timeout is 5 minutes."

But I have noticed that journal file is written immediately no matter what priority log message is (PRIORITY = 6, eg. cron job, ssh login, ...).
Is this a bug or am I missing something?

Offline

#2 2014-03-13 10:16:24

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: journald SyncIntervalSec

Please ask on Arch Linux ARM forum too: https://bbs.archlinux.org/viewtopic.php?id=153431

Offline

#3 2014-03-13 13:03:19

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: journald SyncIntervalSec

Writing is not the same as syncing. See 'man 2 fsync'.

Offline

#4 2014-03-13 13:20:18

joximus
Member
Registered: 2014-03-11
Posts: 7

Re: journald SyncIntervalSec

brain0 wrote:

Writing is not the same as syncing. See 'man 2 fsync'.

Thank you for your answer.
So, does setting  SyncIntervalSec  to higher values reduces SD Card wear?

Offline

#5 2014-03-13 15:26:48

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: journald SyncIntervalSec

The kernel can always decide to sync on its own, the only thing journald does it force sync at a specific time.

Offline

Board footer

Powered by FluxBB