SGInstanceProfile

The instance profile CR represent the CPU and memory resources assigned to each Pod of the cluster.


Kind: SGInstanceProfile

listKind: SGInstanceProfileList

plural: sginstanceprofiles

singular: sginstanceprofile


Spec

Property Required Updatable Default Type Description
cpu 1 string

CPU(s) (cores) used for every instance of a SGCluster. The suffix m specifies millicpus (where 1000m is equals to 1).

The number of cores set is assigned to the patroni container (that runs both Patroni and PostgreSQL).

A minimum of 2 cores is recommended.

memory 2Gi string

RAM allocated to every instance of a SGCluster. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

The amount of RAM set is assigned to the patroni container (that runs both Patroni and PostgreSQL).

A minimum of 2-4Gi is recommended.

hugePages object
RAM allocated for huge pages
containers generated object

The CPU(s) (cores) and RAM assigned to containers other than patroni container.

This section, if left empty, will be filled automatically by the operator with some defaults that can be proportional to the resources assigned to patroni container (except for the huge pages that are always left empty).

initContainers generated object
The CPU(s) (cores) and RAM assigned to init containers.
requests object

On containerized environments, when running production workloads, enforcing container’s resources requirements request to be equals to the limits allow to achieve the highest level of performance. Doing so, reduces the chances of leaving the workload with less resources than it requires. It also allow to set static CPU management policy that allows to guarantee a pod the usage exclusive CPUs on the node.

There are cases where you may need to set resource requirement request to a different value than limit. This section allow to do so but requires to enable such feature in the SGCluster and SGDistributedLogs (see .spec.nonProductionOptions section for each of those custom resources).

Example:

apiVersion: stackgres.io/v1
  kind: SGInstanceProfile
  metadata:
    name: size-l
  spec:
    cpu: "4"
    memory: 8Gi

Huge Pages

Property Required Updatable Default Type Description
hugepages-2Mi string

RAM allocated for huge pages with a size of 2Mi. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

By default the amount of RAM set is assigned to patroni container (that runs both Patroni and PostgreSQL).

hugepages-1Gi string

RAM allocated for huge pages with a size of 1Gi. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

By default the amount of RAM set is assigned to patroni container (that runs both Patroni and PostgreSQL).

Containers

Property Required Updatable Default Type Description
memory string
CPU(s) (cores) used for the specified Pod container. The suffix m specifies millicpus (where 1000m is equals to 1).
cpu string
RAM allocated to the specified Pod container. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.
hugePages string
RAM allocated for huge pages

Huge Pages for Containers

Property Required Updatable Default Type Description
hugepages-2Mi string

RAM allocated for huge pages with a size of 2Mi. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

The amount of RAM is assigned to the specified container.

hugepages-1Gi string

RAM allocated for huge pages with a size of 1Gi. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

The amount of RAM is assigned to the specified container.

Init Containers

Property Required Updatable Default Type Description
memory string
CPU(s) (cores) used for the specified Pod init container. The suffix m specifies millicpus (where 1000m is equals to 1).
cpu string
RAM allocated to the specified Pod init container. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.
hugePages string
RAM allocated for huge pages

Huge Pages for Init Containers

Property Required Updatable Default Type Description
hugepages-2Mi string

RAM allocated for huge pages with a size of 2Mi. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

The amount of RAM is assigned to the specified init container.

hugepages-1Gi string

RAM allocated for huge pages with a size of 1Gi. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

The amount of RAM is assigned to the specified init container.

Requests

Property Required Updatable Default Type Description
cpu string

CPU(s) (cores) used for every instance of a SGCluster. The suffix m specifies millicpus (where 1000m is equals to 1).

The number of cores set is assigned to the patroni container (that runs both Patroni and PostgreSQL).

memory string

RAM allocated to every instance of a SGCluster. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

The amount of RAM set is assigned to the patroni container (that runs both Patroni and PostgreSQL).

containers object
The CPU(s) (cores) and RAM assigned to containers other than patroni container.
initContainers object
The CPU(s) (cores) and RAM assigned to init containers.

Requests Containers

Property Required Updatable Default Type Description
memory string
CPU(s) (cores) used for the specified Pod container. The suffix m specifies millicpus (where 1000m is equals to 1).
cpu string
RAM allocated to the specified Pod container. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.

Requests Init Containers

Property Required Updatable Default Type Description
memory string
CPU(s) (cores) used for the specified Pod init container. The suffix m specifies millicpus (where 1000m is equals to 1).
cpu string
RAM allocated to the specified Pod init container. The suffix Mi or Gi specifies Mebibytes or Gibibytes, respectively.