gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

NEW SYNTAX of resource group cpuset

Open charliettxx opened this issue 3 years ago • 1 comments

New SYNTAX of resource group cpuset for different master and segment Using syntax like cpuset="1;3-4" could different cpuset of master and segment by semicolon. For example, if we define cpuset="1;3-4", then master will use the first cpu core, segments will use third and fourth core.

CREATE and ALTER resource group support this new syntax.

postgres=# CREATE RESOURCE GROUP rg1 WITH (cpuset='1;2-3');
CREATE RESOURCE GROUP
postgres=# select groupname, cpuset from gp_toolkit.gp_resgroup_config where groupname = 'rg1';
 groupname | cpuset 
-----------+--------
 rg1       | 1;2-3
(1 row)

postgres=# ALTER resource group rg1 SET cpuset '4;5-6';
ALTER RESOURCE GROUP
postgres=# select groupname, cpuset from gp_toolkit.gp_resgroup_config where groupname = 'rg1';
 groupname | cpuset 
-----------+--------
 rg1       | 4;5-6
(1 row)

we didn't make too much motification on Resource group. For differentiate on mater and segment, seperating cpuset by semicolon, then apply the first half of it to master and second half to segment.

Here are some reminders before you submit the pull request

  • [ ] Add tests for the change
  • [ ] Document changes
  • [ ] Communicate in the mailing list if needed
  • [ ] Pass make installcheck
  • [ ] Review a PR in return to support the community

charliettxx avatar Sep 05 '22 09:09 charliettxx

more discussions at here https://jira.eng.vmware.com/browse/GPSERVER-195

charliettxx avatar Sep 08 '22 08:09 charliettxx