Serverless API S2 Achieves Significant Performance Gains and Cost Savings with Continuous Profiling
S2, a serverless API for streaming data, significantly improved performance and reduced costs by leveraging Polar Signals Cloud for continuous profiling. Facing challenges with inefficient CPU usage, limiting user capacity and increasing operational costs, S2 used Polar Signals Cloud's continuous profiling capabilities, particularly its pprof.me and inverted call stack features, to identify and resolve multiple performance bottlenecks. For example, a single line code change enabling hardware acceleration on Graviton via the sha2 library reduced CPU usage for SHA256 checksum computation from 68.37% to 31.82%, effectively doubling throughput. Further optimizations included improvements to AWS S3 Rust SDK CRC32C checksum computation and memory allocation. Polar Signals Cloud's flexible pricing also proved crucial for S2's unique needs.