trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #1228: [TRAFODION-2733] Provide an improved...
Date Wed, 13 Sep 2017 00:14:26 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/1228#discussion_r138498212
  
    --- Diff: core/sql/generator/GenPreCode.cpp ---
    @@ -2154,34 +2154,10 @@ RelExpr * RelRoot::preCodeGen(Generator * generator,
           // Compute the total available memory quota for BMOs
           NADefaults &defs               = ActiveSchemaDB()->getDefaults();
     
    -      // total per CPU
    -      double m = defs.getAsDouble(EXE_MEMORY_LIMIT_PER_CPU) * (1024*1024);
    -
    -      // total memory usage for all nBMOs 
    -      double m1 = (generator->getTotalNBMOsMemoryPerCPU()).value();
    -
    -      // total memory limit for all BMOs
    -      double m2 = m-m1;
    -
    -      double ratio = 
    -          defs.getAsDouble(EXE_MEMORY_LIMIT_NONBMOS_PERCENT) / 100;
    -
    -      if ( m2 < 0 ) {
    -         // EXE_MEMORY_LIMIT_PER_CPU is set too small, set the total 
    -         // memory limit for BMOs to zero. When the memory quota for
    -         // each BMO is computed (via method RelExpr::computeMemoryQuota()),
    -         // the lower-bound for each BMO will kick in and each will receive
    -         // a quota equal to the lower-bound value.
    -         m2 = 0;
    -      } else { 
    -
    -         // nBMOs use more memory than the portion, adjust m2 to 
    -         // that of (1-ratio)*m
    -         if (m1 > m*ratio )
    -           m2 = m*(1-ratio);
    -      }
    +      // total per node
    +      double m = defs.getAsDouble(BMO_MEMORY_LIMIT_PER_NODE) * (1024*1024);
    --- End diff --
    
    Will do


---

Mime
View raw message