1. 19 5月, 2017 4 次提交
    • P
      Implement resource group cpu rate limitation. · 2650f728
      Pengzhou Tang 提交于
      Resource group cpu rate limitation is implemented with cgroup on linux
      system. When resource group is enabled via GUC we check whether cgroup
      is available and properly configured on the system. A sub cgroup is
      created for each resource group, cpu quota and share weight will be set
      depends on the resource group configuration. The queries will run under
      these cgroups, and the cpu usage will be restricted by cgroup.
      
      The cgroups directory structures:
      * /sys/fs/cgroup/{cpu,cpuacct}/gpdb: the toplevel gpdb cgroup
      * /sys/fs/cgroup/{cpu,cpuacct}/gpdb/*/: cgroup for each resource group
      
      The logic for cpu rate limitation:
      
      * in toplevel gpdb cgroup we set the cpu quota and share weight as:
      
          cpu.cfs_quota_us := cpu.cfs_period_us * 256 * gp_resource_group_cpu_limit
          cpu.shares := 1024 * ncores
      
      * for each sub group we set the cpu quota and share weight as:
      
          sub.cpu.cfs_quota_us := -1
          sub.cpu.shares := top.cpu.shares * sub.cpu_rate_limit
      
      The minimum and maximum cpu percentage for a sub cgroup:
      
          sub.cpu.min_percentage := gp_resource_group_cpu_limit * sub.cpu_rate_limit
          sub.cpu.max_percentage := gp_resource_group_cpu_limit
      
      The acutal percentage depends on how busy the system is.
      
      gp_resource_group_cpu_limit is a GUC introduced to control the cpu
      resgroups assigned on each host.
      
          gpconfig -c gp_resource_group_cpu_limit -v '0.9'
      
      A new pipeline is created to perform the tests as we need privileged
      permission to enable and setup cgroups on the system.
      Signed-off-by: NNing Yu <nyu@pivotal.io>
      2650f728
    • V
      Make ICG tests pass when GPDB is compiled with disable-orca · 7e774f28
      Venkatesh Raghavan 提交于
      In the updated tests, we used functions like disable_xform and
      enable_xform to hint the optimizer to disallow/allow a particular
      physical node. However, these functions are only available when GPDB
      is built with GPORCA. Planner on the other hand accomplished this
      via a GUC.
      
      To avoid usage of these functions in tests, I have introduced couple
      of GUCS that mimic the same planner behavior but now for GPORCA.
      In this effort I needed to add an API inside GPORCA.
      7e774f28
    • A
      c00333c2
    • L
      gpperfmon: add test for skew_cpu and cpu_elapsed · bc76f2b6
      Larry Hamel 提交于
      Please note: this test does not pass on macOS because
      of an apparent failure of libsigar.
      
      See comment in the test on how to omit a test on MacOS.
      Signed-off-by: NMelanie Plageman <mplageman@pivotal.io>
      Signed-off-by: NLarry Hamel <lhamel@pivotal.io>
      bc76f2b6
  2. 18 5月, 2017 6 次提交
    • M
      gpperfmon: update gpperfmon install user doc IPv6 (#2468) · b437bdad
      Marbin Tan 提交于
      * gpperfmon: update gpperfmon install user docs IPv6
      
      Follow up for commit c52c768e
      
      [ci-skip]
      b437bdad
    • L
      gpperfmon: Add behave test for row skew. · 5c5771d5
      Larry Hamel 提交于
      Signed-off-by: NMarbin Tan <mtan@pivotal.io>
      5c5771d5
    • D
      Fix dumping of dropped columns during binary-upgrade · 13216bfd
      Daniel Gustafsson 提交于
      When dumping a table with dropped columns, the columns are created
      and dropped again during the restore to create binary-compatible
      heap files. Using TEXT as the dummy attribute however cause toast
      tables to be created, even for tables which have no other toastable
      attributes. This cause catalog bloat and cause problems for upgrade
      since the newly created toast table doesn't have a synchronized Oid
      in the dumpfile. Fix by using INTEGER instead.
      
      This is a partial backport of upstream commit 53fa850c
      which fixes this case and more (where the more part relies on code
      Greenplum has yet to merge, thus partial backport).
      
        commit 53fa850c
        Author: Tom Lane <tgl@sss.pgh.pa.us>
        Date:   Thu Jul 2 21:34:32 2009 +0000
      
          Fix up pg_dump's --binary-upgrade option so that it behaves properly with
      	inherited columns and check constraints.  Per my recent trouble report.
      13216bfd
    • D
      Avoid leaking a PQExpBuffer on non-dumpable objects · 820cdad7
      Daniel Gustafsson 提交于
      Defer creation of the PQExpBuffer until we know that the object is
      in fact dumpable to avoid leaking a few buffers.
      820cdad7
    • D
      Fix broken SQL in upgrade queries · b3bf2f87
      Daniel Gustafsson 提交于
      The opfamily dump in pg_dump had an unfortunate typo that snuck in
      with the initial pg_upgrade commit, and pg_dump had a broken check
      query. Fix syntax.
      b3bf2f87
    • D
      Support upgrading all 5.0 object types · 7ec83119
      Daniel Gustafsson 提交于
      Previously pg_upgrade was unable to upgrade from a 5.0 cluster due
      to Text Search objects, enums, extensions and VIEW rules were left
      out from the original import of pg_upgrade.  This adds support for
      these objects.
      
      Further, the binary-upgrade mode in pg_dump didn't synchronize the
      Oids for the functions associated with the language.  Extract and
      add the Oids into the dump to fix.
      
      Also expand comments and fix a missing static declaration function
      prototype.
      7ec83119
  3. 17 5月, 2017 10 次提交
  4. 16 5月, 2017 15 次提交
  5. 15 5月, 2017 3 次提交
    • V
      Streamline Orca Gucs · 9f2c838b
      Venkatesh Raghavan 提交于
      * Enable analyzing root partitions
      * Ensure that the name of the guc is clear
      * Remove double negation (where possible)
      * Update comments
      * Co-locate gucs that have similar purpose
      * Remove dead gucs
      * Classify them correctly so that they are no longer hidden
      9f2c838b
    • H
      Sync JSON functions with PostgreSQL 9.3.17. · 4b483ccf
      Heikki Linnakangas 提交于
      We had cherry-picked some of the PostgreSQL 9.3 functions, but not all the
      subsequent fixes to them. I believe we need at least upstream commit
      66008564 to fix github issue #2430, and surely the other bug fixes are
      needed too.
      
      Rather than cherry-pick individual commits, this replaces the JSON related
      source files with the upstream files in toto. This will make diffing and
      maintenance of these backported JSON function easier in the future.
      4b483ccf
    • P
      Make a copy of Gp_interconnect_snd_queue_depth for each interconnect setup · 7ed4a178
      Pengzhou Tang 提交于
      Formally, GPDB assumed Gp_interconnect_queue_depth was constant during the interconnect life-time which was incorrect for Cursors, if Gp_interconnect_queue_depth was changed after a Cursor was declared, a panic occurred. To avoid this, we make a copy of Gp_interconnect_queue_depth when interconnect is set up. Gp_interconnect_snd_queue_depth has no such problem because it is only used by senders and senders of Cursor will never receive the GUC change command.
      7ed4a178
  6. 13 5月, 2017 2 次提交