Re: [systemd-devel] [PATCH 2/2] Add +C attrib to the journal files directories

2015-04-13 Thread Lennart Poettering
On Sun, 12.04.15 20:30, Goffredo Baroncelli (kreij...@libero.it) wrote:

 From: Goffredo Baroncelli kreij...@inwind.it
 
 Add +C attrib to the journal files directories. The journal file format
 behaves bad on a BTRFS filesystem: the performances decrease during the
 time.
 To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to the
 journal files directories, so newly created journal files inherit the NCOOW
 attribute.
 
 Be aware that the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
 to rebuild a corrupted file in a RAIDx filesystem. However the perfomances
 increase.
 In a single disk filesystem (or a filesystem without redundancy) it is safe
 to use the NOCOW flags.

Applied this one with some changes. Other paztch will follow shortly.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 2/2] Add +C attrib to the journal files directories

2015-04-12 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it

Add +C attrib to the journal files directories. The journal file format
behaves bad on a BTRFS filesystem: the performances decrease during the
time.
To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to the
journal files directories, so newly created journal files inherit the NCOOW
attribute.

Be aware that the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
to rebuild a corrupted file in a RAIDx filesystem. However the perfomances
increase.
In a single disk filesystem (or a filesystem without redundancy) it is safe
to use the NOCOW flags.
---
 tmpfiles.d/journal-nocow.conf | 22 ++
 1 file changed, 22 insertions(+)
 create mode 100644 tmpfiles.d/journal-nocow.conf

diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
new file mode 100644
index 000..493
--- /dev/null
+++ b/tmpfiles.d/journal-nocow.conf
@@ -0,0 +1,22 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+# Set the NOCOW attribute for directories of journal files; this flag is
+# inheredited by their new files and sub-directories; valid only for a BTRFS
+# filesystem
+# WARNING: enabling the NOCOW attribute improves the perfomance, but also
+#disables the BTRFS checksums. In a RAID BTRFS filesystem, the checksums
+#are needed to rebuild a corrupted file; without checksums a rebuild is
+#not possible.
+# In a single-disk filesystem (or a filesystem without redundancy) enabling
+# the NOCOW attribute for the journal files is safe, because these have their
+# own checksums and a rebuilding wouldn't be possible in any case
+
+h /var/log/journal/%m - - - - +C
+h /var/log/journal/remote - - - - +C
-- 
2.1.4

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


Re: [systemd-devel] [PATCH 2/2] Add +C attrib to the journal files directories

2015-04-08 Thread Lennart Poettering
On Sat, 21.03.15 12:56, Goffredo Baroncelli (kreij...@libero.it) wrote:

 From: Goffredo Baroncelli kreij...@inwind.it
 
 Add +C attrib to the journal files directories. The journal file format
 behaves bad on a BTRFS filesystem: the performances decrease during the
 time.
 To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to the
 journal files directories, so newly created journal files inherit the NCOOW
 attribute.

I think it would be good if much of this explanation would actually be
in the tmpfiles snippet. 

 
 Be aware that the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
 to rebuild a corrupted file in a RAIDx filesystem. However the perfomances
 increase.
 In a single disk filesystem (or a filesystem without redundancy) it is safe
 to use the NOCOW flags.
 ---
  tmpfiles.d/journal-nocow.conf | 19 +++
  1 file changed, 19 insertions(+)
  create mode 100644 tmpfiles.d/journal-nocow.conf
 
 diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
 new file mode 100644
 index 000..8d9c1e8
 --- /dev/null
 +++ b/tmpfiles.d/journal-nocow.conf
 @@ -0,0 +1,19 @@
 +#  This file is part of systemd.
 +#
 +#  systemd is free software; you can redistribute it and/or modify it
 +#  under the terms of the GNU Lesser General Public License as published by
 +#  the Free Software Foundation; either version 2.1 of the License, or
 +#  (at your option) any later version.
 +
 +# See tmpfiles.d(5) for details
 +
 +# set the journal file as NOCOW; make sense only for BTRFS
 filesystem

This will not set the journal file as NOCOW, but will set the flag
for the directory as a whole. Please explain this more accurately.

 +# WARNING: the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
 +#  to rebuild a corrupted file in a RAIDx filesystem. It is suggested
 +#  to disables these setting in this kind of filesystem.
 +#  However in a single disk filesystem (or a filesystem without 
 +#  redundancy) it is safe to use the NOCOW flag.
 +#  Setting the NOCOW flag the perfomances increase.

This is not correct english.

 +
 +h /var/log/journal/%m - - - - +C
 +h /var/log/journal/remote - - - - +C

I think /var/log/journal itself should also get this treatment.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 2/2] Add +C attrib to the journal files directories

2015-03-21 Thread Goffredo Baroncelli
From: Goffredo Baroncelli kreij...@inwind.it

Add +C attrib to the journal files directories. The journal file format
behaves bad on a BTRFS filesystem: the performances decrease during the
time.
To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to the
journal files directories, so newly created journal files inherit the NCOOW
attribute.

Be aware that the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
to rebuild a corrupted file in a RAIDx filesystem. However the perfomances
increase.
In a single disk filesystem (or a filesystem without redundancy) it is safe
to use the NOCOW flags.
---
 tmpfiles.d/journal-nocow.conf | 19 +++
 1 file changed, 19 insertions(+)
 create mode 100644 tmpfiles.d/journal-nocow.conf

diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
new file mode 100644
index 000..8d9c1e8
--- /dev/null
+++ b/tmpfiles.d/journal-nocow.conf
@@ -0,0 +1,19 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# See tmpfiles.d(5) for details
+
+# set the journal file as NOCOW; make sense only for BTRFS filesystem
+# WARNING: the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
+#  to rebuild a corrupted file in a RAIDx filesystem. It is suggested
+#  to disables these setting in this kind of filesystem.
+#  However in a single disk filesystem (or a filesystem without 
+#  redundancy) it is safe to use the NOCOW flag.
+#  Setting the NOCOW flag the perfomances increase.
+
+h /var/log/journal/%m - - - - +C
+h /var/log/journal/remote - - - - +C
-- 
2.1.4

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