trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nonstop-qfchen <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: fix JIRA-1739 to aggressively al...
Date Thu, 07 Jan 2016 20:33:29 GMT
Github user nonstop-qfchen commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/250#discussion_r49122144
  
    --- Diff: core/sql/sqlcomp/nadefaults.cpp ---
    @@ -4333,59 +4336,8 @@ void NADefaults::updateSystemParameters(NABoolean reInit)
     
         case MAX_ESPS_PER_CPU_PER_OP:
           {
    -        // set 2 ESPs per node, as a starting point.
    -        #define DEFAULT_ESPS_PER_NODE 2
    -
    -        Lng32 numESPsPerNode = DEFAULT_ESPS_PER_NODE;
    -        Lng32 coresPerNode = 1;        
    -          // 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);
    -
    -          // number of POS TSE
    -        Lng32 numTSEsPerCluster = gpLinux->numTSEsForPOS();
    -
    -          // cluster nodes
    -        Lng32 nodesdPerCluster = gpClusterInfo->getTotalNumberOfCPUs();
    -
    -          // TSEs per node
    -        Lng32 TSEsPerNode = numTSEsPerCluster/nodesdPerCluster;
    -
    -          // cores per node
    -        coresPerNode = gpClusterInfo->numberOfCpusPerSMP();
    -
    -          // For Linux/nt, we conservatively allocate ESPs per node as follows
    -          // - 1 ESP per 2 cpu cores if cores are equal or less than TSEs
    -          // - 1 ESP per TSE if number of cores is more than double the TSEs
    -          // - 1 ESP per 2 TSEs if cores are more than TSEs but less than double the
TSEs
    -          // - 1 ESP per node. Only possible on NT or workstations
    -          //      - number of cores less than TSEs and there are 1 or 2 cpur cores per
node
    -          //      - number of TSEs is less than cpu cores and there 1 or 2 TSEs per node.
    -          //        This case is probable if virtual nodes are used
    -
    -          // TSEsPerNode is 0 for arkcmps started by the seapilot universal comsumers
    -          // in this case we only consider cpu cores
    -        if ((coresPerNode <= TSEsPerNode) || (TSEsPerNode == 0))
    -        {
    -            if (coresPerNode > 1)
    -                numESPsPerNode = DEFAULT_ESPS_PER_NODE; 
    -        }
    -        else if (coresPerNode > (TSEsPerNode*2))
    -        {
    -             numESPsPerNode = TSEsPerNode;
    -        }
    -        else if (TSEsPerNode > 1)
    -        {
    -             numESPsPerNode = TSEsPerNode/2;
    -        }
    -        else // not really needed since numESPsPerNode is set to 1 from above
    -        {
    -             numESPsPerNode = DEFAULT_ESPS_PER_NODE;
    -        }
    -        
    -
    -        ftoa_((float)(numESPsPerNode)/(float)(coresPerNode), valuestr);
    +        float espsPerCore = computeNumESPsPerCore(FALSE);
    --- End diff --
    
    NADefaults::updateSystemParameters() is a bootstrap function, called when
    construct a new NADefaults object, or during the initialization of OSIM.
    
    During the call, a subset of the CQDs are influenced by the system
    parameters, such as # of nodes.
    
    So I think it makes sense to pass FALSE to it for now. Once we decide to
    turn on the aggressive mode, we need to change it to TRUE.
    
    Thanks
    
    On Thu, Jan 7, 2016 at 2:12 PM, Hans Zeller <notifications@github.com>
    wrote:
    
    > In core/sql/sqlcomp/nadefaults.cpp
    > <https://github.com/apache/incubator-trafodion/pull/250#discussion_r49120076>
    > :
    >
    > > -        else if (coresPerNode > (TSEsPerNode*2))
    > > -        {
    > > -             numESPsPerNode = TSEsPerNode;
    > > -        }
    > > -        else if (TSEsPerNode > 1)
    > > -        {
    > > -             numESPsPerNode = TSEsPerNode/2;
    > > -        }
    > > -        else // not really needed since numESPsPerNode is set to 1 from above
    > > -        {
    > > -             numESPsPerNode = DEFAULT_ESPS_PER_NODE;
    > > -        }
    > > -
    > > -
    > > -        ftoa_((float)(numESPsPerNode)/(float)(coresPerNode), valuestr);
    > > +        float espsPerCore = computeNumESPsPerCore(FALSE);
    >
    > It makes a LOT more sense now with the complete code. Wouldn't it be more
    > consistent if we also would use the AGGRESSIVE_ESP_ALLOCATION_PER_CORE CQD
    > here instead of the hard-coded FALSE? Is this method called before or after
    > reading the system defaults table?
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/incubator-trafodion/pull/250/files#r49120076>.
    >
    
    
    
    -- 
    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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message