[systemd-devel] [RFC PATCH] journal: Set the default keep free value to 15% (up from 5%)

Colin Guthrie colin at mageia.org
Tue Apr 30 03:48:11 PDT 2013


As some SSDs are still seeing performance degredation when
reaching 85% usage the default value of 5% seems a little low.

Set this to 15% by default.
---

So I'm really not sure or educated enough about this one,
but we're recently had a user complain about the disk space
used by the journal.

I argued that the defaults were automagic and this should be
fine generally and even if it does use more disk space by default,
it should clear itself out automatically when under pressure.

One comment in reply to my argument mentioned SSD performance. While
this is arguably something that should be fixed elsewhere, should
we be more concervative with things and leave say, 15% free by default?

Col

 man/journald.conf.xml      | 2 +-
 src/journal/journal-file.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 0b9de65..6d54c94 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -246,7 +246,7 @@
                                 configured in
                                 <varname>SystemMaxUse=</varname> and
                                 <varname>RuntimeMaxUse=</varname> is
-                                available. Defaults to 5% of the size
+                                available. Defaults to 15% of the size
                                 of the respective file
                                 system. <varname>SystemMaxFileSize=</varname>
                                 and
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index a44e126..bfe2951 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -2769,7 +2769,7 @@ void journal_default_metrics(JournalMetrics *m, int fd) {
         if (m->keep_free == (uint64_t) -1) {
 
                 if (fs_size > 0) {
-                        m->keep_free = PAGE_ALIGN(fs_size / 20); /* 5% of file system size */
+                        m->keep_free = PAGE_ALIGN(fs_size * 3 / 20); /* 15% of file system size */
 
                         if (m->keep_free > DEFAULT_KEEP_FREE_UPPER)
                                 m->keep_free = DEFAULT_KEEP_FREE_UPPER;
-- 
1.8.1.5



More information about the systemd-devel mailing list