Why one computer is not enough for big data

A laptop handles lakhs of rows easily. Give it 2 TB and it fails in four different ways. This lesson measures each limit of a single computer with real numbers, compares scaling up with scaling out, and shows why big data systems are built from many ordinary machines. Then watch the bottleneck move as a real report is fixed step by step, and compare the cost of scaling up and scaling out as data grows.

Module 1 · Introduction⏱ 28 minBeginner → AdvancedRuns in your browser (Python)3 real-time scenariosMemory test for your PC10 practice problems
1 The story

Riya's laptop meets five years of data

Riya's Python script read the canteen's 15 lakh orders in two seconds. Impressed, the university asks for the same report for all 400 college canteens in the state, for the last five years, including app click logs. The data comes to about 2 TB. Riya's laptop has a 512 GB SSD, 8 GB of RAM and 4 CPU cores.

The data 2 TB 400 canteens × 5 years orders + app logs Riya's laptop Disk 512 GB RAM 8 GB CPU 4 cores ✗ Disk full 2 TB won't fit in 512 GB ✗ MemoryError can't load it into 8 GB ⏱ Hours just to read it once Same script, 1,000× more data: every part of the machine becomes a limit. myphatshala.in
Riya

Sir, my laptop gave up. First the disk was full, then I tried an external disk and Python said MemoryError.

Arjun Sir

Every computer has four hard limits, Riya: how much it can store, how much it can hold in memory, how fast it can compute, and how fast it can move data in and out. Your 2 TB hit all of them.

Riya

So I just need a bigger computer?

Arjun Sir

That's called scaling up. It works for a while. But the biggest servers cost crores, still have a ceiling, and if that one machine fails, everything stops.

Riya

Then what do companies do?

Arjun Sir

They scale out: many ordinary machines working together. Today we'll calculate, with real numbers, exactly where one computer runs out of road.

Kabir

At TiffinGo they told me the monthly report used to run on one server and now runs on a “cluster”. Was the old server just too slow?

Arjun Sir

Maybe slow, maybe out of memory, maybe the disk couldn't read fast enough. Kabir, the skill is finding which wall you hit, because every fix just moves the bottleneck somewhere else. You'll watch that happen on a real report today.

2 Definition

Why isn't one computer enough?

Formal definition (write this in exams)

A single computer is limited by its storage capacity, main memory (RAM), processing power (CPU) and I/O bandwidth (disk and network throughput), and it is a single point of failure. Vertical scaling (scaling up) adds resources to one machine, but cost rises steeply and there is a hard upper limit. Big data systems therefore use horizontal scaling (scaling out): data and work are spread across a cluster of many commodity machines that operate in parallel.

In simple words

One computer has a limited disk, limited memory, limited speed, and it can break. You can buy a bigger one, but it gets very expensive and you'll outgrow it again. So big data uses many normal computers together, each doing a small part of the job at the same time.

Words you'll meet in this lesson

Vertical scaling“Scale up”: make one machine bigger: more RAM, more cores, bigger disks.
Horizontal scaling“Scale out”: add more machines and split the work between them.
ClusterA group of computers connected by a network that work as one system.
NodeOne machine in a cluster.
Commodity hardwareOrdinary, affordable servers, not special expensive machines.
I/O boundA job that is slow because of reading or writing data, not because of calculation.
BottleneckThe one resource that limits the speed of the whole job.
Single point of failureOne part whose failure stops the whole system.

Typical numbers to remember (2026, approximate)

Hard disk (HDD) read speedabout 150–250 MB per second
SATA SSD read speedabout 500 MB per second
NVMe SSD read speedabout 3,000–7,000 MB per second
Laptop RAM8–32 GB
Large single servera few TB of RAM, around 100–200 cores, tens of disks
Office / data-centre network1 Gbps ≈ 125 MB/s; 10 Gbps ≈ 1.25 GB/s; 100 Gbps in big data centres

These are ballpark figures to reason with. Real speeds depend on the exact hardware and the workload.

One computer's limits at three levels

Pick your level. New to this? Start at Beginner and climb.

Beginner The same walls on your own phone

You have already hit every wall on your phone:

  • Storage wall: “Storage full. Delete some photos.”
  • Memory wall: too many apps open, and the phone becomes slow or closes apps by itself.
  • Compute wall: exporting a long 4K video takes many minutes.
  • I/O wall: copying a movie to a pen drive crawls, however fast the phone is.
  • Reliability wall: the phone falls in water and every photo without a backup is gone.

Big data is the same story, a million times larger.

Intermediate Find the bottleneck with simple arithmetic

  • Time = data ÷ speed. 500 GB at 250 MB/s is 2,048 seconds, about 34 minutes, just to read once.
  • I/O bound vs CPU bound: if the CPU is mostly idle while the disk is at 100%, buying a faster CPU does nothing.
  • Memory blow-up: a CSV loaded into Python or pandas often takes 2–10 times its file size in RAM. A 6 GB file can need 30 GB of RAM.
  • Distances in time (approximate): reading from RAM ≈ 100 nanoseconds; from an SSD ≈ 100 microseconds (1,000× slower); a hard-disk seek ≈ 10 milliseconds; a network round trip inside a data centre ≈ 0.5 ms; Mumbai to the US and back ≈ 200 ms.
  • One core: a plain Python loop uses one core. On an 8-core machine the CPU meter shows only about 12%.

Advanced Why scaling out is powerful, and why it is hard

  • Cost curve: scaling up gets more expensive per unit of power as you go higher, and stops at the biggest machine for sale. Scaling out costs roughly in line with size.
  • Elasticity: in the cloud you can rent 80 nodes for Diwali week and return them after. You pay for the peak only while it lasts.
  • New problems appear: the network becomes slow and unreliable compared with local memory; some nodes finish late (stragglers); a node can fail half-way (partial failure); and keeping copies in agreement becomes hard (consistency).
  • Limits to speed-up: the part of a job that can't be split stays slow however many machines you add (Amdahl's law, Lesson 1.3).
  • Move code to data: sending a 50 KB program to where 100 GB sits is far cheaper than moving the 100 GB.
  • Module 3 covers these in depth: scaling and estimation, partitioning, replication and the CAP theorem.

Exam tip: Name the four resource limits (storage, memory, CPU, I/O) plus reliability, then contrast vertical and horizontal scaling in a table. Most university questions on “need for big data technologies” expect exactly this.

3 Types and ways to use it

The five walls of one computer

1. Storage wall

The data doesn't fit on the machine's disks. Even large servers top out at some hundreds of TB; big companies have petabytes.

Disk space

2. Memory wall

Fast processing needs data in RAM. When data is bigger than RAM, programs crash (MemoryError) or slow to a crawl as the OS swaps to disk.

RAM

3. Compute wall

A CPU has a fixed number of cores. A heavy calculation over billions of records can take days, and a plain Python loop uses only one core.

CPU

4. I/O wall

Reading data is often the slowest part. One disk reads a few hundred MB per second, so 100 TB takes days just to read once.

Disk + network speed

5. Reliability wall

One machine is one point of failure. A dead disk or power supply stops everything, and a 12-hour job must start again.

Failures

Scale up vs scale out

Vertical scaling (scale up)Horizontal scaling (scale out)
HowReplace with a bigger machineAdd more machines
CostRises steeply: the top-end server costs many times more per unit of powerGrows roughly in line with size: buy as many ordinary nodes as you need
Upper limitYes: the largest machine you can buyPractically very high: clusters run to thousands of nodes
FailureThe machine fails → everything stopsOne node fails → others continue (if designed for it)
SoftwareUsually no change neededNeeds distributed software (HDFS, Spark, Kafka…)
Good forModerate growth, traditional databasesBig data, web-scale services

Scaling up is not “wrong”. It is simpler, and for data up to some hundreds of GB it is often the best choice. Scale out when one machine truly can't keep up, because distributed systems add their own complexity.

4 Step by step

Push 2 TB through one laptop and watch each wall appear

  1. Storage: does it even fit?

    data_gb, disk_gb = 2048, 512
    print("Fits on disk?", data_gb <= disk_gb)
    Fits on disk? False
    The first wall is the simplest: 2 TB is four times the laptop's disk. An external drive helps, but then every read goes through a USB cable.
  2. Memory: load it all into a list

    rows = open("orders_5yrs.csv").readlines()   # tries to hold everything in RAM
    MemoryError
    In Python, one small record object takes a few hundred bytes of RAM (you'll measure it below), far more than its size in the file. Billions of records need hundreds of GB of RAM. The laptop has 8.
  3. Stream it instead: one line at a time

    total = 0
    for line in open("orders_5yrs.csv"):          # reads one line, forgets it
        total += int(line.split(",")[2])
    Streaming fixes the memory wall: only one line is in RAM at a time. But now the I/O wall appears: the whole 2 TB still has to be read from the disk.
  4. I/O: how long does reading take?

    mb = 2 * 1024 * 1024          # 2 TB in MB
    print(round(mb / 200 / 3600, 1), "hours at 200 MB/s (external hard disk)")
    2.9 hours at 200 MB/s (external hard disk)
    Nearly three hours just to read the data once, before any calculation. Python parsing each line is usually slower still, and the plain loop keeps only one of the four cores busy.
  5. Scale up: buy a bigger server

    A server with 64 cores, 512 GB RAM and fast NVMe disks finishes the job in minutes. For this year.

    Next year the data doubles, and the year after it doubles again. Each bigger server costs disproportionately more, and there is always a largest machine. If it fails, the report doesn't run.
  6. Scale out: split the work

    machines = 20
    print(round(2 * 1024 * 1024 / machines / 200 / 60), "minutes, each machine reading its own 100 GB")
    9 minutes, each machine reading its own 100 GB
    Twenty ordinary machines, each with its own disk, each reading its own part at the same time. Need it faster next year? Add machines. This is the idea behind Hadoop and Spark, and it is exactly what Lesson 1.3 builds on.
5 See it happen

One laptop vs 2 TB: what Riya sees, and what the hardware is doing

Step through the six frames. Left: Riya's screen. Right: the disk, memory and CPU inside.

Hitting the walls 6 steps
What you see Terminal > copy canteens_5yrs\ D:\ There is not enough space on the disk. 2 TB doesn't fit on a 512 GB disk. > python report.py Loading all rows… Traceback (most recent call last): … MemoryError > python report_stream.py Processed 1,00,00,000 rows… Processed 2,00,00,000 rows… 2% · time left: 3 h 40 min > python report_stream.py 30% · time left: 2 h 35 min Task Manager: CPU 25% Only 25% CPU, yet so slow. Why? > ssh big-server (64 cores, 512 GB) Report done in 12 minutes ✓ Quote: ₹45,00,000 for the server Next year: data doubles… > submit report on cluster (20 nodes) 20 tasks running in parallel Report done in 9 minutes ✓ Data doubles? Add 20 more nodes. myphatshala.in
Behind the screen STORAGE WALL 512 GB disk 2 TB data 4× bigger than the whole disk. MEMORY WALL RAM: 8 GB FULL Rows the script tried to load: ≈ 7 billion × ~270 bytes = about 1,800 GB of RAM needed Python objects are much bigger than the file. I/O WALL External disk 2 TB ~200 MB/s RAM (1 line) Memory is fine now, but the pipe is narrow: 2 TB ÷ 200 MB/s ≈ 3 hours. COMPUTE WALL Core 1: 100% running the loop Core 2: idle Core 3: idle Core 4: idle 1 of 4 cores busy = 25% CPU. A plain loop is serial. SCALE UP machine size → cost largest server you can buy → cost climbs steeply SCALE OUT 2 TB split in 20 node 1100 GB node 2100 GB node 3100 GB … node 20100 GB 20 disks read at the same time: 20 × 200 MB/s = 4 GB/s One node fails? Its part is redone elsewhere. myphatshala.in

Where the time goes: a rough budget for 2 TB

SetupRead speedTime to read 2 TB once
Laptop + external hard disk~200 MB/s~2.9 hours
Laptop NVMe SSD (if it fitted)~3,000 MB/s~12 minutes
20 nodes, 1 hard disk each~4,000 MB/s combined~9 minutes
200 nodes, 1 hard disk each~40,000 MB/s combinedunder 1 minute

Reading is only the start: parsing, calculating and writing results add more time. The ratios are what matter.

6 Real-world use

Real-time scenarios: watching one machine run out of road

Three live scenarios: the race that convinced web companies to build Hadoop, a monthly report where every fix moves the bottleneck somewhere else, and an advanced one on the cost of scaling up versus scaling out.

Real-time scenario 1

Reading 100 TB with 1 disk vs 1,000 disks

This is the calculation that convinced web companies to build systems like Hadoop. Watch the race, and see what happens when one of the thousand disks fails.

The 100 TB race 5 steps
Animated example 1 disk @ 200 MB/s 100 TB ÷ 200 MB/s = 5,24,288 seconds needs ≈ 6 days 1,000 disks in parallel (one per node) done in ≈ 9 minutes each node reads only its own 100 GB Disk #417 dies mid-job With 1,000 disks, a failure every few weeks is normal. A copy of #417's data exists on other nodes that part is re-read there; the job still finishes myphatshala.in
Real-time scenario 2

Kabir's monthly report: every fix moves the bottleneck

TiffinGo's monthly orders file is 50 GB. Kabir tries to build the report on his 16 GB, 8-core laptop. Watch the four resource meters as he fixes one problem after another.

Resource meters 5 steps
Animated example Step 1 · Read the 50 GB CSVDisk read100%RAM10%CPU (8 cores)12%Network0%Disk is the bottleneck: 50 GB ÷ 250 MB/s ≈ 3.4 minutesjust to read it, while the CPU sits almost idle (I/O bound).Step 2 · Load it all into pandasDisk read40%RAM100%CPU (8 cores)12%Network0%Memory wall: in memory it needs about 5× the file(≈ 250 GB) but the laptop has 16 GB. Swapping, then MemoryError.Step 3 · Process it in 1 GB chunksDisk read60%RAM30%CPU (8 cores)12%Network0%RAM is fine now. But a plain Python loop keepsonly 1 of 8 cores busy: the CPU meter shows 12%.Step 4 · Use all 8 coresDisk read100%RAM45%CPU (8 cores)100%Network0%Much faster, and now the disk is the bottleneck again.Every fix moves the bottleneck somewhere else.Step 5 · Next year the file is 2 TBDisk read100%RAM100%CPU (8 cores)100%Network0%At 2 TB every wall is hit at once on one laptop.Only spreading data and work over many machines helps. myphatshala.in
Real-time scenario 3 · advanced

The cost of growing: scale up vs scale out

As data grows, compare the cost of buying ever-bigger single servers with adding ordinary machines to a cluster. Then see what each does when hardware fails, and how the cloud changes the maths.

Cost as data grows 5 steps
Animated example cost data size → scale up scale out Small data: one bigger server is cheaper and simpler.No distributed software to learn or run.Around here the two cost about the same.Growth plans decide which way to go.biggest server for saleScale up hits a ceiling: no bigger machine exists.Scale out keeps going: just add nodes.1 big server: down40 nodes: 39 still workingFailure: one server dies → everything stops.One of 40 nodes dies → 39 keep working.nodes rented per week20Sep20Oct 124Oct 280Diwali80Diwali22Nov 120Nov 2Cloud elasticity: 20 nodes normally, 80 for Diwali week.Pay for the peak only while it lasts. myphatshala.in

Where one machine stopped being enough

www

1. Search engines indexing the web

In the early 2000s, Google described how it stored and processed web-scale data across thousands of cheap machines (the Google File System and MapReduce papers). Those papers inspired the open-source Hadoop project. No single computer could hold or scan the whole web.

Billions of web pages→Thousands of nodes, in parallel→Search index
EOD batch11 pm → 5 am

2. Banks: the end-of-day batch window

Banks run interest, statements and risk reports overnight. As customers grow, a job that took two hours on one big server starts running past morning opening time. Moving it to a cluster brings it back inside the window.

Day's transactions→Parallel batch on a cluster→Ready by 6 am

3. Video platforms: one upload, many versions

Every uploaded video is converted into many resolutions (240p to 4K). One machine would take hours per video; platforms split each video into chunks and convert the chunks on many machines at once.

1 upload→Chunks encoded on many nodes→All resolutions

4. Retail: daily demand forecasts per store

A retailer forecasting demand for 50,000 products in 2,000 stores has 10 crore small forecasts to compute every night. Each is independent, so they are spread across a cluster instead of running one after another.

Sales history→Forecasts in parallel→Stock orders
GPUs

5. Training AI models

Large AI models are trained on enormous datasets using hundreds or thousands of GPUs working together. Even the most powerful single machine would take far too long, so the data and the model are split across a cluster.

Huge dataset→Many GPUs in parallel→Trained model

Examples are simplified to show the scaling problem. Real setups vary by company.

7 Run the code

Calculate when one machine is too slow

The core big data calculation: how long does it take just to read the data, with 1 machine or many? Each machine has one hard disk reading about 200 MB per second, and reads only its own share. Then try the challenges: will the data fit, how often do disks fail, and how to split work.

def read_minutes(data_tb, machines, mb_per_sec=200):
    data_mb = data_tb * 1024 * 1024
    per_machine = data_mb / machines        # each machine reads only its share
    return per_machine / mb_per_sec / 60

data_tb = 2
for machines in [1, 5, 20, 100]:
    m = read_minutes(data_tb, machines)
    print(f"{machines:>3} machine(s): {m:6.1f} minutes")
1 machine(s): 174.8 minutes 5 machine(s): 35.0 minutes 20 machine(s): 8.7 minutes 100 machine(s): 1.7 minutes
  • def read_minutes(data_tb, machines, mb_per_sec=200):mb_per_sec=200 is a default value: a typical hard disk. Pass another value to model an SSD.
  • per_machine = data_mb / machinesThe heart of scaling out: with the data spread evenly, each machine reads a smaller part, and all read at the same time.
  • f"{machines:>3} machine(s): {m:6.1f} minutes"Format codes: >3 right-aligns in 3 characters, 6.1f shows one decimal place in 6 characters, so the columns line up.

Run it on your PC: measure your machine's memory wall

How much RAM do records really take inside Python? This program builds 10 lakh small payment records in a list and measures the memory used with Python's built-in tracemalloc. Save it as ram_test.py and run it on your computer.

How much RAM does one record need?

import os, shutil, tracemalloc

print("CPU cores :", os.cpu_count())
total, used, free = shutil.disk_usage(".")
print("Disk      :", round(total / 1024**3), "GB total,", round(free / 1024**3), "GB free")

# How much memory do 10 lakh small payment records take inside Python?
tracemalloc.start()
records = [{"id": i, "item": "chai", "amount": 20} for i in range(1_000_000)]
used_mb = tracemalloc.get_traced_memory()[0] / 1024**2
tracemalloc.stop()
print("10 lakh records in a list use", round(used_mb), "MB of RAM")

per_record = used_mb * 1024**2 / len(records)
print("That is about", round(per_record), "bytes per record")
for n, label in [(100_000_000, "10 crore"), (10_000_000_000, "1,000 crore")]:
    gb = n * per_record / 1024**3
    print(f"{label:>11} records would need about {gb:,.0f} GB of RAM")

# In a terminal:  python ram_test.py
CPU cores : 2 Disk : 10 GB total, 4 GB free 10 lakh records in a list use 256 MB of RAM That is about 268 bytes per record 10 crore records would need about 25 GB of RAM 1,000 crore records would need about 2,500 GB of RAM

Recorded on a small cloud machine with Python 3.10. Your cores and disk will be different; the bytes per record will be close (it varies a little by Python version). A record of about 40 characters in a CSV becomes about 270 bytes as a Python object. That gap is why loading big data “into memory” fails long before the disk is full.

8 Line by line

Scaling out, one line at a time

Watch how the same function is called three times, once for each cluster size. Each call gets its own frame with its own machines and per_machine; the frame disappears when the function returns.

Worked examples: real problems, solved and traced in memory

Four decisions, from beginner to advanced. Three a data engineer actually makes: does the data fit, which kind of scaling is cheaper, and how many failures to plan for. Each program runs live and is traced in memory. The last one finds the bottleneck of a whole job.

Example 1BeginnerAnalytics · capacity check

Which walls will the laptop hit?

Problem statement

A laptop has a 512 GB disk and 8 GB RAM. A job needs to store 2,048 GB and, if loaded into Python, would need about 1,760 GB of RAM. Print which resources are a problem.

Input
laptop: disk 512, ram 8 · job: disk 2048, ram 1760 (GB)
Expected output
disk wall: 4 times too small
ram wall: 220 times too small

Approach

  1. Put the laptop's capacity and the job's needs in two dictionaries with the same keys.
  2. Loop over the keys and compare need with capacity.
  3. Print a “wall” message when the need is bigger.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

Example 2IntermediateIT budget · scaling

Scale up or scale out?

Problem statement

A team needs 256 CPU cores. One option is a single 256-core server. The other is a cluster of 16-core nodes at ₹2,50,000 each. Compare the cost (prices are illustrative).

Input
needed 256 cores · servers {64: 12 lakh, 128: 35 lakh, 256: 1.1 crore} · node 16 cores at 2.5 lakh
Expected output
Scale up : one server, Rs 110.0 lakh
Scale out: 16 nodes,   Rs 40.0 lakh

Approach

  1. Look up the price of the 256-core server.
  2. Work out how many 16-core nodes give 256 cores.
  3. Multiply by the node price and compare.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

Example 3IntermediateData centre · reliability

How many disk failures should we plan for?

Problem statement

A cluster has 1,000 hard disks. Around 1.5% of disks fail each year. How many failures should the team expect per year, and how often is that?

Input
1000 disks, 1.5% fail per year
Expected output
Expected failures per year: 15.0
About one failure every 24 days

Approach

  1. Multiply disks by the yearly failure rate.
  2. Divide 365 days by that number to get the gap between failures.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

Example 4AdvancedPerformance engineering · bottleneck

Which resource limits the job?

Problem statement

A nightly job must read 600 GB, do 48 core-hours of calculation and send 120 GB of results over the network. The server has disks that read 1,000 MB/s in total, 16 cores and a 1 Gbps network (125 MB/s). Estimate how long each part takes if it runs alone, and name the bottleneck.

Input
600 GB read · 48 core-hours · 120 GB send · 1000 MB/s · 16 cores · 125 MB/s
Expected output
disk    :   10.2 minutes
cpu     :  180.0 minutes
network :   16.4 minutes
Bottleneck: cpu

Approach

  1. Disk time = data ÷ disk speed. Convert GB to MB by multiplying by 1024.
  2. CPU time = core-hours ÷ cores.
  3. Network time = data sent ÷ network speed.
  4. When parts overlap, the slowest one sets the total time: that is the bottleneck.

Solution: run it live

What happens in memory, step by step

Recorded from a real Python run: press Next to execute one line at a time. Watch variables change in each frame, and lists and dictionaries (numbered #1, #2 …) fill up as objects.

9 Quiz and revision

Check yourself

Quick revision

Lesson 1.2 in one screen

  • Time = data ÷ speed. The slowest resource is the bottleneck; fixing it moves the bottleneck elsewhere.
  • RAM ≈ 100 ns, SSD ≈ 100 µs, HDD seek ≈ 10 ms, data-centre round trip ≈ 0.5 ms.
  • Cloud elasticity: rent nodes for the peak, return them after.
  • One computer has five walls: storage, memory, CPU, I/O (disk + network) and reliability.
  • Hard disk ≈ 200 MB/s. 100 TB on one disk ≈ 6 days; on 1,000 disks in parallel ≈ 9 minutes.
  • Vertical scaling (scale up): bigger machine. Simple, but steep cost, hard ceiling, single point of failure.
  • Horizontal scaling (scale out): more machines. Grows far, survives failures, but needs distributed software.
  • Python objects are much bigger than file bytes, so “load everything into memory” fails early. Stream instead.
  • A plain loop uses one core. Big jobs are often I/O bound.
  • With many machines, failures are normal: keep copies of data and re-run failed parts.

Interview and viva questions

What are the limitations of a single machine for processing big data?

Limited storage capacity, limited RAM (data larger than memory causes crashes or swapping), limited CPU cores (a single process uses one), limited I/O bandwidth (one disk reads a few hundred MB/s, so terabytes take hours), and it is a single point of failure. Scaling it up is expensive and has an upper limit.

Differentiate vertical and horizontal scaling.

Vertical scaling adds CPU, RAM or disk to one machine: simple, no code change, but costly at the top end, limited by the largest machine, and still a single point of failure. Horizontal scaling adds more machines and splits data and work across them: cost grows roughly linearly, it can grow very large and tolerate node failures, but it needs distributed software and adds network and coordination complexity.

What does “I/O bound” mean? Give an example.

A job is I/O bound when its speed is limited by reading or writing data rather than by calculation. Summing one column of a 2 TB file is I/O bound: the addition is trivial, but reading 2 TB from a disk at 200 MB/s takes about three hours.

Why is commodity hardware used in big data clusters?

Ordinary servers are cheap and easy to replace. Instead of paying a large premium for one very reliable machine, clusters use many affordable machines and handle failures in software through replication and re-running tasks.

Is scaling out always better than scaling up?

No. For data that fits comfortably on one machine, scaling up is simpler, cheaper to run and has no distributed-system complexity. Scale out when the data, the speed requirement or the reliability requirement goes beyond what one machine can deliver.

Practice problems

Capacity and time calculations that come up in real data platform planning. The last three are business tasks.

P1Easy

Read time for 500 GB

How many minutes does it take to read 500 GB from a disk at 250 MB/s?

Input
500 GB, 250 MB/s
Expected output
34.1 minutes
Show solution and explanation
mb = 500 * 1024
print(round(mb / 250 / 60, 1), "minutes")
34.1 minutes

How it works: 500 GB = 5,12,000 MB; ÷ 250 MB/s = 2,048 s ≈ 34 minutes.

P2Easy

How many disks?

Each disk holds 4 TB. How many disks are needed for 90 TB? (A part-full disk still counts.)

Input
90 TB, 4 TB per disk
Expected output
23 disks
Show solution and explanation
import math
print(math.ceil(90 / 4), "disks")
23 disks

How it works: math.ceil rounds up: 22.5 becomes 23.

P3Easy

Fits in RAM?

A 6 GB CSV is loaded into Python, where it takes about 5 times its file size. The machine has 16 GB RAM. Print whether it fits.

Input
6 GB file, ×5 overhead, 16 GB RAM
Expected output
Needs 30 GB; fits? False
Show solution and explanation
needed = 6 * 5
print("Needs", needed, "GB; fits?", needed <= 16)
Needs 30 GB; fits? False

How it works: 30 GB > 16 GB, so it won't fit even though the file itself is smaller than the RAM.

P4Medium

Round-robin assignment

Assign 7 tasks to 3 workers in turn and print each worker's tasks.

Input
tasks T1..T7, 3 workers
Expected output
{1: ['T1', 'T4', 'T7'], 2: ['T2', 'T5'], 3: ['T3', 'T6']}
Show solution and explanation
tasks = [f"T{i}" for i in range(1, 8)]
workers = {1: [], 2: [], 3: []}
for i, t in enumerate(tasks):
    workers[i % 3 + 1].append(t)
print(workers)
{1: ['T1', 'T4', 'T7'], 2: ['T2', 'T5'], 3: ['T3', 'T6']}

How it works: i % 3 cycles 0, 1, 2, 0, 1, 2 …, so tasks go to workers 1, 2, 3, 1, 2, 3 ….

P5Medium

Speed-up and efficiency

A job takes 120 minutes on 1 machine and 10 minutes on 16 machines. Print the speed-up (old ÷ new time) and the efficiency (speed-up ÷ machines) as a percentage.

Input
120 min on 1, 10 min on 16
Expected output
Speed-up: 12.0
Efficiency: 75.0 %
Show solution and explanation
speedup = 120 / 10
efficiency = speedup / 16 * 100
print("Speed-up:", speedup)
print("Efficiency:", efficiency, "%")
Speed-up: 12.0 Efficiency: 75.0 %

How it works: Perfect scaling would give a speed-up of 16. Coordination and uneven splits usually cost something, here 25%.

P6Advanced

Will it fit in RAM?

A CSV takes about 6 times its file size once loaded into pandas. For each file, print whether it fits in 16 GB of RAM (keeping 4 GB free for the operating system), and if not, how many chunks of equal size are needed so that each chunk fits.

Input
files: 1.5, 3, 9 GB · RAM 16 GB · reserve 4 GB
Expected output
1.5 GB file needs 9.0 GB: fits
3 GB file needs 18 GB: use 2 chunks
9 GB file needs 54 GB: use 5 chunks
Show solution and explanation
import math
ram, reserve, blowup = 16, 4, 6
usable = ram - reserve
for size in [1.5, 3, 9]:
    need = size * blowup
    if need <= usable:
        print(f"{size} GB file needs {need} GB: fits")
    else:
        chunks = math.ceil(need / usable)
        print(f"{size} GB file needs {need} GB: use {chunks} chunks")
1.5 GB file needs 9.0 GB: fits 3 GB file needs 18 GB: use 2 chunks 9 GB file needs 54 GB: use 5 chunks

How it works: Memory needed = file size × blow-up factor. When it exceeds usable RAM, split the file into ceil(need ÷ usable) chunks and process them one at a time, exactly what Kabir did in scenario 2.

P7Advanced

Nodes needed per hour (autoscaling)

Each node handles 5,000 orders per second. Given the expected orders per second for each hour, print how many nodes to run in that hour (always at least 2, for safety) and the total node-hours for the day so far.

Input
[8000, 21000, 64000, 12000]
Expected output
hour 0:   8000 orders/s -> 2 nodes
hour 1:  21000 orders/s -> 5 nodes
hour 2:  64000 orders/s -> 13 nodes
hour 3:  12000 orders/s -> 3 nodes
Total node-hours: 23
Show solution and explanation
import math
per_node = 5000
load = [8000, 21000, 64000, 12000]
node_hours = 0
for hour, rate in enumerate(load):
    nodes = max(2, math.ceil(rate / per_node))
    node_hours = node_hours + nodes
    print(f"hour {hour}: {rate:>6} orders/s -> {nodes} nodes")
print("Total node-hours:", node_hours)
hour 0: 8000 orders/s -> 2 nodes hour 1: 21000 orders/s -> 5 nodes hour 2: 64000 orders/s -> 13 nodes hour 3: 12000 orders/s -> 3 nodes Total node-hours: 23

How it works: This is what cloud autoscaling does: capacity follows the load hour by hour, instead of running 13 nodes all day for the one peak hour.

P8Business problem

Fit the nightly window

A bank's nightly job must read 30 TB within 2 hours. Each node reads 200 MB/s. What is the minimum number of nodes?

Input
30 TB, 2 hours, 200 MB/s per node
Expected output
Minimum nodes: 22
Show solution and explanation
import math
total_mb = 30 * 1024 * 1024
one_node_secs = total_mb / 200
nodes = math.ceil(one_node_secs / (2 * 3600))
print("Minimum nodes:", nodes)
Minimum nodes: 22

How it works: One node would need about 43.7 hours; to finish in 2 hours you need at least 22 nodes (in practice, more for safety and failures).

P9Business problem

Same cost, faster answer

Cloud nodes cost Rs 40 per hour each. A report needs 25 node-hours of work. Compare 1 node for 25 hours with 50 nodes for half an hour.

Input
Rs 40/node-hour, 25 node-hours
Expected output
1 node(s) for 25 h -> Rs 1000
50 node(s) for 0.5 h -> Rs 1000
Show solution and explanation
rate = 40
for nodes, hours in [(1, 25), (50, 0.5)]:
    print(nodes, "node(s) for", hours, "h -> Rs", round(nodes * hours * rate))
1 node(s) for 25 h -> Rs 1000 50 node(s) for 0.5 h -> Rs 1000

How it works: Both cost Rs 1,000, but one finishes 50 times sooner. On pay-per-use clouds, scaling out often costs the same and saves time.

P10Business problem

When do we outgrow one server?

Data is 2 TB today and grows 60% a year. One server can handle up to 20 TB. In which year does the data pass that limit?

Input
2 TB, +60% per year, limit 20 TB
Expected output
Year 5 : about 21.0 TB
Show solution and explanation
data, year = 2.0, 0
while data <= 20:
    data = data * 1.6
    year = year + 1
print("Year", year, ": about", round(data, 1), "TB")
Year 5 : about 21.0 TB

How it works: Growth compounds: 2 → 3.2 → 5.1 → 8.2 → 13.1 → 21.0. Planning for scale-out starts years before the limit.

Real-world scenario questions (asked in company interviews)

Questions about scaling that interviewers use to see whether you can reason with numbers. Decide your answer first, then open the model answer.

Banking · batch processing1–3 years

The nightly job now finishes after the bank opens

The end-of-day reconciliation job ran in 3 hours two years ago. Transactions have tripled and it now takes 8 hours, finishing after 9 am. It runs on one large database server. What would you investigate and propose?

The interviewer is checking: can you find the bottleneck first, and do you know when to scale up versus scale out?

Show a strong answer
  1. Measure first: is the job limited by disk reads, CPU, memory (swapping) or locks in the database? Look at monitoring during the run.
  2. Quick wins: process only the new day's data instead of rescanning history; add the right indexes; use columnar formats for reporting tables.
  3. If it's still growing: a bigger server buys a year or two. For sustained growth, move the heavy batch work to a distributed engine like Spark on a cluster, reading data in parallel, so capacity grows by adding nodes.

Avoid saying: “Just buy a bigger server” or “Move everything to Hadoop” without measuring where the time goes.

Any company · conceptsFresher

“Why not just buy one very powerful computer?”

An interviewer asks you to argue why big data platforms use clusters of ordinary machines rather than one supercomputer-class server.

The interviewer is checking: do you know the concrete limits, not just the slogan “big data needs clusters”?

Show a strong answer
  • Ceiling: even the biggest server has a fixed maximum of disks, RAM and cores; data keeps growing.
  • Cost curve: top-end hardware costs far more per unit of power than ordinary servers.
  • I/O: a cluster reads from hundreds of disks in parallel; 100 TB in minutes instead of days.
  • Reliability: one machine is a single point of failure; a cluster with replicated data keeps running when a node dies.
  • Elasticity: in the cloud you can add nodes for a busy night and remove them after.

Avoid: claiming one big machine is always worse. For small and medium data it is simpler and often the right choice.

E-commerce · performanceFresher

The script that takes hours at 25% CPU

A colleague's Python script summarises 300 GB of order logs. It takes five hours, and the 4-core machine shows 25% CPU the whole time. They ask you to “make it use the whole CPU”.

The interviewer is checking: do you understand serial loops, I/O bottlenecks and the options available before reaching for a cluster?

Show a strong answer

25% on 4 cores means one core is busy: the loop is serial. It may also be waiting on the disk.

  • Check read speed: 300 GB at ~200 MB/s is about 25 minutes of pure reading, so most of the 5 hours is Python processing.
  • Split the files and process them with multiprocessing (one process per core), or use faster tools like Pandas/Polars on chunks or DuckDB.
  • Store logs in a compressed columnar format (Parquet) so only needed columns are read.
  • If the data keeps growing, run it on Spark across several machines.

Avoid: assuming more CPU alone fixes it without checking whether the disk is the bottleneck.

Platform team · design review1–3 years

“Disks rarely fail, we don't need copies”

In a design review for a 500-node storage cluster with 6 disks per node, a teammate proposes storing one copy of each file to save money, because “disks rarely fail”.

The interviewer is checking: can you turn a small per-disk failure rate into a cluster-wide expectation?

Show a strong answer

500 × 6 = 3,000 disks. At around 1.5% failing per year, that's about 45 failures a year, nearly one a week. With a single copy, each failure loses data permanently.

  • Keep multiple copies (HDFS defaults to 3) on different nodes and racks, or use erasure coding to save space while still surviving failures.
  • Automate detection and re-copying of data from failed disks.
  • Quote the trade-off: extra storage cost versus the cost of losing data and re-running jobs.

Avoid: judging reliability per disk instead of across the whole cluster.