You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hawq.apache.org by jiny2 <gi...@git.apache.org> on 2015/12/01 04:14:49 UTC

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

GitHub user jiny2 opened a pull request:

    https://github.com/apache/incubator-hawq/pull/144

    HAWQ-201. Resource uneven or fragment problem may cause resource queu…

    This fix is to let resource manager actively raise water level to try to deal with possible resource uneven, resource fragment problem.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiny2/incubator-hawq HAWQ-201

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-hawq/pull/144.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #144
    
----
commit 00a2e2701baf9be70e2f68cb4805a638f6270d58
Author: Yi Jin <yj...@pivotal.io>
Date:   2015-12-01T03:14:09Z

    HAWQ-201. Resource uneven or fragment problem may cause resource queue goes into long term pause

----


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 closed the pull request at:

    https://github.com/apache/incubator-hawq/pull/144


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on the pull request:

    https://github.com/apache/incubator-hawq/pull/144#issuecomment-161488904
  
    The overall fix is good to me. +1


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/144#discussion_r46507170
  
    --- Diff: src/backend/cdb/cdbvars.c ---
    @@ -350,6 +350,8 @@ int		rm_resource_allocation_timeout;	/* How may seconds to wait before
     										   request. */
     int		rm_resource_timeout;		/* How many seconds to wait before returning
     									   resource back to the resource broker. */
    +int		rm_request_timeoutcheck_interval;
    --- End diff --
    
    Fixed.


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

Posted by jiny2 <gi...@git.apache.org>.
Github user jiny2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/144#discussion_r46507019
  
    --- Diff: src/backend/resourcemanager/resourcemanager.c ---
    @@ -2168,6 +2169,37 @@ int generateAllocRequestToBroker(void)
     
     	elog(RMLOG, "Resource manager now needs %d GRM containers.", reqcore);
     
    +	/*
    +	 * Check if should raise water level to deal with resource fragment or
    +	 * resource uneven problems. We trigger this logic only when no resource
    +	 * request caused by lack of resource, and no pending resource are waited
    +	 * for.
    +	 */
    +	if ( reqcore <= 0 &&
    +		 mctrack->TotalPending.Core <= 0 &&
    +		 (PQUEMGR->hasResourceProblem[RESPROBLEM_FRAGMENT] ||
    +		  PQUEMGR->hasResourceProblem[RESPROBLEM_UNEVEN]   ||
    +		  PQUEMGR->hasResourceProblem[RESPROBLEM_TOOFEWSEG]) )
    +	{
    +		/* Check if it is possible to raise water level. */
    +		if ( mctrack->TotalAllocated.Core + 1 <=
    +			 PRESPOOL->GRMTotal.Core * PQUEMGR->GRMQueueMaxCapacity )
    +		{
    +			/*
    +			 * We only add one more GRM container to acquire, this will trigger
    +			 * the following logic to raise the water level.
    +			 */
    +			reqcore = 1;
    +			reqmem = reqcore * mctrack->MemCoreRatio;
    +
    +			PQUEMGR->hasResourceProblem[RESPROBLEM_FRAGMENT]  = false;
    --- End diff --
    
    Yes, adding more GRM containers can deal with three kinds of issues.


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/144#discussion_r46503124
  
    --- Diff: src/backend/cdb/cdbvars.c ---
    @@ -350,6 +350,8 @@ int		rm_resource_allocation_timeout;	/* How may seconds to wait before
     										   request. */
     int		rm_resource_timeout;		/* How many seconds to wait before returning
     									   resource back to the resource broker. */
    +int		rm_request_timeoutcheck_interval;
    --- End diff --
    
    A description here for rm_request_timeoutcheck_interval would be great.


---
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.
---

[GitHub] incubator-hawq pull request: HAWQ-201. Resource uneven or fragment...

Posted by huor <gi...@git.apache.org>.
Github user huor commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/144#discussion_r46503312
  
    --- Diff: src/backend/resourcemanager/resourcemanager.c ---
    @@ -2168,6 +2169,37 @@ int generateAllocRequestToBroker(void)
     
     	elog(RMLOG, "Resource manager now needs %d GRM containers.", reqcore);
     
    +	/*
    +	 * Check if should raise water level to deal with resource fragment or
    +	 * resource uneven problems. We trigger this logic only when no resource
    +	 * request caused by lack of resource, and no pending resource are waited
    +	 * for.
    +	 */
    +	if ( reqcore <= 0 &&
    +		 mctrack->TotalPending.Core <= 0 &&
    +		 (PQUEMGR->hasResourceProblem[RESPROBLEM_FRAGMENT] ||
    +		  PQUEMGR->hasResourceProblem[RESPROBLEM_UNEVEN]   ||
    +		  PQUEMGR->hasResourceProblem[RESPROBLEM_TOOFEWSEG]) )
    +	{
    +		/* Check if it is possible to raise water level. */
    +		if ( mctrack->TotalAllocated.Core + 1 <=
    +			 PRESPOOL->GRMTotal.Core * PQUEMGR->GRMQueueMaxCapacity )
    +		{
    +			/*
    +			 * We only add one more GRM container to acquire, this will trigger
    +			 * the following logic to raise the water level.
    +			 */
    +			reqcore = 1;
    +			reqmem = reqcore * mctrack->MemCoreRatio;
    +
    +			PQUEMGR->hasResourceProblem[RESPROBLEM_FRAGMENT]  = false;
    --- End diff --
    
    Here we are marking fragment, or uneven, or too few segments problem false, is this means that adding one more container would resolve all these three kind of issue?


---
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.
---