Configure System Resources for Pulse Agents

You can limit the CPU and memory resources used by Pulse agents by configuring the vars.yml file.

A new systemd section is available in vars.yml to define CPU and memory limits for each agent.

This enables you to:

  • Limit CPU and memory usage for Pulse agents

  • Prevent Pulse agents from consuming excessive system resources

  • Allocate resources consistently across cluster nodes

  • Improve overall cluster stability and performance

  • Adjust resource limits based on the systemd version on the host


Configure Resource Limits

To manage CPU and memory limits for Pulse agents, update the systemd field in vars.yml.

systemd: - case: - range: From: "0" To: "231" pulseaxn: - service: CPUShares: "1024" MemoryLimit: 1G pulsejmx: - service: CPUShares: "1024" MemoryLimit: 1G pulselogs: - service: CPUShares: "1024" MemoryLimit: 1G pulsenode: - service: CPUShares: "1024" MemoryLimit: 3G pulseyarnmetrics: - service: CPUShares: "1024" MemoryLimit: 1G - case: - range: From: "232" To: "0" pulseaxn: - service: CPUWeight: "100" MemoryMax: 1G pulsejmx: - service: CPUWeight: "100" MemoryMax: 1G pulselogs: - service: CPUWeight: "100" MemoryMax: 1G pulsenode: - service: CPUWeight: "100" MemoryMax: 3G pulseyarnmetrics: - service: CPUWeight: "100" MemoryMax: 1G

The applied keys depend on the systemd version available on the host.


Manage CPU Resources

Pulse supports the following CPU configuration parameters:

  • The default value for CPUShares is 1024. Valid range: 2–262144

  • The default value for CPUWeight is 100. Valid range: 1–10000

If no CPU value is provided in vars.yml, Pulse applies the default value.

Lower values allocate fewer CPU resources, while higher values allocate more.


Manage Memory Resources

Pulse supports the following memory configuration parameters:

  • Use suffixes K, M, G, or T to specify units:

    • K = Kilobytes

    • M = Megabytes

    • G = Gigabytes

    • T = Terabytes

If no value is provided for MemoryMax or MemoryLimit, Pulse applies the default value of 1G.

Info

Assign the same memory value for both MemoryMax and MemoryLimit. The Hydra agent automatically applies the appropriate key based on the systemd version.

Only one systemd range applies per host. Pulse selects the correct range and applies the corresponding values.

For more information, see: systemd resource control documentation.


Increase System Resources

To increase CPU or memory limits, update the values in override.yml.

systemd: - case: - range: From: "0" To: "231" pulseaxn: - service: CPUShares: "1024" MemoryLimit: 1G pulsejmx: - service: CPUShares: "1024" MemoryLimit: 1G pulselogs: - service: CPUShares: "1024" MemoryLimit: 1G pulsenode: - service: CPUShares: "1024" MemoryLimit: 3G pulseyarnmetrics: - service: CPUShares: "1024" MemoryLimit: 1G - case: - range: From: "232" To: "0" pulseaxn: - service: CPUWeight: "100" MemoryMax: 1G pulsejmx: - service: CPUWeight: "100" MemoryMax: 1G pulselogs: - service: CPUWeight: "100" MemoryMax: 1G pulsenode: - service: CPUWeight: "100" MemoryMax: 3G pulseyarnmetrics: - service: CPUWeight: "100" MemoryMax: 1G

Modify the values as needed based on your environment.


Apply the Changes

After updating the configuration, run the following command:

accelo reconfig cluster

Example: Set a Hard CPU Limit Using override.yml

If you want to enforce a hard CPU limit (for example, restricting pulsenode to a maximum of 1 CPU core), you can configure this through systemd resource control settings in override.yml.

Add or modify the following section:

systemd: - case: - range: From: "0" To: "231" pulseprofiler: - service: CPUShares: "1024" MemoryLimit: 1G CPUQuota: "100%" - case: - range: From: "232" To: "0" pulsenode: - service: CPUWeight: "100" MemoryMax: 1G CPUQuota: "100%"

Apply the Changes

After updating the file, run the following command:

accelo reconfig cluster

Once the reconfiguration completes, the updated resource limits will be reflected in the systemd service definition.

Example Output in the systemd Service File

cat /etc/systemd/system/pulsenode.service
[Unit] Description=Acceldata Pulse Node Agent - pulsenode After=network.target [Service] EnvironmentFile=-/etc/default/hydra EnvironmentFile=-/etc/default/pulsenode User=adpulse ExecStart=/bin/sh -c 'exec ${PULSE_HOME}/bin/pulsenode -config ${PULSE_HOME}/node/config/node.conf -config-directory ${PULSE_HOME}/node/config/node.d $TELEGRAF_OPTS' ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartForceExitStatus=SIGPIPE KillMode=control-group UMask=0023 CPUQuota=100% CPUWeight=100 MemoryMax=1G [Install] WantedBy=multi-user.target