InterviewStack.io LogoInterviewStack.io

Performance Cost Optimization & Resource Efficiency Questions

Optimizing for the money and resources a given level of performance consumes, not just raw speed. Covers cost-per-request reasoning, right-sizing compute and memory, efficiency of resource utilization, and trading performance against spend. Emphasizes treating cost and resource efficiency as first-class performance objectives.

EasyTechnical
104 practiced

In Python, implement an iterator-based function that reads a large newline-delimited JSON events file (1B lines) and produces daily counts per user without loading the whole file into memory. Specify assumptions about sort order or state size, and ensure memory usage is bounded (assume few million active users per day).

EasyTechnical
99 practiced

Describe how batching reduces compute and network cost for event ingestion. Give a concrete example comparing 1M single-event HTTP requests vs 10k batched requests of 100 events each: estimate the difference in request overhead and CPU cost and discuss the latency impact for end users.

HardSystem Design
81 practiced

Design a monitoring and alerting system that detects subtle regressions (e.g., 10% p95 increase) in data pipelines and can trigger automated remediation. Define the metrics (p50/p95/p99, throughput, input lag, error-rate), baseline approach, anomaly detection algorithm, and safe automated remediations (scale up, restart job, revert release). Discuss rollback and alert noise precautions.

MediumTechnical
83 practiced

You notice increasing GC pauses in a JVM-based ETL service that lead to latency spikes. Describe diagnostic steps to identify the root cause and list tuning options (GC algorithm choice, heap sizing, generation ratios, off-heap memory) to reduce pause times. Which monitoring metrics would you watch during changes?

HardTechnical
89 practiced

Design an experiment to validate that switching the compression codec for Parquet files to Zstd reduces both storage cost and query latency without increasing CPU cost beyond acceptable levels. Include test dataset, metrics, statistical test to compare results, and failure modes to watch for.

Unlock Full Question Bank

Get access to all Performance Cost Optimization & Resource Efficiency interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.