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.

HardTechnical
97 practiced
Compare the latency and cost implications of using HTTP+JSON, gRPC+protobuf, and shared-memory IPC for inter-service inference calls in Kubernetes for (a) same-node calls, and (b) cross-node calls. Quantify trade-offs in terms of serialization CPU, payload size, and context-switch overhead, and recommend when each is appropriate.
HardTechnical
76 practiced
Explain data layout and transfer optimizations for large batched tensor transfers between host and GPU to minimize PCIe overhead and maximize throughput. Discuss pinned (page-locked) memory, asynchronous cudaMemcpy, contiguous tensor layouts, tensor strides, and when zero-copy or GPUDirect might be applicable.
MediumTechnical
105 practiced
Explain GPU memory management considerations when serving models: how pinned (page-locked) memory, CUDA streams, pre-allocation, and pooling allocators (e.g., CachingAllocator in PyTorch) affect throughput and latency. Describe common causes of OOMs and fragmentation and short-term mitigations.
MediumTechnical
76 practiced
Compare the cost trade-offs between training large models and serving them for inference. For a model used in production with periodic retraining, describe when compute should be invested in more training to reduce inference complexity (distillation), versus optimizing serving cost (quantization, batching). Include examples of amortization over requests.
EasyTechnical
98 practiced
Explain model quantization at a high level. Describe the difference between post-training quantization and quantization-aware training, and summarize how quantization typically affects latency, memory footprint, and accuracy. Provide example scenarios where quantization is a good trade-off and cautionary cases where it can hurt user experience.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.