From a294dacefff98a6328cda4200e64583a72ab8b36 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Wed, 23 Mar 2016 23:28:12 -0400 Subject: [PATCH] set default journal mode to TRUNCATE, not PERSIST PERSIST causes data to linger in the journal beyond transactions, so it interacts poorly with SECURE_DELETE. It's also not necessarily faster, especially since it makes the page cache and SSD cache (if there is one) colder by holding on to blocks that are no longer used. The default chosen by upstream is DELETE, but TRUNCATE is a bit lighter since it doesn't need to create/delete the file. Change-Id: If790271c253a840df241980f538fc0d844ba7857 --- core/res/res/values/config.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 4ca676613609c..91502e8d286d7 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -1374,8 +1374,11 @@ Choices are: OFF, DELETE, TRUNCATE, PERSIST and MEMORY. PERSIST may improve performance by reducing how often journal blocks are reallocated (compared to truncation) resulting in better data block locality - and less churn of the storage media. --> - PERSIST + and less churn of the storage media. + + The PERSIST mode results in data persisting in the journal beyond the life of + a transaction, so it interacts poorly with SECURE_DELETE. --> + TRUNCATE