Re: [systemd-devel] [PATCH] [RFCv6] Add sync timer to journal server

2013-03-23 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Mar 23, 2013 at 05:27:46PM +0200, Oleksii Shevchuk wrote:
 Add option to force journal sync with fdatasync. Disabled by default.
Hi Oleksii,
why is it off by default?

 Interval configured via SyncIntervalSec option at journal.conf. Synced
 journal files will be marked as OFFLINE.
 
 Manual sync can be performed via sending SIGUSR1.
 ---
  man/journald.conf.xml|   9 +++
  src/journal/journal-file.c   |  61 
  src/journal/journal-file.h   |   2 +
  src/journal/journald-gperf.gperf |   1 +
  src/journal/journald-server.c| 117 
 +--
  src/journal/journald-server.h|   6 ++
  src/journal/journald.conf|   1 +
  7 files changed, 181 insertions(+), 16 deletions(-)
 
 diff --git a/man/journald.conf.xml b/man/journald.conf.xml
 index 0797deb..f2d2806 100644
 --- a/man/journald.conf.xml
 +++ b/man/journald.conf.xml
 @@ -322,6 +322,15 @@
  seconds. /para/listitem
  /varlistentry
  
 +
 +varlistentry
 +
 termvarnameSyncIntervalSec=/varname/term
 +
 +listitemparaThe maximum time to
 +commit new journal data to disk. Disabled by
 +default/para/listitem
Could you add an explanation how this is changes behaviour during
crashes?

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] [RFCv6] Add sync timer to journal server

2013-03-23 Thread Oleksii Shevchuk
  Add option to force journal sync with fdatasync. Disabled by default.
 Hi Oleksii,
 why is it off by default?

Hi Zbyszek, 
After discussion i am unsure about defaults for that option. 
Maybe only who cares should enable it?


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] [RFCv6] Add sync timer to journal server

2013-03-23 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Mar 23, 2013 at 09:26:59PM +0200, Oleksii Shevchuk wrote:
   Add option to force journal sync with fdatasync. Disabled by default.
  Hi Oleksii,
  why is it off by default?
 
 Hi Zbyszek, 
 After discussion i am unsure about defaults for that option. 
 Maybe only who cares should enable it?
IIUC, the point of this patch is to avoid losing the journal after
a crash during the time when journal is idle. This seems like a
generally desirable property. So we should make it work (without
too much overhead) for the majority of
hardware/logging-intensity/power-saving-rules configurations,
and enable it by default.

On IRC Kay suggested 1-5 min. I think that this sounds about right.
Once the patch is in, I guess we can gather some statistics from
people and tune the settings.

Zbysze
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel