← Google Interview Insights

Google·Software Engineer·Technical Phone Screen·Senior

Senior
Apr 2026

Summary

Google SWE interview with a heavy focus on Linux systems debugging and networking fundamentals. Three meaty technical questions back to back, felt more like a senior SRE screen than a typical software eng round.

Questions Asked (3)

Q1

A Linux server's CPU usage suddenly spikes. Walk through your diagnostic process: which commands you'd run, how you'd isolate the offending processes or threads, and how you'd tell whether the bottleneck is user CPU, kernel CPU, or IO wait. What are your next steps once you've identified the cause?

Root Cause AnalysisTechnical Trade-offsSystem Design
Author's notes

This one I actually felt decent about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the symptom and the need for a systematic, data-driven approach. Walk through a top-down diagnostic process using standard Linux tools, moving from high-level system metrics to per-process and per-thread analysis, and finally to root cause and remediation. Emphasize how you distinguish between user CPU, kernel CPU, and IO wait, and how you'd validate your hypothesis before taking action.

Pro tip: Mention that you'd first check if the spike is sustained or transient, and use `pidstat` or `top -H` to identify threads—this shows you understand that CPU spikes often come from a single busy thread, not the whole process.

1. Get a high-level overview

Run `top` or `uptime` to see load average and overall CPU breakdown (us, sy, wa, id). Use `vmstat 1` to observe trends over time and confirm whether the bottleneck is user, system, or IO wait.

2. Identify the offending process

In `top`, sort by CPU (press P) to find the top process. Note its PID and CPU percentage. If it's a multi-threaded app, press H to toggle thread view or use `top -H -p <PID>` to see per-thread CPU.

3. Drill down into threads and system calls

Use `pidstat -t -p <PID> 1` to monitor thread-level CPU. For deeper analysis, use `perf top -p <PID>` or `strace -c -p <PID>` to see which syscalls or functions are consuming CPU. Check `/proc/<PID>/status` for voluntary/nonvoluntary context switches.

4. Distinguish user vs kernel vs IO wait

High `us` indicates user-space code; high `sy` indicates kernel overhead (syscalls, context switches); high `wa` indicates IO wait. Use `iostat -x 1` to check disk utilization and `mpstat -P ALL 1` to see per-CPU breakdown. If `wa` is high, investigate disk or network IO.

5. Remediate and verify

Once the cause is identified (e.g., a runaway thread, inefficient syscall loop, or disk bottleneck), take action: renice/kill the process, optimize code, add resources, or adjust IO scheduler. Re-run diagnostics to confirm the spike is resolved and monitor for recurrence.

Key Points to Mention

  • Use of `top`, `vmstat`, `pidstat`, `iostat`, `mpstat`, and `perf` for different layers of analysis.
  • Understanding of CPU time breakdown: user (us), system (sy), IO wait (wa), idle (id), and steal (st) in virtualized environments.
  • Thread-level analysis: `top -H`, `pidstat -t`, and interpreting per-thread CPU to isolate a busy thread.
  • Differentiating kernel CPU from user CPU: high `sy` often points to syscall-heavy workloads, context switching, or kernel bugs.
  • IO wait diagnosis: correlating high `wa` with disk latency (`iostat -x`), and checking for processes in uninterruptible sleep (D state).
  • Root cause validation: using `strace`, `perf`, or flame graphs to confirm the exact function or syscall causing the spike before remediation.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

A service is showing high latency. How would you use tools like netstat, tcpdump, and traceroute or mtr to figure out whether the problem is on the client, the server, or somewhere in the network? What specific signals are you looking for, like SYN backlog, retransmits, RTT, or packet drops?

Root Cause AnalysisSystem DesignTechnical Trade-offs
Author's notes

Trickier than it sounds because there are so many angles.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by establishing a baseline and narrowing the scope: check if the latency is client-specific, server-wide, or network-wide using tools like mtr and tcpdump. Then correlate signals such as SYN backlog, retransmits, RTT, and packet drops to pinpoint the layer (client, server, or network) causing the issue.

Pro tip: Always compare multiple vantage points (e.g., client-side vs. server-side tcpdump) to avoid false conclusions—latency seen from one side may not exist on the other. Also, remember that high RTT with low retransmits often indicates network distance, while high retransmits with low RTT suggests local congestion or server overload.

1. Scope the problem

Determine if latency affects all clients or a subset, and if it's consistent or intermittent. Use basic tools like ping and curl to measure response times from different locations.

2. Check network path and RTT

Run traceroute or mtr from client to server to identify high-latency hops, packet loss, or asymmetric routing. Look for consistent RTT spikes or drops at specific hops.

3. Inspect transport-layer signals

Use netstat to check for SYN backlog, listen queue overflows, and connection states on the server. On both client and server, use tcpdump to capture packets and analyze retransmissions, duplicate ACKs, and zero-window events.

4. Correlate and isolate

Compare client-side and server-side captures to see where delays occur: if SYN retransmits are only on client side, network issue; if server shows high SYN backlog, server overload. Check server resource metrics (CPU, memory) to rule out application-level slowness.

5. Conclude and act

Based on evidence, attribute the problem to client, server, or network, and suggest next steps (e.g., scale server, fix network route, optimize client).

Key Points to Mention

  • SYN backlog and listen queue overflows as indicators of server-side connection handling issues
  • TCP retransmissions and duplicate ACKs to detect packet loss and network congestion
  • RTT measurements from mtr/traceroute to identify network latency and asymmetric paths
  • Packet drops at specific hops or interfaces, visible in mtr or tcpdump
  • Zero-window and window scaling issues that can cause throughput degradation
  • Comparing client-side and server-side captures to localize the problem

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Explain how DNS resolution works end to end, from stub resolver through recursive and authoritative servers, including caching and TTLs. Also, what's the practical difference between dig and nslookup, and when would you reach for one over the other?

System DesignTechnical Trade-offs
Author's notes

Easiest of the three for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by walking through the DNS resolution process step by step, from the stub resolver to the authoritative server, highlighting caching and TTLs. Then compare dig and nslookup in terms of features, output, and use cases, emphasizing when to choose each. Conclude with a practical example or scenario to demonstrate understanding.

Pro tip: Mention that dig is preferred for scripting and detailed debugging due to its structured output and additional features like +trace, while nslookup is more interactive and available on more systems, but less feature-rich. This shows awareness of real-world tooling trade-offs.

1. Stub Resolver Initiates Query

Explain that the stub resolver on the client sends a recursive query to its configured recursive resolver (e.g., ISP or public DNS).

2. Recursive Resolver Processes Query

Describe how the recursive resolver checks its cache; if not cached, it queries root, TLD, and authoritative nameservers iteratively to resolve the domain.

3. Authoritative Server Responds

Detail that the authoritative nameserver returns the requested record (e.g., A, AAAA, CNAME) with a TTL, which the recursive resolver caches and returns to the stub resolver.

4. Caching and TTLs

Explain that each record has a TTL that determines how long it can be cached; recursive resolvers and stub resolvers respect TTLs to reduce latency and load.

5. Compare dig and nslookup

Contrast dig (flexible, scriptable, detailed output, supports +trace) with nslookup (simpler, interactive, less feature-rich) and suggest when to use each.

Key Points to Mention

  • DNS resolution is hierarchical: root, TLD, authoritative servers.
  • Recursive resolver performs iterative queries and caches results.
  • TTL controls caching duration; lower TTLs mean more frequent lookups.
  • dig provides more detailed output and is preferred for debugging and scripting.
  • nslookup is simpler and available on more systems, but lacks advanced features.
  • Use dig +trace to follow the resolution path from root servers.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.