TODO 1 VMem

2 Resource Group Control

  • ResourceGroupGetQueryMemoryLimit(void) 用于获取内存限制的绝对大小 (非百分比)

2.1 Bypass

  • 绕开资源限制模式

  • Enabled when:

    • gp_resource_group_bypass is true: guc_gp.c

      {
          {"gp_resource_group_bypass", PGC_USERSET, RESOURCES,
              gettext_noop("If the value is true, the query in this session will not be limited by resource group."),
              NULL
          },
          &gp_resource_group_bypass,
          false,
          check_gp_resource_group_bypass, NULL, NULL
      }
      
    • Or command is one of:

      • SET
      • RESET
      • SHOW

2.2 Fixed Mem

固定内存大小

if (gp_resgroup_memory_query_fixed_mem)
        return (uint64) gp_resgroup_memory_query_fixed_mem * 1024L;

2.3 Memory Limit

queryMem = (uint64)(resgLimit *1024L *1024L / caps->concurrency);