Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk9 min

Why Swap Usage Stays at Zero on Linux and Whether It Matters

Linux can show swap enabled with zero pages used. This guide explains demand-driven swapping, overcommit accounting, compressed swap, diagnostics, and the warning signs that merit action.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Zero used swap is usually normal. Linux does not fill an enabled swap area in advance. It writes pages there when its reclaim policy and current memory pressure make that useful. A lightly loaded machine can therefore show SwapTotal greater than zero and SwapFree equal to it for weeks. Treat the counter as one observation: verify that swap is configured, then check memory pressure, commit limits, policy, and any zram, zswap, or cgroup limits before deciding that something is wrong.

What a zero swap counter actually tells you

Swap is a place Linux can move less-active memory pages when RAM is under pressure. It is not a reservoir that the kernel is expected to fill simply because an administrator enabled it. The virtual-memory subsystem weighs several reclaim choices, including dropping clean file-backed cache and writing anonymous pages to swap. If reclaimable cache and free memory are sufficient, writing anonymous pages would add I/O without solving a problem, so the kernel can leave the swap device untouched.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The usual status distinction is important:

  • SwapTotal reports configured swap capacity visible to the system.
  • SwapFree reports capacity not currently occupied by swap entries.
  • The difference is the kernel’s current accounting of swap entries, not a complete measure of memory stress.

Consequently, “swap enabled but unused” is a valid and often desirable state on an idle or moderately loaded host. It does not prove that the host has unlimited spare RAM, and it does not prove that swap will never be needed. A workload can change the result in seconds.

How Linux decides whether to swap

Reclaim is demand-driven

When applications allocate memory, Linux first considers what can be reclaimed cheaply. Clean file-backed pages can generally be discarded and read again from their files. Anonymous pages, such as process heap and stack, have no file from which to reload them; moving them to swap preserves their contents while freeing RAM. The kernel delays that write until the expected benefit exceeds the cost.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Swappiness changes the trade-off

The vm.swappiness setting expresses how readily the kernel balances anonymous-page swapping against reclaiming file-backed cache. Inspect the live value with:

cat /proc/sys/vm/swappiness

A lower value generally postpones swapping; a higher value makes anonymous-page reclaim relatively more acceptable. The kernel documentation gives a specific meaning to a value of 0: the system waits until a memory zone reaches its high watermark before initiating swap activity. That is a policy threshold, not a promise that swap is disabled forever. Do not treat zero as a universally optimal setting; the right value depends on latency goals, workload behavior, available RAM, and the distribution’s configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Changing swappiness also does not manufacture pressure. If the machine never approaches the relevant reclaim thresholds, a different value can still leave the observed swap counter at zero.

Why swap can matter when current use is zero

Swap contributes to overcommit accounting

Linux can promise more virtual address space than the machine could hold in RAM at one instant, a practice called overcommit. The accounting rules use available RAM and swap when calculating how much committed address space can be accepted. Under strict overcommit, the limit is based on swap plus a configured percentage of physical RAM. Therefore, an unused swap area can increase the amount of memory that allocations are allowed to commit even though no page has yet been written to it.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

This is why deleting an unused swap area can change allocation behavior. The effect may appear at allocation time, not as a visible rise in the “used swap” column. Examine the accounting fields alongside capacity:

grep -E 'Swap(Total|Free)|Commit(Limit|ted_AS)' /proc/meminfo

The exact overcommit mode and limits are distribution and administrator choices. A zero counter alone cannot tell you whether a process is close to an allocation failure; compare Committed_AS with CommitLimit and observe the workload’s behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why the usual swap number is incomplete

Swap accounting describes locations, not just active pressure. After a page has been read back into RAM, the kernel can keep a corresponding swap entry until that page is rewritten or otherwise released. Such a page may still count as swap in use even while the application is running from RAM. Conversely, compressed swap mechanisms consume RAM and have their own accounting, so a disk-backed swap total may remain zero while memory is being used for compressed pages.

For that reason, do not diagnose pressure from one field in free. Pair it with:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
  • available memory and reclaim activity;
  • memory pressure stall information (PSI);
  • process or cgroup limits;
  • kernel out-of-memory (OOM) messages and, where deployed, systemd-oomd actions.

PSI exposes time that tasks spend stalled because memory is unavailable. On systems with the standard proc interface, a quick view is:

cat /proc/pressure/memory

Interpret the “some” and “full” averages over their time windows rather than reacting to a single instantaneous value. File locations and service policy vary by distribution, so confirm how your host collects and acts on PSI.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Compressed swap: zswap and zram

zswap: a compressed cache in front of swap

zswap is a compressed cache for swap pages. Instead of immediately writing every evicted page to a storage-backed swap device, the kernel can keep a compressed copy in RAM. This trades CPU cycles for potentially reduced swap I/O. When the cache fills or a page cannot remain cached, zswap can evict the compressed page to its configured backing swap device.

With zswap enabled, a disk device can report zero used swap while compressed pages occupy RAM. Conversely, pages that have spilled from the cache to the backing device can make the disk counter rise. Check zswap’s runtime statistics under the kernel’s memory or debug interfaces used by your distribution; do not infer its activity solely from swapon --show.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

zram: a compressed RAM block device

zram creates a block device whose contents are compressed in RAM. An administrator can activate that device as swap; the kernel documentation’s basic example is:

swapon /dev/zram0

In that arrangement, swap pages are being used even though no physical disk is receiving them. A command that lists swap devices can show /dev/zram0, while a disk-backed partition or file remains at zero. Compression consumes CPU time and reserves RAM for the compressed store, but it avoids storage latency for pages that fit in the device. Capacity, compression ratio, and service setup are distribution-specific.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reading “zero” with compressed mechanisms

Configuration Where evicted pages may reside What disk swap at zero means
Storage-backed swap only A partition or file on a block device No swap entries are currently accounted on that backend; pressure may still be low or other reclaim may suffice.
zswap plus backing swap Compressed RAM first, then the backing device if needed Compressed pages may be active even when the backing device has no entries.
zram activated as swap A compressed RAM block device such as /dev/zram0 Disk-backed swap can remain unused while zram handles evictions.

Check whether swap is configured and available

Use these checks in order. Run them as the same user who administers the machine; some detailed counters require root privileges.

  1. List active swap areas. Run swapon --show. Confirm the device or file, its size, current used amount, and priority. An empty result means no swap area is active, even if a configuration file mentions one.
  2. Compare totals and free capacity. Run free -h, then inspect /proc/meminfo for SwapTotal and SwapFree. Matching total and free values indicate no currently accounted entries on the visible swap backends.
  3. Inspect policy. Read /proc/sys/vm/swappiness. Record the value before changing it, and identify whether a system service or configuration manager reapplies it at boot.
  4. Look for memory pressure. Check /proc/pressure/memory and the host’s monitoring system. Rising sustained PSI, reclaim thrashing, or latency under load matters more than a zero swap figure.
  5. Check commit headroom. Compare Committed_AS and CommitLimit in /proc/meminfo, taking the active overcommit mode into account.
  6. Check limits around the workload. Containers and services can have cgroup memory and swap ceilings that are lower than the host’s capacity. Inspect the applicable cgroup files and unit settings rather than assuming host-wide swap is available to every process.
  7. Review events. Search kernel logs for OOM-killer reports and service logs for systemd-oomd actions, if that service is deployed. These events establish that a policy or limit was reached even if the swap counter later returns to zero.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When zero swap deserves investigation

Applications approach commit limits

If allocation failures occur while Committed_AS is close to CommitLimit, verify that the intended swap backend is active and large enough for the chosen overcommit policy. A zero current-use value does not remove the accounting role of that capacity.

Memory PSI rises or the system becomes unresponsive

High, sustained memory PSI, heavy reclaim, or application latency indicates contention. Determine whether the kernel is reclaiming cache, using zswap or zram, blocked by a cgroup limit, or unable to find reclaimable pages. Increasing swap blindly may not fix a cgroup ceiling or a workload that is already exceeding its memory policy.

OOM killer or systemd-oomd intervenes

An OOM event means a relevant memory domain could not satisfy an allocation under its rules. Identify the domain first: the host, a container cgroup, or a service unit. Check its memory and swap limits, priority policy, and recent pressure history. A host can have free swap while a constrained cgroup has reached its own limit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An expected backend is missing

If an administrator expects a partition, file, or zram device, but swapon --show does not list it, investigate activation errors, filesystem support, permissions, and boot-time service ordering. This is a configuration problem distinct from a healthy backend that simply has no pages assigned.

A cgroup swap limit was recently reduced

In cgroup v2, lowering a swap limit below current usage does not necessarily remove all existing swap entries immediately. The kernel can reclaim old entries gradually, so the limit and observed usage may converge over time rather than at the instant of the configuration change.

Choosing between storage swap, zswap, and zram

There is no single best arrangement. Compare the operational trade-offs before changing a production host:

Option Latency and I/O CPU and RAM cost Pressure behavior Observability
Storage-backed swap Can incur block-device latency and write amplification, especially under sustained pressure. Uses storage; no compression CPU cost unless another layer is enabled. Provides additional backing capacity and can contribute to commit accounting. Visible through swapon --show, /proc/meminfo, and device monitoring.
zswap with backing swap Compresses many pages before storage I/O, potentially reducing writes; pages can still spill to the backend. Consumes CPU cycles and RAM for compressed pages. Acts as a cache, not an unlimited replacement for backing swap. Requires zswap statistics in addition to normal swap counters.
zram as swap Often avoids physical-device I/O for pages that fit in the compressed device. Uses RAM and compression CPU; effective capacity depends on compressibility. Can absorb bursts but competes with applications for RAM. Listed as a swap device, with zram-specific statistics separate from disk devices.

Evaluate sustained-load behavior, not just an idle reading. Measure application latency, CPU consumption, PSI, device I/O, and whether the selected arrangement interacts correctly with container or service limits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common interpretations that lead to mistakes

  • “Swap is enabled, so it should show some use.” Activation makes capacity available; it does not schedule writes.
  • “Zero means the machine has abundant RAM.” It only describes current swap entries. A cgroup can be constrained, or pressure can be hidden in compressed RAM and reclaim activity.
  • “Used swap always means active swapping.” A page read back can retain a swap entry, so the count can outlive the I/O event that created it.
  • “Disk swap at zero means zram or zswap is off.” Both compressed mechanisms can hold pages without assigning them to a disk backend.
  • “Set swappiness to zero everywhere.” The value changes reclaim policy and has workload-dependent consequences; it is not a universal performance fix.
  • “Add more swap to solve every OOM.” OOM decisions can arise from commit policy, cgroup limits, or service pressure handling. Establish which limit was reached first.

A practical decision rule

Leave a zero reading alone when the intended swap backend is listed, commit headroom is adequate, PSI remains low, and applications are healthy. Investigate when those conditions diverge: an absent backend, rising pressure, allocation failures, OOM actions, or an unexpectedly restrictive cgroup limit. The meaningful question is not “Has swap ever been used?” but “Can this memory policy provide safe headroom for the workload, and is the kernel under pressure right now?”

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.