Blob Blame History Raw
From 05f2fe07f4dd45dd13950f8d9086dc61d63f2154 Mon Sep 17 00:00:00 2001
From: Joseph Fernandes <josferna@redhat.com>
Date: Wed, 30 Dec 2015 16:53:25 +0530
Subject: [PATCH 04/26] tier/ctr/sql : Dafault values for sql cache and wal size

Setting default values for sql cache and wal size
cache : 12500 pages
wal   : 25000 pages
1 pages - 4096 bytes

Porting this downstream 3.1.2 patch to 3.1.3

Label: DOWNSTREAM ONLY

> Change-Id: Iae3927e021af2e3f7617d45f84e81de3b7d93f1c
> BUG: 1282729
> Signed-off-by: Joseph Fernandes <josferna@redhat.com>
> Reviewed-on: https://code.engineering.redhat.com/gerrit/64642
> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
> Tested-by: Dan Lambright <dlambrig@redhat.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>

Change-Id: Ib3cd951709dff25157371006637b8c0d881f5d61
BUG: 1319698
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/70346
Reviewed-by: Nithya Balachandran <nbalacha@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
---
 libglusterfs/src/gfdb/gfdb_sqlite3.h               |    4 ++--
 .../changetimerecorder/src/changetimerecorder.c    |    4 ++--
 xlators/mgmt/glusterd/src/glusterd-volume-set.c    |   12 ++++++------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.h b/libglusterfs/src/gfdb/gfdb_sqlite3.h
index f2ed2d7..1d4b32f 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.h
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.h
@@ -171,8 +171,8 @@ do {\
 
 #define GF_SQL_DEFAULT_DBPATH                   ""
 #define GF_SQL_DEFAULT_PAGE_SIZE                "4096"
-#define GF_SQL_DEFAULT_CACHE_SIZE               "1000"
-#define GF_SQL_DEFAULT_WAL_AUTOCHECKPOINT       "1000"
+#define GF_SQL_DEFAULT_CACHE_SIZE               "12500"
+#define GF_SQL_DEFAULT_WAL_AUTOCHECKPOINT       "25000"
 #define GF_SQL_DEFAULT_JOURNAL_MODE             GF_SQL_JM_WAL
 #define GF_SQL_DEFAULT_SYNC                     GF_SQL_SYNC_OFF
 #define GF_SQL_DEFAULT_AUTO_VACUUM              GF_SQL_AV_NONE
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c
index 47de911..e606eb8 100644
--- a/xlators/features/changetimerecorder/src/changetimerecorder.c
+++ b/xlators/features/changetimerecorder/src/changetimerecorder.c
@@ -2292,11 +2292,11 @@ struct volume_options options[] = {
         },
         { .key  = {GFDB_SQL_PARAM_WAL_AUTOCHECK},
           .type = GF_OPTION_TYPE_INT,
-          .default_value = "1000"
+          .default_value = "25000"
         },
         { .key  = {GFDB_SQL_PARAM_CACHE_SIZE},
           .type = GF_OPTION_TYPE_INT,
-          .default_value = "1000"
+          .default_value = "12500"
         },
         { .key  = {GFDB_SQL_PARAM_PAGE_SIZE},
           .type = GF_OPTION_TYPE_INT,
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index ccc800c..ec99c8a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -2546,29 +2546,29 @@ struct volopt_map_entry glusterd_volopt_map[] = {
         },
         { .key         = "features.ctr-sql-db-cachesize",
           .voltype     = "features/changetimerecorder",
-          .value       = "1000",
+          .value       = "12500",
           .option      = "sql-db-cachesize",
           .validate_fn = validate_ctr_sql_params,
           .op_version  = GD_OP_VERSION_3_7_7,
           .description = "Defines the cache size of the sqlite database of "
                          "changetimerecorder xlator."
                          "The input to this option is in pages."
-                         "Each page is 4096 bytes. Default value is 1000 "
-                         "pages i.e ~ 4 MB. "
+                         "Each page is 4096 bytes. Default value is 12500 "
+                         "pages i.e ~ 49 MB. "
                          "The max value is 262144 pages i.e 1 GB and "
                          "the min value is 1000 pages i.e ~ 4 MB. "
         },
         { .key         = "features.ctr-sql-db-wal-autocheckpoint",
           .voltype     = "features/changetimerecorder",
-          .value       = "1000",
+          .value       = "25000",
           .option      = "sql-db-wal-autocheckpoint",
           .validate_fn = validate_ctr_sql_params,
           .op_version  = GD_OP_VERSION_3_7_7,
           .description = "Defines the autocheckpoint of the sqlite database of "
                          " changetimerecorder. "
                          "The input to this option is in pages. "
-                         "Each page is 4096 bytes. Default value is 1000 "
-                         "pages i.e ~ 4 MB."
+                         "Each page is 4096 bytes. Default value is 25000 "
+                         "pages i.e ~ 98 MB."
                          "The max value is 262144 pages i.e 1 GB and "
                          "the min value is 1000 pages i.e ~4 MB."
         },
-- 
1.7.1