pgpool2.git / summary / log / commit / refs
commit cfaa9678c0ca89cf70ba1b344ec5b2953fcb7b40
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Wed May 09 01:25:08 2012 +0000
Fix typo and inconsistent descriptions in pgpool.conf regarding on
memory query cache.
Adjust on memory query cache default parameters.
pgpool.conf.sample | 51 +++++++++++++++++++++++++++------------------------
pool_config.c | 16 ++++++++--------
pool_config.l | 16 ++++++++--------
3 files changed, 43 insertions(+), 40 deletions(-)
diff --git a/pgpool.conf.sample b/pgpool.conf.sample
index 38ad7d267..7cbf42460 100644
--- a/pgpool.conf.sample
+++ b/pgpool.conf.sample
@@ -436,43 +436,46 @@ relcache_expire = 0
# controls the life time of the cache.
#------------------------------------------------------------------------------
-# MEMORY CACHE
+# ON MEMORY QUERY MEMORY CACHE
#------------------------------------------------------------------------------
-# If true, use the memory cache functionality, false by default
-memory_cache_enabled = false
+# If on, use the memory cache functionality, off by default
+memory_cache_enabled = off
-# Cache store method. either shmem(shared memory) or Memcached. shmem by default
+# Cache storage method. either 'shmem'(shared memory) or 'memcached'. 'shmem' by default
memqcache_method = 'shmem'
-# Memcached host name. Mandatory if memqcache_method=memcached.
-# Default to localhost
+# Memcached host name or IP address. Mandatory if memqcache_method = 'memcached'.
+# Defaults to localhost
memqcache_memcached_host = 'localhost'
-# Memcached port number. Mondatory if memqcache_method=memcached.
-# Default to 11211
-memqcache_memcached_port=11211
+# Memcached port number. Mondatory if memqcache_method = 'memcached'.
+# Defaults to 11211
+memqcache_memcached_port = 11211
-# Total memory size in bytes for storing memory cache. Mandatory if memqcache_method=shmem.
-# 128MB by default.
-memqcache_total_size=134217728
+# Total memory size in bytes for storing memory cache. Mandatory if memqcache_method = 'shmem'.
+# Defaults to 64MB.
+memqcache_total_size = 67108864
-# Total number of cache entries. Mandatory if memqcache_method=shmem.
-# a cache entry consumes 48 bytes.
-memqcache_max_num_cache=131072
+# Total number of cache entries. Mandatory if memqcache_method = 'shmem'.
+# Each cache entry consumes 48 bytes on shared memory. Defaults to 1,000,000(45.8MB).
+memqcache_max_num_cache = 1000000
-# Memory cache entry life time specified in seconds. 60 by default.
-memqcache_expire=60
+# Memory cache entry life time specified in seconds.
+# 0 means infinite life time. 0 by default.
+memqcache_expire = 0
-# If true, invalidation of query cache is triggered by corresponding
-# DDL/DML/DCL(and memqcache_expire). If false, it is only triggered
-# by memqcache_expire. True by default.
-memqcache_auto_cache_invalidation = true
+# If on, invalidation of query cache is triggered by corresponding
+# DDL/DML/DCL(and memqcache_expire). If off, it is only triggered
+# by memqcache_expire. on by default.
+memqcache_auto_cache_invalidation = on
# Maximum SELECT result size in bytes.
-memqcache_maxcache=1024
+# Must be smaller than memqcache_cache_block_size. Defaults to 400KB.
+memqcache_maxcache = 409600
-# Cache block size in bytes. 1MB by default
-memqcache_cache_block_size=1048576
+# Cache block size in bytes. Mandatory if memqcache_method = 'shmem'.
+# Defaults to 1MB.
+memqcache_cache_block_size = 1048576
# Temporary work directory to record table oids
memqcache_oiddir = '/var/log/pgpool/oiddir'
diff --git a/pool_config.c b/pool_config.c
index 3123778f5..c6d745159 100644
--- a/pool_config.c
+++ b/pool_config.c
@@ -490,7 +490,7 @@ char *yytext;
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2011 PgPool Global Development Group
+ * Copyright (c) 2003-2012 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -1944,14 +1944,14 @@ int pool_init_config(void)
pool_config->memory_cache_enabled = 0;
pool_config->memqcache_method = "shmem";
- pool_config->memqcache_memcached_host = "";
+ pool_config->memqcache_memcached_host = "localhost";
pool_config->memqcache_memcached_port = 11211;
- pool_config->memqcache_total_size = 10240;
- pool_config->memqcache_max_num_cache = 100;
- pool_config->memqcache_expire = 60;
- pool_config->memqcache_auto_cache_invalidation = true;
- pool_config->memqcache_maxcache = 512;
- pool_config->memqcache_cache_block_size = 8192;
+ pool_config->memqcache_total_size = 67108864;
+ pool_config->memqcache_max_num_cache = 1000000;
+ pool_config->memqcache_expire = 0;
+ pool_config->memqcache_auto_cache_invalidation = 1;
+ pool_config->memqcache_maxcache = 409600;
+ pool_config->memqcache_cache_block_size = 1048576;
pool_config->memqcache_oiddir = "/var/log/pgpool/oiddir";
pool_config->white_memqcache_table_list = NULL;
pool_config->num_white_memqcache_table_list = 0;
diff --git a/pool_config.l b/pool_config.l
index 68053c0b4..a4e8700df 100644
--- a/pool_config.l
+++ b/pool_config.l
@@ -6,7 +6,7 @@
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2011 PgPool Global Development Group
+ * Copyright (c) 2003-2012 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
@@ -219,14 +219,14 @@ int pool_init_config(void)
pool_config->memory_cache_enabled = 0;
pool_config->memqcache_method = "shmem";
- pool_config->memqcache_memcached_host = "";
+ pool_config->memqcache_memcached_host = "localhost";
pool_config->memqcache_memcached_port = 11211;
- pool_config->memqcache_total_size = 10240;
- pool_config->memqcache_max_num_cache = 100;
- pool_config->memqcache_expire = 60;
- pool_config->memqcache_auto_cache_invalidation = true;
- pool_config->memqcache_maxcache = 512;
- pool_config->memqcache_cache_block_size = 8192;
+ pool_config->memqcache_total_size = 67108864;
+ pool_config->memqcache_max_num_cache = 1000000;
+ pool_config->memqcache_expire = 0;
+ pool_config->memqcache_auto_cache_invalidation = 1;
+ pool_config->memqcache_maxcache = 409600;
+ pool_config->memqcache_cache_block_size = 1048576;
pool_config->memqcache_oiddir = "/var/log/pgpool/oiddir";
pool_config->white_memqcache_table_list = NULL;
pool_config->num_white_memqcache_table_list = 0;
[parent: 88446e486c94]