Long signal buffer size configurable

Dbutil decreased memory footprint
Suma decreased memory footprint
(16M memory removed from default config)
This commit is contained in:
mronstrom@mysql.com 2004-08-23 12:01:40 +02:00
parent e1c3651fe7
commit 3aeb3b426d
9 changed files with 42 additions and 14 deletions

View file

@ -87,6 +87,8 @@
#define CFG_DB_UNDO_DATA_BUFFER 155
#define CFG_DB_REDO_BUFFER 156
#define CFG_DB_LONG_SIGNAL_BUFFER 157
#define CFG_NODE_ARBIT_RANK 200
#define CFG_NODE_ARBIT_DELAY 201

View file

@ -667,7 +667,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
CFG_DB_UNDO_INDEX_BUFFER,
"UndoIndexBuffer",
"DB",
"Number bytes on each DB node allocated for storing data",
"Number bytes on each DB node allocated for writing UNDO logs for index part",
ConfigInfo::USED,
false,
ConfigInfo::INT,
@ -679,7 +679,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
CFG_DB_UNDO_DATA_BUFFER,
"UndoDataBuffer",
"DB",
"Number bytes on each DB node allocated for storing data",
"Number bytes on each DB node allocated for writing UNDO logs for data part",
ConfigInfo::USED,
false,
ConfigInfo::INT,
@ -691,7 +691,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
CFG_DB_REDO_BUFFER,
"RedoBuffer",
"DB",
"Number bytes on each DB node allocated for storing data",
"Number bytes on each DB node allocated for writing REDO logs",
ConfigInfo::USED,
false,
ConfigInfo::INT,
@ -699,6 +699,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
1 * (1024 * 1024),
MAX_INT_RNIL},
{
CFG_DB_LONG_SIGNAL_BUFFER,
"LongMessageBuffer",
"DB",
"Number bytes on each DB node allocated for internal long messages",
ConfigInfo::USED,
false,
ConfigInfo::INT,
1 * (1024 * 1024),
1 * (1024 * 1024),
MAX_INT_RNIL},
{
CFG_DB_START_PARTIAL_TIMEOUT,
"StartPartialTimeout",

View file

@ -54,6 +54,16 @@ Cmvmi::Cmvmi(const Configuration & conf) :
{
BLOCK_CONSTRUCTOR(Cmvmi);
Uint32 long_sig_buffer_size;
const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
ndbrequire(p != 0);
ndb_mgm_get_int_parameter(p, CFG_DB_LONG_SIGNAL_BUFFER,
&long_sig_buffer_size);
long_sig_buffer_size= long_sig_buffer_size / 256;
g_sectionSegmentPool.setSize(long_sig_buffer_size);
// Add received signals
addRecSignal(GSN_CONNECT_REP, &Cmvmi::execCONNECT_REP);
addRecSignal(GSN_DISCONNECT_REP, &Cmvmi::execDISCONNECT_REP);

View file

@ -112,7 +112,7 @@ DbUtil::DbUtil(const Configuration & conf) :
addRecSignal(GSN_UTIL_RELEASE_CONF, &DbUtil::execUTIL_RELEASE_CONF);
addRecSignal(GSN_UTIL_RELEASE_REF, &DbUtil::execUTIL_RELEASE_REF);
c_pagePool.setSize(100);
c_pagePool.setSize(10);
c_preparePool.setSize(1); // one parallel prepare at a time
c_preparedOperationPool.setSize(5); // three hardcoded, two for test
c_operationPool.setSize(64); // 64 parallel operations

View file

@ -37,7 +37,7 @@
#include <signaldata/UtilLock.hpp>
#include <SimpleProperties.hpp>
#define UTIL_WORDS_PER_PAGE 8191
#define UTIL_WORDS_PER_PAGE 1023
/**
* @class DbUtil

View file

@ -673,6 +673,7 @@ Suma::execDUMP_STATE_ORD(Signal* signal){
*
*/
#if 0
void
SumaParticipant::convertNameToId(SubscriptionPtr subPtr, Signal * signal)
{
@ -703,6 +704,7 @@ SumaParticipant::convertNameToId(SubscriptionPtr subPtr, Signal * signal)
sendSubCreateConf(signal, subPtr.p->m_subscriberRef, subPtr);
}
}
#endif
void
@ -719,6 +721,7 @@ SumaParticipant::addTableId(Uint32 tableId,
psyncRec->m_tableList.append(&tableId, 1);
}
#if 0
void
SumaParticipant::execGET_TABLEID_CONF(Signal * signal)
{
@ -766,6 +769,8 @@ SumaParticipant::execGET_TABLEID_REF(Signal * signal)
SubCreateRef::SignalLength,
JBB);
}
#endif
/*************************************************************
*
@ -999,6 +1004,7 @@ SumaParticipant::execSUB_CREATE_REQ(Signal* signal) {
}
}
break;
#if 0
case SubCreateReq::SelectiveTableSnapshot:
/**
* Tables specified by the user that does not exist
@ -1041,6 +1047,7 @@ SumaParticipant::execSUB_CREATE_REQ(Signal* signal) {
return;
}
break;
#endif
case SubCreateReq::DatabaseSnapshot:
{
jam();

View file

@ -62,9 +62,10 @@ protected:
void execLIST_TABLES_CONF(Signal* signal);
void execGET_TABINFOREF(Signal* signal);
void execGET_TABINFO_CONF(Signal* signal);
#if 0
void execGET_TABLEID_CONF(Signal* signal);
void execGET_TABLEID_REF(Signal* signal);
#endif
/**
* Scan interface
*/
@ -275,7 +276,9 @@ public:
*/
// TODO we've got to fix this, this is to inefficient. Tomas
char m_tables[MAX_TABLES];
#if 0
char m_tableNames[MAX_TABLES][MAX_TAB_NAME_SIZE];
#endif
/**
* "Iterator" used to iterate through m_tableNames
*/

View file

@ -51,9 +51,10 @@ SumaParticipant::SumaParticipant(const Configuration & conf) :
//addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFO_REF);
addRecSignal(GSN_GET_TABINFO_CONF, &SumaParticipant::execGET_TABINFO_CONF);
addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFOREF);
#if 0
addRecSignal(GSN_GET_TABLEID_CONF, &SumaParticipant::execGET_TABLEID_CONF);
addRecSignal(GSN_GET_TABLEID_REF, &SumaParticipant::execGET_TABLEID_REF);
#endif
/**
* Dih interface
*/

View file

@ -38,13 +38,6 @@
*/
SectionSegmentPool g_sectionSegmentPool;
static int f(int v){
g_sectionSegmentPool.setSize(v);
return v;
}
static int v = f(2048);
bool
import(Ptr<SectionSegment> & first, const Uint32 * src, Uint32 len){
/**