Firefox can be memory-hungry. Understanding how to manage Firefox's memory usage makes a real difference on systems with less RAM, or when Firefox is competing with other applications.
Diagnosing Memory Usage
about:memory
Navigate to about:memory for the most detailed breakdown.
Click "Measure" to get current measurements. Key sections:
Explicit memory: What Firefox explicitly asked the OS for. Sub-categories:
-
explicit/js-non-window/— JavaScript heap and code caches -
explicit/images/— Decoded and cached images -
explicit/layout/— CSS layout data -
explicit/dom/— DOM structures
Top memory consumers: Scroll down to "Other measurements" → see by-tab memory usage.
about:performance
about:performance shows per-tab memory usage with:
- Memory column (memory allocated to that tab/process)
- Energy impact (high/medium/low)
Most useful for identifying which specific tabs or extensions are consuming memory. Sort by Energy Impact to find background tabs that are unexpectedly active.
The Multi-Process Architecture
Firefox (like Chrome) uses multiple processes:
- Main process: UI, extension API handling
- Content processes: One per origin group (several tabs may share a process)
- Renderer processes: Graphics/compositor work
- Extension processes: Extensions run isolated from web content
Each process has its own memory. about:memory shows per-process breakdown.
Changing the content process count: Firefox by default uses up to 8 content processes.
about:config → dom.ipc.processCount → lower value (e.g., 4) to reduce memory
Fewer content processes = less memory, but also less isolation and potentially slightly more performance sensitivity if one tab freezes.
Tab Memory
Unloaded Tabs
Firefox has a tab unloading feature — when low on memory, it unloads background tabs. They appear normal but reload on click.
Enable automatic tab unloading:
about:config → browser.tabs.unloadOnLowMemory → true
Or manually unload a tab: right-click a tab → "Unload Tab" (if not visible, this is in Tab Manager extensions).
Tab Manager & Session Saver for Memory Management
Tab Manager & Session Saver (Firefox extension) is specifically useful here: save the tabs you're not currently working on as a named session, then close those tabs. You get the RAM back immediately, and can restore the session when needed.
The "close all and save" approach to memory management:
- Group your open tabs by project/topic mentally
- Save current window as "project-name" session
- Close the tabs you won't need for the next hour
- Restore when returning to that work
This is more intentional than waiting for automatic unloading.
Pinned Tabs
Pinned tabs stay loaded. If you've pinned 10 tabs that you rarely visit, they're always using memory. Unpin tabs you don't regularly use.
Extension Memory
Extensions can use significant memory, especially those that run content scripts on every page.
Diagnose: about:performance → look for "Extension" entries.
Common culprits:
- Complex content scripts on every page (uBlock Origin is surprisingly efficient; others less so)
- Extensions that cache data
- Background pages that run continuously
Disable extensions one at a time if you suspect a specific one.
Cache and History
Firefox maintains a disk cache and keeps browsing history. These don't usually cause RAM issues but can cause high disk usage:
Settings → Privacy & Security → Clear Data
Or via about:config:
browser.cache.disk.capacity → 51200 (50MB — reduce from default 1GB)
The disk cache is bounded but a large cache can slow startup and consume significant SSD space on machines where that matters.
about:config Memory Settings
browser.sessionhistory.max_entries → 10 (default 50)
Limits the number of back/forward history entries per tab. Back history stores page snapshots which take memory. Lowering this reduces memory use but you can back-navigate fewer steps.
javascript.options.mem.gc_incremental_slice_ms → 10
Controls how long GC pauses are allowed. Lower = more frequent but shorter GC, which can help responsiveness.
media.memory_cache_max_size → 8192 (8MB, vs default 512MB)
Limits the in-memory media cache. Useful if you watch many videos and memory is constrained.
Fresh Start Without Restart
To free memory without restarting Firefox:
-
about:memory→ "Minimize memory usage" button - Firefox forces garbage collection across all processes
This can recover 100-500MB in a long-running session. Results vary.
When to Actually Worry
Firefox's memory usage is normal until:
- System is swapping (activity monitor shows swap usage spiking)
- Firefox becomes unresponsive during GC pauses
- Specific tabs are marked as "uses high memory" in about:performance
General target: with 4 tabs open, Firefox should use 500-900MB. 8-12 tabs: 1-2GB is typical. This is reasonable for modern hardware. On systems with 4GB or less RAM, be more aggressive about managing tab count.
Long-Session Memory Growth
Firefox memory usage grows over long sessions (many hours) due to:
- Incremental memory fragmentation
- Caches filling
- Extension-level leaks
Weekly restarts keep Firefox running cleanly on most systems. For always-on use, enable the auto-unloading feature and periodically click "Minimize memory usage" in about:memory.
Top comments (0)