summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-18 16:22:25 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-18 16:22:25 +0200
commitdfabe643f3560dcf147f49ec11e95b95c718c3da (patch)
treef8901985125b4da2ec55f35233464ececc087c80 /src/journal
parentc2a623d842af3a4d67e1f4e365f6d6a47f1c6cb4 (diff)
journal: estimate data hash table size a bit larger by default
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index d8ce495d86..b9ab009b3f 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -510,16 +510,16 @@ static int journal_file_setup_data_hash_table(JournalFile *f) {
assert(f);
- /* We estimate that we need 1 hash table entry per 2K of
+ /* We estimate that we need 1 hash table entry per 768 of
journal file and we want to make sure we never get beyond
75% fill level. Calculate the hash table size for the
maximum file size based on these metrics. */
- s = (f->metrics.max_size * 4 / 2048 / 3) * sizeof(HashItem);
+ s = (f->metrics.max_size * 4 / 768 / 3) * sizeof(HashItem);
if (s < DEFAULT_DATA_HASH_TABLE_SIZE)
s = DEFAULT_DATA_HASH_TABLE_SIZE;
- log_info("Reserving %llu entries in hash table.", (unsigned long long) s);
+ log_info("Reserving %llu entries in hash table.", (unsigned long long) (s / sizeof(HashItem)));
r = journal_file_append_object(f,
OBJECT_DATA_HASH_TABLE,