Kaggle's own documentation pages render only in a browser, so for this guide we read what can be checked: Kaggle's notebook image on GitHub, its announcements, Google Cloud's TPU specification, bug reports that quote the out-of-memory message, and guides from October and November 2026, several of which read Kaggle's limits page. Then we wrote a cell that reports the memory and disk a notebook really has, and measured eight ways of loading the same 5-million-row CSV on a laptop, each in a fresh process.
The short answer: a Kaggle notebook has about 30 GB of RAM on CPU and 29 GB with GPU T4 x2, with 4 CPU cores either way, according to guides that read Kaggle's documentation in October and November 2026. Kaggle publishes no RAM figure for the TPU v5e-8; the 330 GB often quoted belonged to the retired TPU v3-8. Every session saves up to 20 GB in /kaggle/working, and scratch space elsewhere is wiped when it ends. Go over the RAM and Kaggle shows "Your notebook tried to allocate more memory than is available. It has restarted." Your variables are gone. Load fewer columns, use smaller dtypes, read Parquet, work in chunks, or query the file with DuckDB. Checked 2 December 2026.
Fastero
Jupyter notebooks for your team, with nothing to install.
Start a notebook or bring your .ipynb files. SQL cells query your databases with no password in the code, and a notebook runs now or on a schedule. Colleagues open it with their own login; viewers are free.
Try free →How much RAM does a Kaggle notebook have?
As of 2 December 2026:
| Accelerator | RAM | CPU cores | GPU or TPU memory | Saved disk |
|---|---|---|---|---|
| None (CPU) | 30 GB | 4 | None | 20 GB in /kaggle/working |
| GPU T4 x2 | 29 GB | 4 | 2 × 16 GB, two separate cards | 20 GB |
| TPU v5e-8 | Not published | Not published | 8 × 16 GiB, one per chip | 20 GB |
One developer who checked his own account on 5 November wrote that "A CPU-only session gets 4 cores and 30 GB of RAM", and that T4 x2 comes with "4 CPU cores and 29 GB of RAM". A guide that read Kaggle's docs on 7 November gives the same "about 29 GB of RAM" for the GPU. The GPU's 32 GB is a separate pool: a DataFrame lives in RAM, weights you move to the GPU live on the cards.

RAM, accelerator memory and saved disk by accelerator, from guides citing Kaggle's docs and Google Cloud's TPU page. Checked 2 December 2026.
Where the sources disagree
- The TPU's RAM. You'll still read "96 CPU cores / 330 GB RAM" for Kaggle's TPU, and one November guide still pairs it with the TPU v3-8. That machine is gone: Kaggle replaced the v3-8 with the v5e-8 and has published no RAM figure for the new one. Google Cloud's own 8-chip v5e machine has 224 vCPUs and 384 GB of RAM, but Kaggle doesn't say how much of that a notebook gets. A guide that tried on 28 November got no number either: "The session stayed in a queue, so we did not get a RAM reading". The cell below will tell you in your own TPU session.
- GPU memory. NVIDIA rates the T4 at 16 GB;
nvidia-smion Kaggle shows "two Tesla T4s with 15,360 MiB each", which some guides round to 15 GB. Same card, different units. - Older numbers. In 2022, a GPU notebook came "with only 13 GB of RAM", by a user report on GitHub, and that figure still circulates. An August 2026 bug report even gave 16 GB as "Kaggle's documented limit for free-tier notebooks". The guides that read Kaggle's page this autumn all say 29 to 30 GB.
Kaggle disk space: /kaggle/working and temporary files
/kaggle/workingkeeps up to 20 GB. A course book puts it as "Up to 20 GBs of output from a Notebook may be saved to disk in /kaggle/working." Those files are kept as the notebook's output when you save a version, and a later notebook can attach them as input.- Everything else is scratch. Files in
/tmp, or anywhere outside/kaggle/working, disappear when the session ends. Kaggle publishes no size for this space. One November guide reported "In my test, scratch showed about 1.1 TB free on a T4 session"; another lists/tmpas 70 GB or more. Treat both as single readings and check withdf -h. - Scratch is slower. A user benchmarking Kaggle's disks in October 2025 found the root filesystem is an overlay and wrote: "Write throughput on /tmp is especially unstable; it sometimes gets ~5–10× lower in my tests." The same report says
/kaggle/working"is relatively fast" but "its capacity is limited to ~20 GB per session". - Inputs don't count. Attached datasets and competition files are mounted read-only under
/kaggle/input.
Filling /kaggle/working ends with No space left on device, often while downloading model weights. One November fix in a public repository was to move "the Space clone, HF cache and model storage to /tmp" and keep only the outputs in working.
What happens when a Kaggle notebook runs out of memory
Kaggle stops the kernel and shows a banner:
Your notebook tried to allocate more memory than is available. It has restarted.That exact line appears in a bug report from 6 October 2026 and in reports going back to 2020; another from August 2026 calls it "Kaggle's own banner". "Restarted" means a fresh Python process: every variable, loaded model and imported module is gone, and you run the notebook again from the top.
Three things make this happen sooner than you'd expect:
- The peak counts, not the result. In our test below, reading a CSV with pandas' defaults briefly needed 1.8 times the memory the finished DataFrame kept. The August report saw a model "held in memory in both the main process and the worker process transiently during the handoff, roughly doubling peak RAM usage".
- Everything in the container counts: copies you forgot to delete, data-loader worker processes, and anything another cell still references.
- GPU memory is a different limit. Running out on a T4 raises
torch.OutOfMemoryError(CUDA out of memory) in the cell, and the session survives. Our Kaggle GPU guide covers the cards.
How to check RAM and disk usage in a Kaggle notebook
!free -h and psutil.virtual_memory() read /proc/meminfo, and inside a container that can describe the host machine rather than your share of it. A procps bug report puts it plainly: in a container, free "always reports the memory statistics and limits of the host system." The limit that matters lives in the container's cgroup files, so this cell reads those first and falls back to psutil when there are none:
import os, shutil
import pandas as pd
import psutil
GB = 1024**3
def memory():
"""(limit, available) in bytes: the container's cgroup limit if it has one, else the machine's."""
vm = psutil.virtual_memory()
for limit_file, used_file in [("/sys/fs/cgroup/memory.max", "/sys/fs/cgroup/memory.current"),
("/sys/fs/cgroup/memory/memory.limit_in_bytes",
"/sys/fs/cgroup/memory/memory.usage_in_bytes")]:
try:
limit = int(open(limit_file).read())
used = int(open(used_file).read())
except (OSError, ValueError): # no file, or "max" (no limit)
continue
if limit < vm.total:
return limit, limit - used
return vm.total, vm.available
def report():
limit, avail = memory()
print(f"RAM: {limit / GB:.1f} GB limit, {avail / GB:.1f} GB available")
for path in ["/kaggle/working", "/kaggle/temp", "/tmp", "."]:
if os.path.isdir(path):
d = shutil.disk_usage(path)
print(f"Disk {path}: {d.free / GB:.1f} GB free of {d.total / GB:.1f} GB")
def fits(csv, ram=None, sample_rows=100_000, **read_args):
"""Estimate a CSV's size in pandas from a sample, and suggest a chunk size if it won't fit."""
ram = ram or memory()[1]
sample = pd.read_csv(csv, nrows=sample_rows, **read_args)
per_row = sample.memory_usage(deep=True).sum() / len(sample)
with open(csv, "rb") as f:
sample_bytes = sum(len(f.readline()) for _ in range(sample_rows + 1))
rows = os.path.getsize(csv) / sample_bytes * (sample_rows + 1)
need = per_row * rows
budget = ram / 2 # reading a CSV peaks at about twice the finished DataFrame
print(f"~{rows:,.0f} rows x {per_row:.0f} bytes = {need / GB:.2f} GB in pandas; "
f"budget {budget / GB:.1f} GB (half of {ram / GB:.1f} GB)")
if need <= budget:
print("Fits: read it whole")
else:
chunk = int(budget / 10 / per_row) # a tenth of the budget per chunk
print(f"Won't fit: use chunksize={chunk:,}, fewer columns, smaller dtypes, or DuckDB")
report()Then call fits() on your file, with the same dtype= or usecols= you plan to read it with. We ran the cell on 2 December on a Windows 11 laptop with 64 GB (Python 3.14.3, pandas 3.1.2, psutil 7.2.2), against a 470 MB CSV of 5 million invented orders. Windows has no cgroup files, so the first line is the whole laptop; the second and third calls pretend only 1 GB is free, to show both answers:
RAM: 63.7 GB limit, 28.1 GB available
Disk /tmp: 16.1 GB free of 457.2 GB
Disk .: 16.1 GB free of 457.2 GB
--- fits(csv)
~5,102,427 rows x 145 bytes = 0.69 GB in pandas; budget 14.1 GB (half of 28.1 GB)
Fits: read it whole
--- fits(csv, ram=1 * GB)
~5,102,427 rows x 145 bytes = 0.69 GB in pandas; budget 0.5 GB (half of 1.0 GB)
Won't fit: use chunksize=369,621, fewer columns, smaller dtypes, or DuckDB
--- fits(csv, ram=1 * GB, dtype=small_types)
~5,102,427 rows x 69 bytes = 0.33 GB in pandas; budget 0.5 GB (half of 1.0 GB)
Fits: read it wholeThe row estimate was 2% high (the file has exactly 5,000,000 rows), which errs on the safe side. Two cautions: shutil.disk_usage reports the whole volume, which may not show Kaggle's 20 GB cap on saved output, and for text stored as Python objects memory_usage(deep=True) overcounts, as the next section shows.
Jupyter notebooks for your team.
Start free →How to fix Kaggle out of memory errors, measured
We loaded the same CSV eight ways and asked each for the same answer, revenue by country, in a fresh process each time. Peak is the most memory the process used above the 99 MB Python took after its imports; held is what it still used afterwards.
| What we ran | Peak | Held after | Time |
|---|---|---|---|
read_csv, text as Python objects (pandas 2) |
1,457 MB | 787 MB | 12.7 s |
read_csv, pandas 3 defaults |
1,426 MB | 798 MB | 2.7 s |
read_csv with smaller dtypes |
414 MB | 300 MB | 9.3 s |
| ...and only the 4 columns needed | 119 MB | 54 MB | 2.3 s |
read_parquet, the same 4 columns |
241 MB | 176 MB | 0.3 s |
read_csv in chunks of 500,000 rows |
29 MB | 8 MB | 3.5 s |
| DuckDB SQL on the CSV | 302 MB | 38 MB | 0.7 s |
| DuckDB SQL on the Parquet file | 56 MB | 33 MB | 0.1 s |

Peak memory for the same answer from the same file, measured on a laptop on 2 December 2026. Invented data; Python 3.14.3, pandas 3.1.2, pyarrow 26.0.1, duckdb 2.0.1.
All eight agreed on the total, 11.18 billion, to within 1,257: the gap comes from float32 prices. The fixes, in the order we'd try them:
-
Read only the columns you use.
usecolscut the peak from 1,426 MB to 119 MB here, because the answer needed 4 of 11 columns. pandas' own scaling guide makes the same point under "Load less data". -
Give pandas smaller types. Text with few distinct values (country, category, product) becomes
category; small whole numbers becomeint8orint32; prices becomefloat32:dtypes = {"country": "category", "category": "category", "product": "category", "channel": "category", "customer_id": "int32", "quantity": "int8", "unit_price": "float32", "discount": "float32"} df = pd.read_csv(path, dtype=dtypes, usecols=list(dtypes)) -
Convert to Parquet once. Our CSV was 470 MB; the same table as Parquet was 170 MB, and reading 4 columns from it took 0.3 seconds instead of 2.3. In this run it peaked higher than
usecolson the CSV, so it's mainly a speed and disk win. Write it to/kaggle/workingand later notebooks can attach it. -
Work in chunks. Only one chunk is in memory at a time, so the peak stays flat however big the file:
parts = [] for chunk in pd.read_csv(path, usecols=["country", "quantity", "unit_price", "discount"], dtype=dtypes, chunksize=500_000): revenue = chunk.quantity * chunk.unit_price * (1 - chunk.discount) parts.append(revenue.groupby(chunk.country, observed=True).sum()) by_country = pd.concat(parts).groupby(level=0, observed=True).sum() -
Let DuckDB read the file. It runs SQL straight on CSV or Parquet and keeps only what the query needs. Set its limits yourself, because its default memory limit is "80% of RAM", by its docs, and it starts one thread per core:
import duckdb con = duckdb.connect() con.execute("SET memory_limit = '8GB'") con.execute("SET temp_directory = '/tmp/duckdb'") # spill to scratch, not /kaggle/working by_country = con.execute(""" SELECT country, SUM(quantity * unit_price * (1 - discount)) AS revenue FROM read_csv('{path}') GROUP BY country """.format(path=path)).df()If
import duckdbfails, install it with the internet switched on; our Kaggle internet guide covers that. More on when SQL beats DataFrames in DuckDB vs pandas. -
Free what you're done with.
del dffollowed byimport gc; gc.collect()releases a DataFrame nothing else references.
One surprise from the first two rows. pandas 2 stores text as Python objects (we switched pandas 3 back to that behavior for the first row), and memory_usage(deep=True) reported 1,956 MB for that DataFrame, yet the process held only 787 MB. pandas' CSV reader reuses one Python string for repeated values (we found 4 string objects behind 8,103 rows of the same country), and deep=True counts every reference as its own copy. Trust the process's memory, as the cell above does, over the DataFrame's own estimate.
When DuckDB hits its own limit
We also capped DuckDB at 200 MB and grouped by a column with 5 million distinct values, which is the hard case. With the laptop's 16 threads it stopped with an error instead of crashing the session:
_duckdb.OutOfMemoryException: Out of Memory Error: could not allocate block of size 256.0 KiB (190.6 MiB/190.7 MiB used)
Possible solutions:
* Reducing the number of threads (SET threads=X)
* Disabling insertion-order preservation (SET preserve_insertion_order=false)
* Increasing the memory limit (SET memory_limit='...GB')With SET threads = 2 the same query finished: 5,000,000 groups in 2.2 seconds, peaking 211 MB above the baseline. pandas needed 1,009 MB for the same group-by. An error you can catch and retry beats a restart that wipes the notebook.
What this means at Kaggle's scale
We measured a 470 MB file; scaling it up is arithmetic, so treat this as an estimate. pandas' defaults peaked at about 3 times the CSV's size, so a CSV of roughly 10 GB shaped like ours would reach 30 GB while loading; with smaller dtypes the peak was 0.9 times the file. Longer text or more distinct values change both ratios, so run fits() on your own file.
Where Fastero fits: notebooks on your team's data
For public data and competitions, Kaggle's free 30 GB is hard to beat, and nothing here changes that. Fastero is an AI and data platform where people and AI agents work together on a team's data, and its notebooks suit the one that runs on company data every week:
- Standard machine: 1 CPU and 2 GB, included on every plan, so the fixes above matter here too.
- Bigger machines on Pro. A notebook can move to 8 GB ($0.20 an hour), 16 GB ($0.40) or 32 GB ($0.80), with up to 8 CPUs, charged by the second from money you add to your balance, not from the Pro subscription. A job that needs 16 GB for an hour costs $0.40, not a bigger laptop.
- Load less by asking the database. A SQL cell runs on a saved connection (Postgres, MySQL, SQL Server, Redshift, Oracle or BigQuery) with its stored credentials, and its rows land in Python as a pandas DataFrame named after the cell. Do the
GROUP BYin SQL and only the answer comes back. - Runs on a schedule with a cron expression, on the server with no browser open, and colleagues sign in to read the result; viewers are free.

Scheduling a notebook in Fastero; behind the dialog, a SQL cell does the grouping in the database. Sample data.
The Free plan has no end date and needs no card; plans and machine prices are on the pricing page. More on Kaggle's other limits in our Kaggle Notebooks guide and Kaggle vs Colab.
FAQ
How much RAM does Kaggle give you?
About 30 GB on a CPU notebook and 29 GB with the GPU T4 x2 accelerator, with 4 CPU cores, according to guides that read Kaggle's documentation in October and November 2026. Kaggle publishes no RAM figure for the TPU v5e-8. Run the cell in this guide to see your session's own limit.
Does Kaggle's GPU give you more memory?
It adds two T4 cards with 16 GB each, but that memory is separate from RAM, which drops slightly to 29 GB. Data you load with pandas lives in RAM; model weights and tensors you move to the GPU live on the cards. The two cards are separate, so a 20 GB model fits on neither without code that splits it across both.
How much RAM does the Kaggle TPU have?
Kaggle doesn't say. The 330 GB and 96 cores often quoted belonged to the TPU v3-8, which Kaggle retired. The TPU v5e-8 has 16 GiB of memory on each of its eight chips, and Google Cloud's own 8-chip v5e machine has 384 GB of RAM, but Kaggle hasn't published what a notebook gets.
How do I fix "Your notebook tried to allocate more memory than is available"?
Load less at once: only the columns you need, smaller dtypes, Parquet, chunks, or DuckDB querying the file directly. In our test those cut peak memory from 1,426 MB to between 29 and 414 MB for the same answer. Then rerun the notebook from the top, because the restart cleared every variable.
How much disk space does a Kaggle notebook have?
20 GB in /kaggle/working, which is saved as the notebook's output. Space elsewhere, such as /tmp, is scratch that's wiped when the session ends; Kaggle doesn't publish its size, and one guide measured about 1.1 TB free on a T4 session. Attached inputs under /kaggle/input don't count against either.
Can I pay Kaggle for more RAM?
No. Kaggle has no paid tier for bigger machines, so the options are fitting the data into the 30 GB or running the notebook somewhere else. Colab's paid plans offer high-memory machines (see our Colab limits guide), and cloud notebooks rent bigger machines by the hour.
Sources
Read on 2 December 2026. Kaggle's documentation pages render only with JavaScript, so the RAM and disk figures come from the dated guides below, which read them.
- Kaggle: docker-python issue on disk speed and the 20 GB working directory (October 2025), docker-python image recipe, forum threads on the restart message
- Google Cloud: TPU v5e
- Out-of-memory reports quoting Kaggle's message: TeamAIQ/Colab-notebooks #12 (October 2026), FastVideo #1755 (August 2026), pycaret #295 (2020), PyTorch forums (2020), dalle-mini #204 (2022)
- Disk: model weights moved to scratch (November 2026), Introduction to Kaggle, PDS book
- Containers and memory: Docker resource constraints, procps issue 389, Linux cgroup v2 documentation
- Libraries: pandas, scaling to large datasets, DuckDB configuration, DuckDB, tuning workloads
- Guides: Kaggle's free GPUs for AI experiments (Hari Krishna, 5 November 2026), Kaggle GPU free limit (Mainstreet Profile, November 2026), Kaggle in 2026 (Mini AI Tools), Name That LLM guide (ReconScribe, October 2026), Kaggle TPU setup and the 330 GB claim (28 November 2026), Kaggle free TPU v5e-8 (Gabru Builds, 28 November 2026), Colab and Kaggle for video generation (Ahmed Fayaz, 14 November 2026)
Try Fastero free: run the notebook on your team's data, and give it 16 GB for $0.40 an hour on Pro when 2 GB isn't enough. No credit card required.
Fastero Dev Team