You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
MCOL-1847. Addressed feedback from Daniel.
Instead of a seperate param for cache size, we decided to allow an override of the NumBlocksPct param instead. If NumBlocksPct ends in an 'm' or a 'g', it will be interpreted as megabytes or gigabytes instead of a %age.
This commit is contained in:
@@ -427,12 +427,9 @@
|
||||
</DBRM_Worker10>
|
||||
<DBBC>
|
||||
<!-- The percentage of RAM to use for the disk block cache. Defaults to 70% -->
|
||||
<!-- Alternatively, this can be specified in absolute terms using
|
||||
the suffixes 'm' or 'g' to denote size in megabytes or gigabytes.-->
|
||||
<!-- <NumBlocksPct>70</NumBlocksPct> -->
|
||||
|
||||
<!-- If preferred, the user can specify cache size in terms of megabytes.
|
||||
If both Pct and MB are specified, PrimProc will use Pct. -->
|
||||
<!-- <NumBlocksInMB>2048</NumBlocksInMB> -->
|
||||
|
||||
<!-- <NumThreads>16</NumThreads> --> <!-- 1-256. Default is 16. -->
|
||||
<NumCaches>1</NumCaches><!-- # of parallel caches to instantiate -->
|
||||
<IOMTracing>0</IOMTracing>
|
||||
|
@@ -419,12 +419,9 @@
|
||||
</DBRM_Worker10>
|
||||
<DBBC>
|
||||
<!-- The percentage of RAM to use for the disk block cache. Defaults to 70% -->
|
||||
<!-- Alternatively, this can be specified in absolute terms using
|
||||
the suffixes 'm' or 'g' to denote size in megabytes or gigabytes.-->
|
||||
<NumBlocksPct>50</NumBlocksPct>
|
||||
|
||||
<!-- If preferred, the user can specify cache size in terms of megabytes.
|
||||
If both Pct and MB are specified, PrimProc will use Pct. -->
|
||||
<!-- <NumBlocksInMB>2048</NumBlocksInMB> -->
|
||||
|
||||
<!-- <NumThreads>16</NumThreads> --> <!-- 1-256. Default is 16. -->
|
||||
<NumCaches>1</NumCaches><!-- # of parallel caches to instantiate -->
|
||||
<IOMTracing>0</IOMTracing>
|
||||
|
@@ -503,16 +503,10 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
string strBlockPct = cf->getConfig(dbbc, "NumBlocksPct");
|
||||
string strBlockAbs = cf->getConfig(dbbc, "NumBlocksInMB");
|
||||
bool usePct = !(strBlockPct.empty()); // which to use. Prefer Pct if both are specified.
|
||||
|
||||
if (usePct)
|
||||
temp = atoi(strBlockPct.c_str());
|
||||
else
|
||||
temp = atoi(strBlockAbs.c_str());
|
||||
temp = atoi(strBlockPct.c_str());
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* TODO: implement handling for NumBlocksInMB */
|
||||
/* TODO: implement handling for the 'm' or 'g' chars in NumBlocksPct */
|
||||
if (temp > 0)
|
||||
BRPBlocksPct = temp;
|
||||
|
||||
@@ -532,19 +526,18 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
|
||||
#else
|
||||
if (usePct)
|
||||
if (temp > 0)
|
||||
BRPBlocksPct = temp;
|
||||
/* MCOL-1847. Did the user specify this in MB or GB? */
|
||||
int len = strBlockPct.length();
|
||||
if (strBlockPct[len-1] == 'g' || strBlockPct[len-1] == 'm')
|
||||
{
|
||||
if (temp > 0)
|
||||
BRPBlocksPct = temp;
|
||||
BRPBlocks = ((BRPBlocksPct / 100.0) * (double) cg.getTotalMemory()) / 8192;
|
||||
if (strBlockPct[len-1] == 'g')
|
||||
BRPBlocksPct *= 1024;
|
||||
BRPBlocks = BRPBlocksPct * 128; // 128 blocks per MB
|
||||
}
|
||||
else
|
||||
{
|
||||
if (temp > 0)
|
||||
BRPBlocks = temp * 128; // 128 blocks per MB.
|
||||
else
|
||||
BRPBlocks = 131072; // 1GB, why not.
|
||||
}
|
||||
BRPBlocks = ((BRPBlocksPct / 100.0) * (double) cg.getTotalMemory()) / 8192;
|
||||
#endif
|
||||
#if 0
|
||||
temp = toInt(cf->getConfig(dbbc, "NumThreads"));
|
||||
|
Reference in New Issue
Block a user