Change Component Resource Limit
To know real-time resource usage on the Pulse server, run the following command to understand resource bottlenecks or consumption by live containers:
[root@pulse2:~ (ad-default)]$ docker statsCONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS8fe5ac4e940c ad-kafka-connector_default 0.22% 661MiB / 125.8GiB 0.51% 757MB / 527MB 0B / 0B 71841b786f255b ad-sparkstats_default 0.53% 917.3MiB / 28GiB 3.20% 6.52GB / 1.81GB 0B / 0B 7475588f7b63cf ad-streaming_default 1.91% 1.519GiB / 20GiB 7.59% 14.9GB / 65.9GB 0B / 0B 12608533b199102 ad-graphql_default 2.45% 222.1MiB / 125.8GiB 0.17% 63GB / 53.2GB 7.32MB / 63.5kB 233823fe7dbc93 ad-connectors_default 1.37% 1.421GiB / 28GiB 5.08% 7.9GB / 1.91GB 0B / 0B 943c3b180d8f12 ad-director_default 0.62% 1.825GiB / 125.8GiB 1.45% 210MB / 160MB 0B / 0B 80f36cace348d2 ad-jobrunner_default 0.24% 786.2MiB / 125.8GiB 0.61% 61.6MB / 37.4MB 0B / 0B 5058e9503b0852 ad-alerts_default 1.82% 3.281GiB / 28GiB 11.72% 6.44GB / 2.42GB 1.08MB / 0B 272bbb487f16f65 ad-notifications_default 0.63% 789.3MiB / 125.8GiB 0.61% 63.2MB / 38.9MB 0B / 0B 706556a563c18e ad-fsanalyticsv2-connector_default 0.92% 637.3MiB / 125.8GiB 0.49% 558MB / 1.28GB 19.2MB / 0B 153Memory Limit
Teams can run accelo admin makeconfig command for given service having high resource usage and modify below memory (bytes) changes as per requested limit on service yml.
opts: memory: "53687091200"CPU Limit
From the official Docker documentation link, decide what options are required to limit the CPU usage and calculate the numbers for each option.
accelo binary doesn’t use the exact keys from the Docker official documentation. Use the below table to refer the exact keys that accelo uses for each key.
| Docker Official | accelo specification |
|---|---|
| --cpu-period | cpuPeriod |
| --cpu-quota | cpuQuota |
| --cpus | cpus |
| --cpuset-cpus | cpusetCPUs |
| --cpu-shares | cpuShares |
Example: Add the CPU limit parameters to the ad-db service
- Generate the
ad-core.ymlfile if it’s NOT generated already. If it’s already exists, proceed to the next step.
ls -lha <AcceloHome>/config/docker/ad-core.yml- Edit the above file at path on section
ad-db, look foroptsproperty inside the yaml, if not already present, Add a new properties nested inside theoptsproperty with the desired number of CPU as a value as shown below, limiting to 8 cores:
opts: cpuPeriod: "100000" cpuQuota: "800000"- The same way if you require, you can add the other parameters like
cpuSharesetc, as listed in the previous section reference table. - Make sure to use “spaces“ for indentation and NOT “tabs“. As “tabs“ won’t play well with YAML files. Save, exit the file and restart
ad-dbcontainer
accelo restart ad-db -d- Validate cpu utilisation using command:
docker statsModify JVM memory of Elastic Search
To modify the JVM memory of Elastic container, create ad-logsearch.yml by running below command:
accelo admin makeconfig ad-logsearch- Add property
ES_JAVA_OPTS=-Xmx<VALUE>g -Xms<VALUE>gunder ad-elastic environment section, save the file and restart ad-elastic container
accelo restart ad-elasticModify JVM memory of Logstash
To modify the JVM memory of Logstash container, create ad-logsearch.yml by running below command:
accelo admin makeconfig ad-logsearch- Add property
LS_JAVA_OPTS=-Xmx<VALUE>g -Xms<VALUE>gunder ad-logstash environment section, save the file and restart ad-logstash container
accelo restart ad-logstashModify JVM memory of FS Analytics
To modify the JVM memory of FS Analytics V2 container, create ad-fsanalyticsv2-connector.yml by running below command:
accelo admin makeconfig ad-fsanalyticsv2-connector- Update property
JAVA_OPTS=-XX:+UseG1GC -XX:+UseStringDeduplication -Xms<VALUE>g -Xmx<VALUE>g, here value will be equivalent to 4 times the FS Image size, save the file and restart ad-fsanalyticsv2-connector:
accelo restart ad-fsanalyticsv2-connector