How To
Summary
This document describes steps required to modify resource limits of Enterprise Search microservices with the aim of improving performance of assets synchronization.
Objective
Default resource limits of Enterprise Search microservices are configured according to minimal hardware requirements.
When more CPU and memory are available, it is advised to increase these limits in order to achieve better performance of assets synchronization.
Environment
Information Server 11.7.1 with the microservices tier (formerly known as the Enterprise Search node) installed.
Steps
Check available resources and decide on changes to be made
1. Log in as the microservices tier user to the primary microservices tier host.
2. Check resources which are already allocated by running the command:
kubectl describe node
The output should contain sections similar to the one below (one section for each node):
Allocated resources: (Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 3931m (49%) 5761m (72%)
memory 8748Mi (13%) 25588Mi (39%)
ephemeral-storage 0 (0%) 0 (0%)
3. Decide how much CPU and memory resources can be additionally assigned to Enterprise Search back-end services. Do not assign more CPU and memory than is available.
Adjust the following parameters:
- cassandra_heap_size (default: 1024) - the minimum amount of available memory required by the Cassandra service in megabytes. The memory limit is calculated automatically, as in: 4 * cassandra_heap_size.
- solr_min_heap_size (default: 512) - the minimum amount of available memory required by the Solr service in megabytes. The memory limit is calculated automatically, as in: 4 * solr_min_heap_size.
- solr_max_heap_size (default: 1024) - the maximum amount of heap memory of the Solr service in megabytes. It should be greater than or equal to solr_min_heap_size, and smaller than 4 * solr_min_heap_size.
- cassandra_cpu_request (default: 500m) - the minimum amount of CPU required by the Cassandra service.
- cassandra_cpu_limit (default: 1) - the maximum amount of CPU available to the Cassandra service.
- solr_cpu_request (default: 500m) - the minimum amount of CPU required by the Solr service.
- solr_cpu_limit (default: 1) - the maximum amount of CPU available to the Solr service.
For the detailed description of the CPU settings format, see the Meaning of CPU topic in the Kubernetes documentation.
Update cluster configuration
Steps required to update the configuration are different depending on the version of Information Service installed.
Configuration update procedure for Information Service 11.7.1 FP1 and above
1. Create a new file
50_shared_services.yaml
in /opt/IBM/UGinstall/ugdockerfiles/playbooks/vars
.2. Add lines with new values of configuration properties to the file, for example:
cassandra_heap_size: 4096
cassandra_cpu_request: 1
cassandra_cpu_limit: 2
solr_cpu_request: 1
solr_cpu_limit: 2
3. Redeploy Cassandra and Solr to apply configuration changes:
$ cd /opt/IBM/UGinstall/ugdockerfiles
$ ./run_playbook.sh playbooks/shared_services/deploy_shared_services.yaml --tags=cassandra,solr
Configuration update procedure for Information Service 11.7.1
1. Set these required environmental variables:
export UGINSTALL_BASE_DIR=/opt/IBM/UGinstall
export ANSIBLE_ROLES_PATH=${UGINSTALL_BASE_DIR}/ansible/playbooks/roles:${UGINSTALL_BASE_DIR}/ansible/playbooks/kubernetes/roles:${UGINSTALL_BASE_DIR}/ansible/playbooks/platform_services/roles
Additionally, for a single-node microservices tier, set this variable:
export INVENTORY_FILE=${UGINSTALL_BASE_DIR}/ansible/inventory/singleNodeInventory
For a multi-node microservices tier, set this variable:
export INVENTORY_FILE=${UGINSTALL_BASE_DIR}/ansible/inventory/multiNodeInventory
2. Check whether the following file exists:
/opt/IBM/UGinstall/ansible/playbooks/files/ugrsp.yaml
If it is missing, it needs to be generated by using the script generateUGInfoYaml.sh.
Download the script and copy it to /opt/IBM/UGinstall on the primary microservices tier host. Then run the following commands:
chmod +x /opt/IBM/UGinstall/generateUGInfoYaml.sh
/opt/IBM/UGinstall/generateUGInfoYaml.sh
3. For a multi-node microservices tier, check whether the following file exists:
/opt/IBM/UGinstall/ansible/inventory/multiNodeInventory
If it is missing, it needs to be generated by using the script generateMultiNodeInventory.sh.
Download the script and copy it to /opt/IBM/UGinstall on the primary microservices tier host. Then run the following commands:
chmod +x /opt/IBM/UGinstall/generateMultiNodeInventory.sh
/opt/IBM/UGinstall/generateMultiNodeInventory.sh
4. Update resource configuration with new parameter values, for example:
ansible-playbook -i ${INVENTORY_FILE} \
${UGINSTALL_BASE_DIR}/ansible/playbooks/deploy_shared_services_playbook.yaml --tags cassandra \
-e "@${UGINSTALL_BASE_DIR}/ansible/playbooks/files/ugrsp.yaml" \
-e "cassandra_heap_size=4096" \
-e "cassandra_cpu_request=1" \
-e "cassandra_cpu_limit=2"
ansible-playbook -i ${INVENTORY_FILE} \
${UGINSTALL_BASE_DIR}/ansible/playbooks/deploy_shared_services_playbook.yaml --tags solr \
-e "@${UGINSTALL_BASE_DIR}/ansible/playbooks/files/ugrsp.yaml" \
-e "solr_cpu_request=1" \
-e "solr_cpu_limit=2"
5. Restart services to apply the configuration changes.
For a single-node microservices tier:
kubectl delete pod cassandra-0
kubectl delete pod solr-0
For a multi-node microservices tier:
for i in {2..0};
do kubectl delete pod cassandra-${i}; done
for i in {2..0};
do kubectl delete pod solr-${i}; done
Note that these commands might take considerable time as the maximum graceful termination period is 5 minutes for these services.
6. Wait until all restarted services are ready. It can be verified by running the command:
kubectl get pod
Each cassandra and solr pod should be reported as running and ready, for example:
NAME READY STATUS RESTARTS AGE [...]
cassandra-0 1/1 Running 0 2m39s [...]
solr-0 1/1 Running 0 59s
Verify configuration changes
In order to verify that the configuration updates were applied, run the command:
kubectl describe node
The output should contain sections (one for each node) similar to the one below:
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits AGE
--------- ---- ------------ ---------- --------------- ------------- ---
default cassandra-0 1 (6%) 2 (12%) 4Gi (6%) 16Gi (25%) 3m [...]
default solr-0 1 (6%) 2 (12%) 512Mi (1%) 2Gi (3%) 2m15s
Recommendation
If hardware resources are available, set at least the following parameter values in order to significantly improve asset synchronization speed:
- cassandra_heap_size: 4096
- cassandra_cpu_request: 1
- cassandra_cpu_limit: 2
- solr_cpu_request: 1
- solr_cpu_limit: 2
With these settings, the asset synchronization is approximately 4 times faster than with the default settings.
Additional Information
For more information about Enterprise Search and assets synchronization, see Assets in Enterprise Search.
Document Location
Worldwide
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSZJPZ","label":"IBM InfoSphere Information Server"},"Component":"Information Server Enterprise Search","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.7.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
01 July 2021
UID
ibm10878318