You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-505 Performance improvements to ExeMgr
This fix improves the performance of ExeMgr by doing the following: * Significantly reduces the amount of time the xml configuration is scanned * Uses a much faster way to determine the CPU core count * Reduces the amount of times certain allocations are executed * Rowgroup pre-allocates vectors for 1024 rows This improves performance for the first query of a connection and the performance for smaller result sets. It may well improve performance in other areas too.
This commit is contained in:
@ -141,29 +141,7 @@ uint32_t CGroupConfigurator::getNumCoresFromProc()
|
||||
GetSystemInfo(&siSysInfo);
|
||||
return siSysInfo.dwNumberOfProcessors;
|
||||
#else
|
||||
ifstream cpuinfo("/proc/cpuinfo");
|
||||
|
||||
if (!cpuinfo.good())
|
||||
return 0;
|
||||
|
||||
unsigned nc = 0;
|
||||
|
||||
regex re("Processor\\s*:\\s*[0-9]+", regex::normal|regex::icase);
|
||||
|
||||
string line;
|
||||
|
||||
getline(cpuinfo, line);
|
||||
|
||||
unsigned i = 0;
|
||||
while (i < 10000 && cpuinfo.good() && !cpuinfo.eof())
|
||||
{
|
||||
if (regex_match(line, re))
|
||||
nc++;
|
||||
|
||||
getline(cpuinfo, line);
|
||||
|
||||
++i;
|
||||
}
|
||||
uint32_t nc = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
|
||||
return nc;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user