Github user nonstop-qfchen commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/250#discussion_r49039017
  
    --- Diff: core/sql/sqlcomp/nadefaults.cpp ---
    @@ -5914,6 +5866,73 @@ enum DefaultConstants 
NADefaults::validateAndInsert(const char *attrName,
     
     } // NADefaults::validateAndInsert()
     
    +float NADefaults::computeNumESPsPerCore(NABoolean aggressive)
    +{
    +   #define DEFAULT_ESPS_PER_NODE 2   // for conservation allocation
    +   #define DEFAULT_ESPS_PER_CORE 0.5 // for aggressive allocation
    +
    +     // Make sure the gpClusterInfo points at an NAClusterLinux object.
    +     // In osim simulation mode, the pointer can point at a NAClusterNSK
    +     // object, for which the method numTSEsForPOS() is not defined.
    +   NAClusterInfoLinux* gpLinux = 
dynamic_cast<NAClusterInfoLinux*>(gpClusterInfo);
    +   assert(gpLinux);                
    +
    +   // cores per node
    +   Lng32 coresPerNode = gpClusterInfo->numberOfCpusPerSMP();
    +
    +   if ( aggressive ) {
    +      float totalMemory = gpLinux->totalMemoryAvailable(); // per Node, in 
KB
    +      totalMemory /= 1024; // per Node, in GB
    +      totalMemory /= coresPerNode ; // per core, in GB
    +      totalMemory /= 2; // per core, 2GB per ESP
    +      return MINOF(DEFAULT_ESPS_PER_CORE, totalMemory);
    +   }
    +
    +   Lng32 numESPsPerNode = DEFAULT_ESPS_PER_NODE;
    +
    +     // number of POS TSE
    +   Lng32 numTSEsPerCluster = gpLinux->numTSEsForPOS();
    --- End diff --
    
    The complex code is commented out and an ELSE branch is added to
    effectively return 2 ESP per node for non-aggressive allocation scheme.
    
    The aggressive mode will be turned on after performance testing.
    
    On Wed, Jan 6, 2016 at 8:04 PM, Hans Zeller <[email protected]>
    wrote:
    
    > In core/sql/sqlcomp/nadefaults.cpp
    > 
<https://github.com/apache/incubator-trafodion/pull/250#discussion_r49035086>
    > :
    >
    > > +
    > > +   // cores per node
    > > +   Lng32 coresPerNode = gpClusterInfo->numberOfCpusPerSMP();
    > > +
    > > +   if ( aggressive ) {
    > > +      float totalMemory = gpLinux->totalMemoryAvailable(); // per 
Node, in KB
    > > +      totalMemory /= 1024; // per Node, in GB
    > > +      totalMemory /= coresPerNode ; // per core, in GB
    > > +      totalMemory /= 2; // per core, 2GB per ESP
    > > +      return MINOF(DEFAULT_ESPS_PER_CORE, totalMemory);
    > > +   }
    > > +
    > > +   Lng32 numESPsPerNode = DEFAULT_ESPS_PER_NODE;
    > > +
    > > +     // number of POS TSE
    > > +   Lng32 numTSEsPerCluster = gpLinux->numTSEsForPOS();
    >
    > My vote is for getting rid of the code, it's confusing. As you say, it's
    > probably not very useful anyway. Why don't we just use
    > MAX_ESPS_PER_CPU_PER_OP (default value of 0.5) for the non-aggressive
    > method?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/incubator-trafodion/pull/250/files#r49035086>.
    >
    
    
    
    -- 
    Regards, --Qifan



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to