3604df
From 0dd60760c05f5291888a2fe4c8d2f860c97468bc Mon Sep 17 00:00:00 2001
12a457
From: Joseph Fernandes <josferna@redhat.com>
12a457
Date: Wed, 30 Dec 2015 16:53:25 +0530
3604df
Subject: [PATCH 03/86] tier/ctr/sql : Dafault values for sql cache and wal size
12a457
12a457
Setting default values for sql cache and wal size
12a457
cache : 12500 pages
12a457
wal   : 25000 pages
12a457
1 pages - 4096 bytes
12a457
12a457
Porting this downstream 3.1.2 patch to 3.1.3
12a457
12a457
Label: DOWNSTREAM ONLY
12a457
12a457
> Change-Id: Iae3927e021af2e3f7617d45f84e81de3b7d93f1c
12a457
> BUG: 1282729
12a457
> Signed-off-by: Joseph Fernandes <josferna@redhat.com>
12a457
> Reviewed-on: https://code.engineering.redhat.com/gerrit/64642
12a457
> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
12a457
> Tested-by: Dan Lambright <dlambrig@redhat.com>
12a457
12a457
Change-Id: Ib3cd951709dff25157371006637b8c0d881f5d61
12a457
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
12a457
Reviewed-on: https://code.engineering.redhat.com/gerrit/70346
12a457
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
12a457
Tested-by: Atin Mukherjee <amukherj@redhat.com>
12a457
---
12a457
 libglusterfs/src/gfdb/gfdb_sqlite3.h               |    4 ++--
12a457
 .../changetimerecorder/src/changetimerecorder.c    |    4 ++--
12a457
 xlators/mgmt/glusterd/src/glusterd-volume-set.c    |   12 ++++++------
12a457
 3 files changed, 10 insertions(+), 10 deletions(-)
12a457
12a457
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.h b/libglusterfs/src/gfdb/gfdb_sqlite3.h
3604df
index 9d0d996..e69251c 100644
12a457
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.h
12a457
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.h
3604df
@@ -166,8 +166,8 @@ do {\
12a457
 
12a457
 #define GF_SQL_DEFAULT_DBPATH                   ""
12a457
 #define GF_SQL_DEFAULT_PAGE_SIZE                "4096"
12a457
-#define GF_SQL_DEFAULT_CACHE_SIZE               "1000"
12a457
-#define GF_SQL_DEFAULT_WAL_AUTOCHECKPOINT       "1000"
12a457
+#define GF_SQL_DEFAULT_CACHE_SIZE               "12500"
12a457
+#define GF_SQL_DEFAULT_WAL_AUTOCHECKPOINT       "25000"
12a457
 #define GF_SQL_DEFAULT_JOURNAL_MODE             GF_SQL_JM_WAL
12a457
 #define GF_SQL_DEFAULT_SYNC                     GF_SQL_SYNC_OFF
12a457
 #define GF_SQL_DEFAULT_AUTO_VACUUM              GF_SQL_AV_NONE
12a457
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
3604df
index 5f3a074..3d2e78a 100644
12a457
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
12a457
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
3604df
@@ -2299,11 +2299,11 @@ struct volume_options options[] = {
12a457
         },
12a457
         { .key  = {GFDB_SQL_PARAM_WAL_AUTOCHECK},
12a457
           .type = GF_OPTION_TYPE_INT,
12a457
-          .default_value = "1000"
12a457
+          .default_value = "25000"
12a457
         },
12a457
         { .key  = {GFDB_SQL_PARAM_CACHE_SIZE},
12a457
           .type = GF_OPTION_TYPE_INT,
12a457
-          .default_value = "1000"
12a457
+          .default_value = "12500"
12a457
         },
12a457
         { .key  = {GFDB_SQL_PARAM_PAGE_SIZE},
12a457
           .type = GF_OPTION_TYPE_INT,
12a457
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
3604df
index be624b7..1f59e36 100644
12a457
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
12a457
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
3604df
@@ -2797,29 +2797,29 @@ struct volopt_map_entry glusterd_volopt_map[] = {
12a457
         },
12a457
         { .key         = "features.ctr-sql-db-cachesize",
12a457
           .voltype     = "features/changetimerecorder",
12a457
-          .value       = "1000",
12a457
+          .value       = "12500",
12a457
           .option      = "sql-db-cachesize",
12a457
           .validate_fn = validate_ctr_sql_params,
12a457
           .op_version  = GD_OP_VERSION_3_7_7,
12a457
           .description = "Defines the cache size of the sqlite database of "
12a457
                          "changetimerecorder xlator."
12a457
                          "The input to this option is in pages."
12a457
-                         "Each page is 4096 bytes. Default value is 1000 "
12a457
-                         "pages i.e ~ 4 MB. "
12a457
+                         "Each page is 4096 bytes. Default value is 12500 "
12a457
+                         "pages i.e ~ 49 MB. "
12a457
                          "The max value is 262144 pages i.e 1 GB and "
12a457
                          "the min value is 1000 pages i.e ~ 4 MB. "
12a457
         },
12a457
         { .key         = "features.ctr-sql-db-wal-autocheckpoint",
12a457
           .voltype     = "features/changetimerecorder",
12a457
-          .value       = "1000",
12a457
+          .value       = "25000",
12a457
           .option      = "sql-db-wal-autocheckpoint",
12a457
           .validate_fn = validate_ctr_sql_params,
12a457
           .op_version  = GD_OP_VERSION_3_7_7,
12a457
           .description = "Defines the autocheckpoint of the sqlite database of "
12a457
                          " changetimerecorder. "
12a457
                          "The input to this option is in pages. "
12a457
-                         "Each page is 4096 bytes. Default value is 1000 "
12a457
-                         "pages i.e ~ 4 MB."
12a457
+                         "Each page is 4096 bytes. Default value is 25000 "
12a457
+                         "pages i.e ~ 98 MB."
12a457
                          "The max value is 262144 pages i.e 1 GB and "
12a457
                          "the min value is 1000 pages i.e ~4 MB."
12a457
         },
12a457
-- 
12a457
1.7.1
12a457