Commit e0a550ed authored by unknown's avatar unknown

Removed 0.5M in unused construct in TRIX

Used proper config param for setting trigger pool size in TUP
Minimum long signal buffer set to 0.5M instead of 1M


ndb/src/common/mgmcommon/ConfigInfo.cpp:
  Minimum long signal buffer = 0.5M from 1M
ndb/src/kernel/blocks/dbtup/DbtupGen.cpp:
  Used max no of triggers to define trigger pool in TUP
ndb/src/kernel/blocks/trix/Trix.cpp:
  Removed unused construct wasting 0.5M of memory
ndb/src/kernel/blocks/trix/Trix.hpp:
  Removed unused construct wasting 0.5M of memory
parent 08fdd504
...@@ -708,7 +708,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ...@@ -708,7 +708,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
false, false,
ConfigInfo::INT, ConfigInfo::INT,
1 * (1024 * 1024), 1 * (1024 * 1024),
1 * (1024 * 1024), 512 * 1024,
MAX_INT_RNIL}, MAX_INT_RNIL},
{ {
......
...@@ -638,6 +638,7 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal) ...@@ -638,6 +638,7 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal)
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_PAGE, &tmp)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_PAGE, &tmp));
Uint64 pages = (tmp * 2048 + (ZWORDS_ON_PAGE - 1))/ (Uint64)ZWORDS_ON_PAGE; Uint64 pages = (tmp * 2048 + (ZWORDS_ON_PAGE - 1))/ (Uint64)ZWORDS_ON_PAGE;
cnoOfPage = (Uint32)pages; cnoOfPage = (Uint32)pages;
Uint32 noOfTriggers= 0;
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_PAGE_RANGE, &tmp)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_PAGE_RANGE, &tmp));
initPageRangeSize(tmp); initPageRangeSize(tmp);
...@@ -647,10 +648,13 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal) ...@@ -647,10 +648,13 @@ void Dbtup::execREAD_CONFIG_REQ(Signal* signal)
Uint32 noOfStoredProc; Uint32 noOfStoredProc;
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_STORED_PROC, ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_TUP_STORED_PROC,
&noOfStoredProc)); &noOfStoredProc));
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TRIGGERS,
&noOfTriggers));
cnoOfTabDescrRec = (cnoOfTabDescrRec & 0xFFFFFFF0) + 16; cnoOfTabDescrRec = (cnoOfTabDescrRec & 0xFFFFFFF0) + 16;
c_storedProcPool.setSize(noOfStoredProc); c_storedProcPool.setSize(noOfStoredProc);
c_buildIndexPool.setSize(c_noOfBuildIndexRec); c_buildIndexPool.setSize(c_noOfBuildIndexRec);
c_triggerPool.setSize(noOfTriggers);
initRecords(); initRecords();
czero = 0; czero = 0;
...@@ -725,8 +729,6 @@ void Dbtup::initRecords() ...@@ -725,8 +729,6 @@ void Dbtup::initRecords()
sizeof(RestartInfoRecord), sizeof(RestartInfoRecord),
cnoOfRestartInfoRec); cnoOfRestartInfoRec);
// Trigger data
c_triggerPool.setSize(cnoOfTablerec*c_maxTriggersPerTable);
tablerec = (Tablerec*)allocRecord("Tablerec", tablerec = (Tablerec*)allocRecord("Tablerec",
sizeof(Tablerec), sizeof(Tablerec),
......
...@@ -47,8 +47,7 @@ Trix::Trix(const Configuration & conf) : ...@@ -47,8 +47,7 @@ Trix::Trix(const Configuration & conf) :
c_masterTrixRef(0), c_masterTrixRef(0),
c_noNodesFailed(0), c_noNodesFailed(0),
c_noActiveNodes(0), c_noActiveNodes(0),
c_theSubscriptions(c_theSubscriptionRecPool), c_theSubscriptions(c_theSubscriptionRecPool)
c_thePages(c_thePagePool)
{ {
BLOCK_CONSTRUCTOR(Trix); BLOCK_CONSTRUCTOR(Trix);
...@@ -90,7 +89,6 @@ Trix::Trix(const Configuration & conf) : ...@@ -90,7 +89,6 @@ Trix::Trix(const Configuration & conf) :
// Allocate pool sizes // Allocate pool sizes
c_theAttrOrderBufferPool.setSize(100); c_theAttrOrderBufferPool.setSize(100);
c_theSubscriptionRecPool.setSize(100); c_theSubscriptionRecPool.setSize(100);
c_thePagePool.setSize(16);
ArrayList<SubscriptionRecord> subscriptions(c_theSubscriptionRecPool); ArrayList<SubscriptionRecord> subscriptions(c_theSubscriptionRecPool);
SubscriptionRecPtr subptr; SubscriptionRecPtr subptr;
......
...@@ -138,19 +138,6 @@ private: ...@@ -138,19 +138,6 @@ private:
*/ */
ArrayList<SubscriptionRecord> c_theSubscriptions; ArrayList<SubscriptionRecord> c_theSubscriptions;
// Linear memory abstraction
#define TRIX_WORDS_PER_PAGE 8191
struct Page32 {
Uint32 data[TRIX_WORDS_PER_PAGE];
Uint32 nextPool;
};
typedef Ptr<Page32> Page32Ptr;
ArrayPool<Page32> c_thePagePool;
Array<Page32> c_thePages;
// Private methods
// System start // System start
void execSTTOR(Signal* signal); void execSTTOR(Signal* signal);
void execNDB_STTOR(Signal* signal); void execNDB_STTOR(Signal* signal);
......
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