How to configure CPU / Memory requests for Castle and Palace

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

Environment

Resolution

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

AttributeDefaultDescription
palace_mem1024The amount of memory in MB requested by the Palace application
palace_cpus0.2The amount of CPU requested by the Palace application
castle_mem768The amount of memory in MB requested by the Castle application
castle_cpus0.1The 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
    

(Note: 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)

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.