mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
Long signal buffer size configurable
Dbutil decreased memory footprint Suma decreased memory footprint (16M memory removed from default config)
This commit is contained in:
parent
e1c3651fe7
commit
3aeb3b426d
9 changed files with 42 additions and 14 deletions
|
@ -87,6 +87,8 @@
|
||||||
#define CFG_DB_UNDO_DATA_BUFFER 155
|
#define CFG_DB_UNDO_DATA_BUFFER 155
|
||||||
#define CFG_DB_REDO_BUFFER 156
|
#define CFG_DB_REDO_BUFFER 156
|
||||||
|
|
||||||
|
#define CFG_DB_LONG_SIGNAL_BUFFER 157
|
||||||
|
|
||||||
#define CFG_NODE_ARBIT_RANK 200
|
#define CFG_NODE_ARBIT_RANK 200
|
||||||
#define CFG_NODE_ARBIT_DELAY 201
|
#define CFG_NODE_ARBIT_DELAY 201
|
||||||
|
|
||||||
|
|
|
@ -667,7 +667,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
|
||||||
CFG_DB_UNDO_INDEX_BUFFER,
|
CFG_DB_UNDO_INDEX_BUFFER,
|
||||||
"UndoIndexBuffer",
|
"UndoIndexBuffer",
|
||||||
"DB",
|
"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,
|
ConfigInfo::USED,
|
||||||
false,
|
false,
|
||||||
ConfigInfo::INT,
|
ConfigInfo::INT,
|
||||||
|
@ -679,7 +679,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
|
||||||
CFG_DB_UNDO_DATA_BUFFER,
|
CFG_DB_UNDO_DATA_BUFFER,
|
||||||
"UndoDataBuffer",
|
"UndoDataBuffer",
|
||||||
"DB",
|
"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,
|
ConfigInfo::USED,
|
||||||
false,
|
false,
|
||||||
ConfigInfo::INT,
|
ConfigInfo::INT,
|
||||||
|
@ -691,7 +691,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
|
||||||
CFG_DB_REDO_BUFFER,
|
CFG_DB_REDO_BUFFER,
|
||||||
"RedoBuffer",
|
"RedoBuffer",
|
||||||
"DB",
|
"DB",
|
||||||
"Number bytes on each DB node allocated for storing data",
|
"Number bytes on each DB node allocated for writing REDO logs",
|
||||||
ConfigInfo::USED,
|
ConfigInfo::USED,
|
||||||
false,
|
false,
|
||||||
ConfigInfo::INT,
|
ConfigInfo::INT,
|
||||||
|
@ -699,6 +699,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
|
||||||
1 * (1024 * 1024),
|
1 * (1024 * 1024),
|
||||||
MAX_INT_RNIL},
|
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,
|
CFG_DB_START_PARTIAL_TIMEOUT,
|
||||||
"StartPartialTimeout",
|
"StartPartialTimeout",
|
||||||
|
|
|
@ -54,6 +54,16 @@ Cmvmi::Cmvmi(const Configuration & conf) :
|
||||||
{
|
{
|
||||||
BLOCK_CONSTRUCTOR(Cmvmi);
|
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
|
// Add received signals
|
||||||
addRecSignal(GSN_CONNECT_REP, &Cmvmi::execCONNECT_REP);
|
addRecSignal(GSN_CONNECT_REP, &Cmvmi::execCONNECT_REP);
|
||||||
addRecSignal(GSN_DISCONNECT_REP, &Cmvmi::execDISCONNECT_REP);
|
addRecSignal(GSN_DISCONNECT_REP, &Cmvmi::execDISCONNECT_REP);
|
||||||
|
|
|
@ -112,7 +112,7 @@ DbUtil::DbUtil(const Configuration & conf) :
|
||||||
addRecSignal(GSN_UTIL_RELEASE_CONF, &DbUtil::execUTIL_RELEASE_CONF);
|
addRecSignal(GSN_UTIL_RELEASE_CONF, &DbUtil::execUTIL_RELEASE_CONF);
|
||||||
addRecSignal(GSN_UTIL_RELEASE_REF, &DbUtil::execUTIL_RELEASE_REF);
|
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_preparePool.setSize(1); // one parallel prepare at a time
|
||||||
c_preparedOperationPool.setSize(5); // three hardcoded, two for test
|
c_preparedOperationPool.setSize(5); // three hardcoded, two for test
|
||||||
c_operationPool.setSize(64); // 64 parallel operations
|
c_operationPool.setSize(64); // 64 parallel operations
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
#include <signaldata/UtilLock.hpp>
|
#include <signaldata/UtilLock.hpp>
|
||||||
#include <SimpleProperties.hpp>
|
#include <SimpleProperties.hpp>
|
||||||
|
|
||||||
#define UTIL_WORDS_PER_PAGE 8191
|
#define UTIL_WORDS_PER_PAGE 1023
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @class DbUtil
|
* @class DbUtil
|
||||||
|
|
|
@ -673,6 +673,7 @@ Suma::execDUMP_STATE_ORD(Signal* signal){
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
void
|
void
|
||||||
SumaParticipant::convertNameToId(SubscriptionPtr subPtr, Signal * signal)
|
SumaParticipant::convertNameToId(SubscriptionPtr subPtr, Signal * signal)
|
||||||
{
|
{
|
||||||
|
@ -703,6 +704,7 @@ SumaParticipant::convertNameToId(SubscriptionPtr subPtr, Signal * signal)
|
||||||
sendSubCreateConf(signal, subPtr.p->m_subscriberRef, subPtr);
|
sendSubCreateConf(signal, subPtr.p->m_subscriberRef, subPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -719,6 +721,7 @@ SumaParticipant::addTableId(Uint32 tableId,
|
||||||
psyncRec->m_tableList.append(&tableId, 1);
|
psyncRec->m_tableList.append(&tableId, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
void
|
void
|
||||||
SumaParticipant::execGET_TABLEID_CONF(Signal * signal)
|
SumaParticipant::execGET_TABLEID_CONF(Signal * signal)
|
||||||
{
|
{
|
||||||
|
@ -766,6 +769,8 @@ SumaParticipant::execGET_TABLEID_REF(Signal * signal)
|
||||||
SubCreateRef::SignalLength,
|
SubCreateRef::SignalLength,
|
||||||
JBB);
|
JBB);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
|
@ -999,6 +1004,7 @@ SumaParticipant::execSUB_CREATE_REQ(Signal* signal) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#if 0
|
||||||
case SubCreateReq::SelectiveTableSnapshot:
|
case SubCreateReq::SelectiveTableSnapshot:
|
||||||
/**
|
/**
|
||||||
* Tables specified by the user that does not exist
|
* Tables specified by the user that does not exist
|
||||||
|
@ -1041,6 +1047,7 @@ SumaParticipant::execSUB_CREATE_REQ(Signal* signal) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case SubCreateReq::DatabaseSnapshot:
|
case SubCreateReq::DatabaseSnapshot:
|
||||||
{
|
{
|
||||||
jam();
|
jam();
|
||||||
|
|
|
@ -62,9 +62,10 @@ protected:
|
||||||
void execLIST_TABLES_CONF(Signal* signal);
|
void execLIST_TABLES_CONF(Signal* signal);
|
||||||
void execGET_TABINFOREF(Signal* signal);
|
void execGET_TABINFOREF(Signal* signal);
|
||||||
void execGET_TABINFO_CONF(Signal* signal);
|
void execGET_TABINFO_CONF(Signal* signal);
|
||||||
|
#if 0
|
||||||
void execGET_TABLEID_CONF(Signal* signal);
|
void execGET_TABLEID_CONF(Signal* signal);
|
||||||
void execGET_TABLEID_REF(Signal* signal);
|
void execGET_TABLEID_REF(Signal* signal);
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Scan interface
|
* Scan interface
|
||||||
*/
|
*/
|
||||||
|
@ -275,7 +276,9 @@ public:
|
||||||
*/
|
*/
|
||||||
// TODO we've got to fix this, this is to inefficient. Tomas
|
// TODO we've got to fix this, this is to inefficient. Tomas
|
||||||
char m_tables[MAX_TABLES];
|
char m_tables[MAX_TABLES];
|
||||||
|
#if 0
|
||||||
char m_tableNames[MAX_TABLES][MAX_TAB_NAME_SIZE];
|
char m_tableNames[MAX_TABLES][MAX_TAB_NAME_SIZE];
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* "Iterator" used to iterate through m_tableNames
|
* "Iterator" used to iterate through m_tableNames
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -51,9 +51,10 @@ SumaParticipant::SumaParticipant(const Configuration & conf) :
|
||||||
//addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFO_REF);
|
//addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFO_REF);
|
||||||
addRecSignal(GSN_GET_TABINFO_CONF, &SumaParticipant::execGET_TABINFO_CONF);
|
addRecSignal(GSN_GET_TABINFO_CONF, &SumaParticipant::execGET_TABINFO_CONF);
|
||||||
addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFOREF);
|
addRecSignal(GSN_GET_TABINFOREF, &SumaParticipant::execGET_TABINFOREF);
|
||||||
|
#if 0
|
||||||
addRecSignal(GSN_GET_TABLEID_CONF, &SumaParticipant::execGET_TABLEID_CONF);
|
addRecSignal(GSN_GET_TABLEID_CONF, &SumaParticipant::execGET_TABLEID_CONF);
|
||||||
addRecSignal(GSN_GET_TABLEID_REF, &SumaParticipant::execGET_TABLEID_REF);
|
addRecSignal(GSN_GET_TABLEID_REF, &SumaParticipant::execGET_TABLEID_REF);
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* Dih interface
|
* Dih interface
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -38,13 +38,6 @@
|
||||||
*/
|
*/
|
||||||
SectionSegmentPool g_sectionSegmentPool;
|
SectionSegmentPool g_sectionSegmentPool;
|
||||||
|
|
||||||
static int f(int v){
|
|
||||||
g_sectionSegmentPool.setSize(v);
|
|
||||||
return v;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int v = f(2048);
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
import(Ptr<SectionSegment> & first, const Uint32 * src, Uint32 len){
|
import(Ptr<SectionSegment> & first, const Uint32 * src, Uint32 len){
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue