# How we reduced peak memory and CPU usage of the product configuration management SDK

[Grab](https://yomu.fyi/company/grab) · Ram Dilip Pradhan · Oct 30, 2024

## Summary

Grab's central product configuration management platform, GrabX, previously aggregated all configurations across every backend service into a single JSON file hosted on AWS S3. Every minute, client SDKs fetched, parsed, and loaded this growing file—which exceeded 100MB—causing CPU throttling spikes, elevated P99 latency, and unnecessary memory consumption. Analysis revealed that 98% of services required less than 1% of the total configuration data. To resolve these bottlenecks, the team partitioned data by service, split configurations into separate S3 files under distinct prefixes, and introduced a per-service changelog for incremental updates. Benchmarks showed the redesign decreased maximum CPU utilisation by over 50% and reduced memory usage by up to 70%.

## Takeaways

- Storing each configuration in separate S3 files under distinct prefixes scales read capacity to 5,500 GET requests per second per configuration.
- Data analysis showed that 98% of client services required less than 1% of total configuration data, while the largest service required only 20%.
- Switching to service-level changelogs and targeted subscriptions cut peak memory utilisation by up to 70% and peak CPU utilisation by over 50%.

**Tags:** [Architecture](https://yomu.fyi/topic/architecture), [AWS](https://yomu.fyi/topic/aws), [Performance](https://yomu.fyi/topic/performance), [Scalability](https://yomu.fyi/topic/scalability)

[Read original post](https://engineering.grab.com/reduced-memory-cpu-usage-grabx-sdk)
