How to configure CPU / Memory requests for Castle and Palace

Article ID:360029935511
1 minute readKnowledge base

Issue

  • I want to change the CPU and/or memory settings of Castle

  • I want to change the CPU and/or memory settings of Palace

Resolution

The CJE project configuration accept attributes to control the CPU and Memory requests of Palace and Castle:

Attribute Default Description

palace_mem

1024

The amount of memory in MB requested by the Palace application

palace_cpus

0.2

The amount of CPU requested by the Palace application

castle_mem

768

The amount of memory in MB requested by the Castle application

castle_cpus

0.1

The amount of CPU requested by the Castle application

By default, those attributes are not added at all and the default values are in use.

How to use those attributes ?

In order to change either or all of those attributes:

  • edit the file .dna/project.config in the CJE project directory

  • add / edit either of those attributes under the [tiger] section. In this example we change Palace memory and CPU requests:

      [tiger]
      ...
      palace_mem = 2048
      palace_cpus = 0.4
  • apply the configuration to the project:

      cje upgrade --config-only --force
  • Restart the applications that the change applies to (in our example, only Palace configuration has been changed so we restart only palace)

      dna stop palace
      dna start palace
For more information about the attributes of those applications and how they are used, have a look at the files share/setup-templates/core/templates/palace/dna.config and share/setup-templates/core/templates/castle/dna.config in the CJE CLI directory