Questions tagged [swap]

Swap space is an area of the hard disk that serves as an overflow when the computer memory is full. The memory used by inactive applications is partially written out to disk to make room for other applications and for the disk cache for active files.

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

System not booting after resizing /dev/sda2 and creating a swap partition

Error Message: dev/sda2: The filesystem size (according to the super) is 31126889 blocks The physical size of the device is 29884416 blocks Either the superblock or the partition table is likely to ...
SatoruGojo's user avatar
0 votes
1 answer
27 views

Do applications have priority over tmpfs for RAM usage (in the presence of swap)?

TLDR; If /tmp in mounted as tmpfs, in the presence of swap, is there any kind of priority when swapping ? Does tmpfs start to swap before applications ? FULL STORY I have a laptop with 32G of RAM (...
ChennyStar's user avatar
  • 1,633
1 vote
1 answer
98 views

What reasonable value of swappiness should I config to get better performance?

In the process of optimizing the Android system, the configuration of the 'swappiness' value is crucial. The value path is /proc/sys/vm/swappiness. Some sources suggest setting it to 60, while others ...
morty morty's user avatar
0 votes
2 answers
52 views

How can I force swap to use all of my BTRFS swap file?

I created a BTRFS swap file using the following command: $ btrfs filesystem mkswapfile -s 8G SwapFile However, swap only uses 1GB of the swap file, as shown by the following command sequence: $ du -...
Aubergone's user avatar
0 votes
1 answer
28 views

How does the Linux kernel locate fragments of the swap file when waking from hibernation?

I understand that when waking from hibernation, the kernel does not read the swap file via the filesystem but instead directly from the block device; this is why the resume_offset kernel parameter is ...
Aaron's user avatar
  • 1
0 votes
0 answers
52 views

Accurately monitoring RAM and swap usage while running zswap compression

I'm running zswap on 6.2.0-39-generic (Ubuntu 22.04, HWE). My understanding is that zswap intercepts pages marked for swap, compresses them (if possible) and stores them in a compressed section of the ...
user3012926's user avatar
0 votes
1 answer
52 views

Debian 12 no longer boots after sudo fallocate -l 32G /swapfile

I use a dual boot laptop (Debian-12, Windows-10) with 16GB RAM. Debian had no swap space (is that normal?) and I wanted to create it. I read https://www.digitalocean.com/community/tutorials/how-to-add-...
Markus's user avatar
  • 3
0 votes
0 answers
60 views

startup message in Centos 7: could not boot

Dead community, Does anyone know the solution to this error message that I get when starting Centos Linux (3.10.0-1160.66.1.el7.x86_64) 7 (Core) [ 198.942749] dracut-initqueuel3371: Warning: /dev/...
Pampayacu's user avatar
0 votes
0 answers
18 views

Triggering a script when filesystem usage changes considerably

Is there an existing solution for systemd based systems to call a user defined script when usage on some filesystem exceeds or falls short of certain limits, without implementing a polling every some ...
Juergen's user avatar
  • 664
0 votes
0 answers
134 views

What is the minimum swap size for hibernation?

Consider the following scenario: I'm running a Linux system with a large amount of RAM. Swap is disabled, except for hibernation. When hibernating, let's assume that RAM data can not be compressed ...
programonkey's user avatar
0 votes
0 answers
50 views

Pop_os Slow Boot time

I am experiencing slow boot times. Can anybody help? Thank you all Processor: Intel i5-2450M Memory (RAM): 16GB Graphics: AMD Laptop Model: Toshiba Satellite L850-142 PopOS ver: Pop!_OS 22.04 LTS ...
Isidoros's user avatar
12 votes
1 answer
1k views

change to swappiness on Debian 12 not sticking after a reboot

I have recently started upgrading my database servers from Debian 9 to Debian 12. However it seems that Debian 12 (and indeed 11) are prone to swapping very easily where Debian 9 never did. So I want ...
IGGt's user avatar
  • 2,447
0 votes
0 answers
135 views

Unlocking two LUKS partitions with one password using Kernel parameters

My current setup includes a root partition and a swap partition, both LUKS encrypted. Currently to decrypt them I use the following Kernel paramters: (I am using the systemd and sd-encrypt initramfs ...
emilylime's user avatar
1 vote
1 answer
147 views

Creating swap for Debian across several SSD drives

I have my home server with Proxmox installed. During installation I created just a default swap partition of small size, but did not consider it necessary, since my server has 192GB of RAM installed. ...
Paul Vetrov's user avatar
0 votes
1 answer
16 views

What is the difference between the outputs of two commands, "free -m" and "cat /proc/sys/vm/swappiness," specifically in terms of swap

Is there any difference between the outputs of two commands, "free -m" and "cat /proc/sys/vm/swappiness," specifically in terms of swap.
satya's user avatar
  • 3
0 votes
0 answers
178 views

Arch: Recreate Swap Partition?

I'm running arch, installed with archinstall. I read that arch uses zram for swapping, not disk. Also read somewhere that zram doesn't use disk for swap, so i don't need a swap partition. (I don't get ...
johny why's user avatar
  • 371
0 votes
0 answers
118 views

Warning: No swap limit support in Docker when installed using diskbot

I have created custom OS (Ubuntu 20.04) using diskbot with LVM partition (OS (50GB) and SWAP (4GB)) During the vmdk setup I am Upgrading OS and then installing docker into vmdk. docker --version ...
Ruhulamin Khatri's user avatar
0 votes
0 answers
41 views

Swap partition on USB for hibernation

I have a 128 SSD with 8GB of RAM and 8GB of SWAP. I wanted to enable hibernation and instead of repartitioning my disk (which is also a bit old) I though of trying to create a new swap file on a USB ...
Tommaso Seneci's user avatar
0 votes
1 answer
114 views

How much memory should be left free?

Ever since the lockdowns forced me to use Chromium which used so much memory that it impacted the stability of my system, I always have the gnome system monitor open and obsessively check it for RAM ...
zvavybir's user avatar
  • 101
1 vote
1 answer
418 views

Systemd is eternally stuck on a start-job when I go to boot from my cloned-to NVME. How do I get my system to boot?

I cloned my hard drive using Clonezilla Live to an NVME SSD. My system is EndeavourOS, Systemd, KDE. When booting, Systemd makes it to the Basic Machine job and then it starts the A start job is ...
Asteroid's user avatar
1 vote
1 answer
180 views

Is it safe to permanently remove swap in device with huge memory?

I have a desktop with 128G RAM. This is my typical memory usage when I am not running calculation-heavy scripts: sam@debian:~$ free -ht --si total used free shared ...
bgi8353's user avatar
  • 11
0 votes
0 answers
321 views

Failed to hibernate system via logind: Not enough swap space for hibernation

I'm trying to hibernate via systemctl hibernate but get Failed to hibernate system via logind: Not enough swap space for hibernation LANG=C swapon NAME TYPE SIZE USED PRIO /swap/swapfile ...
Yaroslav Minieiev's user avatar
1 vote
1 answer
268 views

Alpine Linux in Raspberry Pi not activating swap partition on boot

Probably this is a really naïve question, but I can’t make this work by trying the methods I’ve found in the existing documentation or in other solutions. I have Alpine Linux installed on a Raspberry ...
Manan Intindinichu's user avatar
0 votes
0 answers
26 views

Will my (encrypted) swap be erased if I re-encrypt my entire device?

I have a fully encrypted EndeavourOS installation (a variant of arch with the only difference being a GUI installer) with LUKS2. I also (obviously) have my swap space encrypted. However, I am not ...
user avatar
0 votes
0 answers
35 views

Can fstab interfere with MTP mounting?

At some point a few months ago I added a line to the fstab to make the tmp go into ram instead of onto the disk: tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,mode=1777,size=10240M 0 0 That came ...
cardamom's user avatar
  • 550
0 votes
1 answer
150 views

Two questions about Linux swap

Which is better, a /swapfile or a dedicated partition? Disk space and installed memory are not an issue. I currently have a dual-boot system with Windows 11 and Linux Mint Cinnamon 21.1, both in ...
ineuw's user avatar
  • 3
0 votes
1 answer
51 views

Is there iostat-similar tool that tracks swap area activity and page cache miss?

The iostat tool is able to tell us cpu usage, disk r/w throughput second-by-second. Is there a similar tool to track swap area activity and page cache miss? For example, the tool should tell us the ...
Dachuan Huang's user avatar
0 votes
2 answers
323 views

how to interprete log/journal after failed hibernation

Running $ systemctl hibernate shows login screen after a few seconds in Debian bullseye and GNOME desktop. Can someone help identify the issue? $ free -m total used free ...
Johan's user avatar
  • 343
0 votes
4 answers
463 views

Is it possible to use a USB stick as additional RAM, excluding the use of swap partitions?

This question is two-fold: I have a crappy little netbook with just 4GB of RAM, I've been running Linux on there for a couple of years, with just 4GB of ram. It's functioned well under the ...
Lee's user avatar
  • 85
0 votes
1 answer
55 views

Can we use nand device for swap on embedded system?

Om my embedded system I want to use swapping . On my system we have Nand device only which I can use as swap . But I am not able to so since mkswap /dev/mtd8 returned error: mkswap /dev/mtd8 Setting ...
amrita kumari's user avatar
0 votes
1 answer
158 views

Extend Swap partition

I have a system with 125G ram available and a swap partition with 4G, which is constantly full. On a disk with 223 GiB available, I would like to increase the swap partition. Is it safe to just ...
Grigorios's user avatar
  • 163
1 vote
1 answer
513 views

How can one move all ZRAM swap device contents to a swap file?

In a Debian system, how can one move all ZRAM swap device contents to a swap file within the same running session in order to free up RAM, without: Disabling ZRAM first (e.g., using swapoff), as it ...
e.o.'s user avatar
  • 11
1 vote
0 answers
228 views

How to wake up from arch linux hibernation in virtualbox?

I accidentally placed my KDE arch linux virtualbox vm in hibernation - by this, I mean that I accidentally pressed the "hibernate" button in the SDDM lock screen. The screen just went black ...
zmess's user avatar
  • 11
1 vote
1 answer
505 views

swapoff behaviour: what happens when I launch it?

I am curious about the mechanism behind swapoff command; When I run that command, where do "swapped" data go? How does it work?
mattia.b89's user avatar
  • 3,228
1 vote
1 answer
190 views

How to create a private swap file for a specific process or cgroup in Linux?

I'm currently attempting to generate a swap file in Linux that is exclusive to a particular process or cgroup. After going through the LWN article which discusses the patches that enable this ...
Elior Gigi's user avatar
0 votes
1 answer
923 views

New ubuntu installation (Ubuntu 22.04.2 LTS) constantly causing apps to crash

After having a number of issues with applications crashing and worries about my hard drives being corrupt (I kept getting kernel panic signals at startup unless I started in recovery mode), I decided ...
Outstretched Pupil's user avatar
3 votes
1 answer
608 views

How to compress disk swap

I am looking for a way to compress swap on disk. I am not looking for wider discussion of alternative solutions. See discussion at the end. I have tried... Using compressed zfs zvol for swap is NOT ...
linuxlover69's user avatar
1 vote
0 answers
38 views

Optimize recovery after memory pressure

I have a machine that compiles large codebases, with 32 threads and 16 GiB RAM. The RAM is on the small side, but usually sufficient. When it isn't, however, the machine swaps out a few GiB of memory, ...
Simon Richter's user avatar
0 votes
1 answer
36 views

How do I grow the existing swap volume on a debian aws machine?

Running a debian server on aws. lsblk reports: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT <snip> nvme1n1 259:1 0 2G 0 disk [SWAP] <snip> However, free reports swap is ...
StevieD's user avatar
  • 915
0 votes
1 answer
95 views

Does the echo command create a swap file when it writes a line to a file?

I am currently working on a personal project, and I would like to simply record logs in the following way using the echo command. My question is if the echo command accesses the same file at the same ...
JongSun Park's user avatar
2 votes
1 answer
1k views

Is it better to have NO swap partition on a system which is installed on SSD and has 256GB RAM?

Of course, the purpose for swap is if your RAM runs out. But with 256GB RAM, I doubt this will happen. A greater concern is that the frequent writing of the swap partition could wear out the SSD. As ...
unixaddict's user avatar
0 votes
2 answers
2k views

How large should I make root, home, and swap partitions with a HUGE SSD?

I got a 1.5TB datacenter-grade SAS SSD, and I am now installing a new install of CentOS 7 on it (CentOS 7 will be changed to CloudLinux later). I am setting up the partition scheme and I have plenty ...
unixaddict's user avatar
0 votes
1 answer
184 views

Why does hibernation require a swap space to be roughly equal in size to total system RAM when we have file mapping and demand paging?

It is my understanding that pages in memory containing things like program text and shared libraries that have associated real world files will actually map to that associated file instead of swap (i....
qmild's user avatar
  • 1
0 votes
0 answers
173 views

Which partition should be at top /boot or swap partition?

I am installing Ubuntu and I was confused while partition that which partition should be at top /boot or swap partition? Because I want maximum performance. And is it good to create/home partition ...
RobinHoodRKA's user avatar
0 votes
1 answer
39 views

Why does the swap mapper file get created even though I removed it from /etc/crypttab?

I have this line in /etc/crypttab for my swap partition: luks-4205519b-f3fe-468f-b05e-44f25f6882a4 UUID=4205519b-f3fe-468f-b05e-44f25f6882a4 /crypto_keyfile.bin luks,keyscript=/bin/cat I ...
zomega's user avatar
  • 960
1 vote
1 answer
40 views

How to Get Total Count of Non-Swappable Pages in RAM?

I am trying to debug some ML code that requires pinned physical memory, and in order to help with this, I would like to figure out how much of physical RAM consists of pages that can't be swapped out (...
Agent 008's user avatar
9 votes
3 answers
2k views

Why do processes on Linux crash if they use a lot of memory, yet still less than the amount of swap space available?

I am using Linux 5.15 with Ubuntu 22.04. I have a process that uses a lot of memory. It requires more memory than I have RAM in my machine. The first time that I ran it, it was killed by the OOM ...
c--'s user avatar
  • 141
0 votes
1 answer
149 views

Kubuntu takes a long time to boot

Checked on many places, and no solution satisfied me, so giving out the info I believe that should help to know the issue. Thanks in advanced: $systemd-analyze Startup finished in 4.424s (firmware) + ...
Miguel Fernández's user avatar
0 votes
0 answers
74 views

Where accessing swap space is handled in Linux kernel?

I am working as a research assistant and this question is really vital for our group: We are looking for a way to inject delays when a process (i.e. a python program) is using swap space. For example, ...
Amirhossein Sefati's user avatar
1 vote
2 answers
984 views

On AlmaLinux 8 or CentOS 7, does vm.swappiness=0 mean that Swap is fully disabled?

I've been having an issue for many years where I have vm.swappiness=1 in sysctl.conf, but even though there's plenty of RAM available (possibly almost full in terms of cached, although still 4GB free ...
Nuno's user avatar
  • 113

1
2 3 4 5
14