Commit ebf57797 authored by unknown's avatar unknown

ndb dd -

  Change default page buffer cache size


mysql-test/ndb/ndb_config_1_node.ini:
  Add configuration of page buffer
mysql-test/ndb/ndb_config_2_node.ini:
  Add configuration of page buffer
mysql-test/ndb/ndb_config_4_node.ini:
  Add configuration of page buffer
mysql-test/ndb/ndbcluster.sh:
  Add configuration of page buffer
storage/ndb/include/kernel/ndb_limits.h:
  Hard code some limits (for now)...
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Add configuration of page buffer
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Add configuration of page buffer
storage/ndb/src/kernel/blocks/pgman.cpp:
  Add configuration of page buffer
storage/ndb/src/kernel/blocks/restore.cpp:
  Add configuration of page buffer
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Change default page buffer caches from 1M (only used for testing) to realistic 64M
parent 1d5a5ae0
...@@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes ...@@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes
MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes
TimeBetweenGlobalCheckpoints= 500 TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles= 3 NoOfFragmentLogFiles= 3
DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory
[ndbd] [ndbd]
HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress
......
...@@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes ...@@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes
MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes
TimeBetweenGlobalCheckpoints= 500 TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles= 3 NoOfFragmentLogFiles= 3
DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory
[ndbd] [ndbd]
HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress
......
...@@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes ...@@ -11,6 +11,7 @@ MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes
MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes
TimeBetweenGlobalCheckpoints= 500 TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles= 3 NoOfFragmentLogFiles= 3
DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory
[ndbd] [ndbd]
HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress HostName= CHOOSE_HOSTNAME_1 # hostname is a valid network adress
......
...@@ -58,6 +58,7 @@ ndb_no_attr=2048 ...@@ -58,6 +58,7 @@ ndb_no_attr=2048
ndb_con_op=105000 ndb_con_op=105000
ndb_dmem=80M ndb_dmem=80M
ndb_imem=24M ndb_imem=24M
ndb_pbmem=32M
VERBOSE=100 VERBOSE=100
NDB_MGM_EXTRA_OPTS= NDB_MGM_EXTRA_OPTS=
...@@ -90,6 +91,7 @@ while test $# -gt 0; do ...@@ -90,6 +91,7 @@ while test $# -gt 0; do
ndb_con_op=5000 ndb_con_op=5000
ndb_dmem=10M ndb_dmem=10M
ndb_imem=1M ndb_imem=1M
ndb_pbmem=4M
;; ;;
--diskless) --diskless)
ndb_diskless=1 ndb_diskless=1
...@@ -206,6 +208,7 @@ if [ $initial_ndb ] ; then ...@@ -206,6 +208,7 @@ if [ $initial_ndb ] ; then
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \ -e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
-e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \ -e s,"CHOOSE_FILESYSTEM","$fs_ndb",g \
-e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \ -e s,"CHOOSE_PORT_MGM","$ndb_mgmd_port",g \
-e s,"CHOOSE_DiskPageBufferMemory","$ndb_pbmem",g \
< "$config_ini" \ < "$config_ini" \
> "$fs_ndb/config.ini" > "$fs_ndb/config.ini"
fi fi
......
...@@ -141,4 +141,16 @@ ...@@ -141,4 +141,16 @@
*/ */
#define NDB_SECTION_SEGMENT_SZ 60 #define NDB_SECTION_SEGMENT_SZ 60
/*
* Restore Buffer in pages
* 4M
*/
#define LCP_RESTORE_BUFFER (4*32)
/*
* Log buffer pages
* 8M
*/
#define LGMAN_LOG_BUFFER (8*32)
#endif #endif
...@@ -85,6 +85,8 @@ ...@@ -85,6 +85,8 @@
#define CFG_DB_MAX_OPEN_FILES 159 #define CFG_DB_MAX_OPEN_FILES 159
#define CFG_DB_DISK_PAGE_BUFFER_MEMORY 160
#define CFG_NODE_ARBIT_RANK 200 #define CFG_NODE_ARBIT_RANK 200
#define CFG_NODE_ARBIT_DELAY 201 #define CFG_NODE_ARBIT_DELAY 201
......
...@@ -93,7 +93,6 @@ Cmvmi::Cmvmi(const Configuration & conf) : ...@@ -93,7 +93,6 @@ Cmvmi::Cmvmi(const Configuration & conf) :
addRecSignal(GSN_TESTSIG, &Cmvmi::execTESTSIG); addRecSignal(GSN_TESTSIG, &Cmvmi::execTESTSIG);
subscriberPool.setSize(5); subscriberPool.setSize(5);
m_global_page_pool.setSize(1024+256, true);
const ndb_mgm_configuration_iterator * db = theConfig.getOwnConfigIterator(); const ndb_mgm_configuration_iterator * db = theConfig.getOwnConfigIterator();
for(unsigned j = 0; j<LogLevel::LOGLEVEL_CATEGORIES; j++){ for(unsigned j = 0; j<LogLevel::LOGLEVEL_CATEGORIES; j++){
...@@ -322,6 +321,17 @@ Cmvmi::execREAD_CONFIG_REQ(Signal* signal) ...@@ -322,6 +321,17 @@ Cmvmi::execREAD_CONFIG_REQ(Signal* signal)
theConfiguration.getOwnConfigIterator(); theConfiguration.getOwnConfigIterator();
ndbrequire(p != 0); ndbrequire(p != 0);
Uint64 page_buffer = 64*1024*1024;
ndb_mgm_get_int64_parameter(p, CFG_DB_DISK_PAGE_BUFFER_MEMORY, &page_buffer);
page_buffer /= GLOBAL_PAGE_SIZE; // in pages
if (page_buffer > 0)
{
page_buffer += LGMAN_LOG_BUFFER;
}
page_buffer += LCP_RESTORE_BUFFER;
m_global_page_pool.setSize(page_buffer + 64, true);
ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend(); ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend();
conf->senderRef = reference(); conf->senderRef = reference();
conf->senderData = senderData; conf->senderData = senderData;
......
...@@ -84,8 +84,6 @@ Pgman::Pgman(const Configuration & conf) : ...@@ -84,8 +84,6 @@ Pgman::Pgman(const Configuration & conf) :
m_cleanup_ptr.i = RNIL; m_cleanup_ptr.i = RNIL;
// should be a factor larger than number of pool pages // should be a factor larger than number of pool pages
m_page_entry_pool.setSize(2000);
m_page_request_pool.setSize(10000);
m_data_buffer_pool.setSize(1); m_data_buffer_pool.setSize(1);
m_page_hashlist.setSize(512); m_page_hashlist.setSize(512);
...@@ -115,6 +113,18 @@ Pgman::execREAD_CONFIG_REQ(Signal* signal) ...@@ -115,6 +113,18 @@ Pgman::execREAD_CONFIG_REQ(Signal* signal)
theConfiguration.getOwnConfigIterator(); theConfiguration.getOwnConfigIterator();
ndbrequire(p != 0); ndbrequire(p != 0);
Uint64 page_buffer = 64*1024*1024;
ndb_mgm_get_int64_parameter(p, CFG_DB_DISK_PAGE_BUFFER_MEMORY, &page_buffer);
if (page_buffer > 0)
{
page_buffer /= GLOBAL_PAGE_SIZE; // in pages
m_page_entry_pool.setSize(2*page_buffer);
m_page_request_pool.setSize(10000);
m_param.m_max_pages = page_buffer;
m_param.m_max_hot_pages = (page_buffer * 9) / 10;
}
ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend(); ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend();
conf->senderRef = reference(); conf->senderRef = reference();
conf->senderData = senderData; conf->senderData = senderData;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <dbtup/Dbtup.hpp> #include <dbtup/Dbtup.hpp>
#include <KeyDescriptor.hpp> #include <KeyDescriptor.hpp>
#define PAGES (4*32) #define PAGES LCP_RESTORE_BUFFER
Restore::Restore(const Configuration & conf) : Restore::Restore(const Configuration & conf) :
SimulatedBlock(RESTORE, conf), SimulatedBlock(RESTORE, conf),
......
...@@ -760,6 +760,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -760,6 +760,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"512k", "512k",
STR_VALUE(MAX_INT_RNIL)}, STR_VALUE(MAX_INT_RNIL)},
{
CFG_DB_DISK_PAGE_BUFFER_MEMORY,
"DiskPageBufferMemory",
DB_TOKEN,
"Number bytes on each "DB_TOKEN_PRINT" node allocated for disk page buffer cache",
ConfigInfo::CI_USED,
false,
ConfigInfo::CI_INT64,
"64M",
"4M",
"1024G" },
{ {
CFG_DB_START_PARTIAL_TIMEOUT, CFG_DB_START_PARTIAL_TIMEOUT,
"StartPartialTimeout", "StartPartialTimeout",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment