HCL Commerce Version 9.1.14.0 or later

Ruby store performance tuning

Performance tuning in the Ruby store is important for delivering the best browsing experience. If your storefront is slow, you can improve its performance by checking and optimizing the following points.

Grafana dashboard

From version 9.1.15 onwards HCL Commerce provides support for the Grafana dashboard for the Ruby store and helps troubleshoot performance problems with Next.js servers. The dashboard is designed to monitor different server metrics. For more information, see https://github.com/HCL-TECH-SOFTWARE/hcl-commerce-performance/tree/main/Grafana/dashboards/chart/dashboards/prometheus-operator.

Worker threads

From version 9.1.14 onwards HCL Commerce uses cluster API in the Ruby store implementation to help multiple worker threads improve performance. This is achieved using the NODE_INSTANCE_NUMBER variable. The NODE_INSTANCE_NUMBER environment variable sets the number of Node.js instances for deployment in the Next.js store container. The NODE_INSTANCE_NUMBER is read from the environment variable during deployment. If not specified, it derives from the CPU units in the helm chart for the Next.js container.

Note: To address a high load and CPU situation, add more CPUs and worker threads to manage the increased volume.

CPU Throttling

If resources are not configured correctly, CPU throttling may increase response time. Check the Grafana dashboard for CPU throttling in HCL Commerce version 9.1.15 and above. If CPU throttling is detected in the Grafana dashboard, recommend horizontal pod autoscaling or adjust the cluster's node resources.

Memory

For memory-related tuning or issues like memory settings and handling Out of Memory (OOM) situations, visit the Node.js article athttps://nodejs.org/en/docs/guides/diagnostics/memory/using-gc-traces.