Swap is not being used

my swap was used by system previously but since some days im noticing its not being used

swapon and garuda-inxi output here

swapon --show

NAME           TYPE       SIZE USED PRIO
/dev/zram0     partition  7.6G   0B  100
/dev/nvme0n1p7 partition 16.8G   0B   -2
garuda-inxi

System:
Kernel: 6.14.9-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 15.1.1
clocksource: tsc avail: acpi_pm
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=8cfa510d-8533-4290-a776-520ee1b846b6 rw rootflags=subvol=@
vt.default_red=30,243,166,249,137,245,148,186,88,243,166,249,137,245,148,166
vt.default_grn=30,139,227,226,180,194,226,194,91,139,227,226,180,194,226,173
vt.default_blu=46,168,161,175,250,231,213,222,112,168,161,175,250,231,213,200
quiet resume=UUID=8b3cc991-5a40-4e12-ad6e-5f4bb09d8645 loglevel=3 ibt=off
Desktop: KDE Plasma v: 6.3.5 tk: Qt v: N/A info: frameworks v: 6.14.0
wm: kwin_wayland vt: 1 dm: SDDM Distro: Garuda base: Arch Linux
Machine:
Type: Laptop System: HP product: HP Laptop 15s-du1xxx
v: Type1ProductConfigId serial: <superuser required> Chassis: type: 10
serial: <superuser required>
Mobo: HP model: 85F1 v: 37.30 serial: <superuser required>
part-nu: 45W89PA#ACJ uuid: <superuser required> UEFI: Insyde v: F.67
date: 08/07/2024
Battery:
ID-1: BAT1 charge: 34.3 Wh (100.0%) condition: 34.3/40.9 Wh (84.0%)
volts: 12.7 min: 11.3 model: Hewlett-Packard PABAS0241231 type: Li-ion
serial: <filter> status: full
CPU:
Info: model: Intel Core i3-10110U bits: 64 type: MT MCP
arch: Comet/Whiskey Lake note: check gen: core 10 level: v3 note: check
built: 2018 process: Intel 14nm family: 6 model-id: 0x8E (142)
stepping: 0xC (12) microcode: 0x100
Topology: cpus: 1x dies: 1 clusters: 2 cores: 2 threads: 4 tpc: 2
smt: enabled cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB
desc: 2x256 KiB L3: 4 MiB desc: 1x4 MiB
Speed (MHz): avg: 559 min/max: 400/4100 scaling: driver: intel_pstate
governor: powersave cores: 1: 559 2: 559 3: 559 4: 559 bogomips: 20799
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Hewlett-Packard
driver: i915 v: kernel arch: Gen-9.5 process: Intel 14nm built: 2016-20
ports: active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
chip-ID: 8086:9b41 class-ID: 0300
Device-2: Luxvisions Innotech HP TrueVision HD Camera driver: uvcvideo
type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-5:2
chip-ID: 30c9:0035 class-ID: fe01 serial: <filter>
Display: wayland server: X.org v: 1.21.1.16 with: Xwayland v: 24.1.6
compositor: kwin_wayland driver: X: loaded: modesetting
alternate: fbdev,intel,vesa dri: iris gpu: i915 display-ID: 0
Monitor-1: eDP-1 model: ChiMei InnoLux 0x15f5 built: 2017 res:
mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 142 gamma: 1.2
size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9
modes: 1920x1080
API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris wayland:
drv: iris x11: drv: iris
API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 25.1.1-arch1.2
glx-v: 1.4 direct-render: yes renderer: Mesa Intel UHD Graphics (CML GT2)
device-ID: 8086:9b41 memory: 7.38 GiB unified: yes display-ID: :1.0
API: Vulkan v: 1.4.313 layers: 5 device: 0 type: integrated-gpu name: Intel
UHD Graphics (CML GT2) driver: mesa intel v: 25.1.1-arch1.2
device-ID: 8086:9b41 surfaces: N/A device: 1 type: cpu name: llvmpipe
(LLVM 19.1.7 256 bits) driver: mesa llvmpipe v: 25.1.1-arch1.2 (LLVM
19.1.7) device-ID: 10005:0000 surfaces: N/A
Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
de: kscreen-console,kscreen-doctor wl: wayland-info
x11: xdpyinfo, xprop, xrandr
Audio:
Device-1: Intel Comet Lake PCH-LP cAVS vendor: Hewlett-Packard
driver: snd_hda_intel v: kernel alternate: snd_soc_avs,snd_sof_pci_intel_cnl
bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0403
API: ALSA v: k6.14.9-zen1-1-zen status: kernel-api tools: N/A
Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
Server-2: PipeWire v: 1.4.4 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
lanes: 1 port: 4000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: eno1 state: down mac: <filter>
Device-2: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter
vendor: Hewlett-Packard driver: rtw_8822ce v: N/A modules: rtw88_8822ce
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 02:00.0
chip-ID: 10ec:c822 class-ID: 0280
IF: wlo1 state: up mac: <filter>
Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.0
speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-10:3 chip-ID: 0bda:b00c
class-ID: e001 serial: <filter>
Report: btmgmt ID: hci0 rfk-id: 1 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: <filter> bt-v: 5.1 lmp-v: 10
status: discoverable: no pairing: no
RAID:
Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
v: 3.0 port: 5060 bus-ID: 00:17.0 chip-ID: 8086:282a rev: class-ID: 0104
Drives:
Local Storage: total: 476.94 GiB used: 56.39 GiB (11.8%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
model: MZVLQ512HALU-000H1 size: 476.94 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter>
fw-rev: HPS4NFXV temp: 41.9 C scheme: GPT
Partition:
ID-1: / raw-size: 233.57 GiB size: 233.57 GiB (100.00%)
used: 56.39 GiB (24.1%) fs: btrfs dev: /dev/nvme0n1p8 maj-min: 259:8
ID-2: /boot/efi raw-size: 1.5 GiB size: 1.5 GiB (99.80%)
used: 620 KiB (0.0%) fs: vfat dev: /dev/nvme0n1p6 maj-min: 259:6
ID-3: /home raw-size: 233.57 GiB size: 233.57 GiB (100.00%)
used: 56.39 GiB (24.1%) fs: btrfs dev: /dev/nvme0n1p8 maj-min: 259:8
ID-4: /var/log raw-size: 233.57 GiB size: 233.57 GiB (100.00%)
used: 56.39 GiB (24.1%) fs: btrfs dev: /dev/nvme0n1p8 maj-min: 259:8
ID-5: /var/tmp raw-size: 233.57 GiB size: 233.57 GiB (100.00%)
used: 56.39 GiB (24.1%) fs: btrfs dev: /dev/nvme0n1p8 maj-min: 259:8
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
ID-1: swap-1 type: zram size: 7.56 GiB used: 0 KiB (0.0%) priority: 100
comp: zstd avail: lzo-rle,lzo,lz4,lz4hc,deflate,842 max-streams: 4
dev: /dev/zram0
ID-2: swap-2 type: partition size: 16.76 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p7 maj-min: 259:7
Sensors:
System Temperatures: cpu: 49.0 C pch: 47.0 C mobo: N/A
Fan Speeds (rpm): N/A
Info:
Memory: total: 8 GiB available: 7.56 GiB used: 3.57 GiB (47.2%)
Processes: 240 Power: uptime: 40m states: freeze,mem,disk suspend: deep
avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
suspend, test_resume image: 3 GiB services: org_kde_powerdevil,
power-profiles-daemon, upowerd Init: systemd v: 257 default: graphical
tool: systemctl
Packages: pm: pacman pkgs: 1328 libs: 398 tools: octopi,paru Compilers:
gcc: 15.1.1 Shell: garuda-inxi default: fish v: 4.0.2 running-in: konsole
inxi: 3.3.38
Garuda (2.7.2-1):
System install date:     2025-05-21
Last full system update: 2025-06-01
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       Probably (Run as root to verify)
Failed units:

You should be “happy” that no swap is used.
example with free -m you see what your system is using.
My example: os garuda dragon + browser + konsole is running.

╭─gampel@garudacomp in ~ took 0s
đź•™ 19:32:45
╰─λ free -m
              gesamt       benutzt     frei      gemns.  Puffer/Cache    verfĂĽgbar
Speicher:      32012        4855      22709        1333         6210         27157
Swap:          41021           0      41021

or use

vmstat 1 5

@sgs thx for the correction

1 Like

Swap should only be used in situations of memory pressure. If you have plenty of memory available, your system should be using that instead of swap because it is faster and less taxing on your system’s resources.

You have plenty of memory available still, so no reason to swap.

4 Likes

Its not used by system ayway
I used to be think that swap or zram is used to boost performances. Btw, previously swap was used always though i had enough ram spaces but now its not that’s make me worried

Now days with more systems having more ram, it’s used to catch things you loaded and hadn’t used in a long time so it drops out of ram an moves to swap though this isn’t always. Most the time it’s 0 usage but leave your computer on a long while you should see it get some activity. zram an all the ones like it.

1 Like

that means it’s completely ok to have this kind of no usage by swap?

As long as your system doesn’t actually NEED to use swap, then it’s ok.

1 Like

That’s right, zero swap in use is the preferred state. You can think of swap as kind of an emergency backup for real memory.

4 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.