Skip to main content

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
1 vote
1 answer
60 views

Swapping contents of two drives with the same capacity

I have two flash drives, for example, and due to USB speeds prefer have the contents of one on the other and vice versa. This includes the MBR and EFI bootloaders. I am not referring to swap space. ...
markoj's user avatar
  • 13
0 votes
1 answer
75 views

Why is Linux not using RAM but only Swap?

How can such an output of free -m be explained? total used free shared buff/cache available Mem: 32036 1012 225 3 8400 ...
theHacker's user avatar
  • 181
0 votes
1 answer
40 views

mega.nz Linux client megasync crashes with: Segmentation fault (core dumped)

When running the native Linux GUI client megasync, it keeps on crashing every few minutes with my main backup folder. Sometimes it takes a minute, sometimes half an hour, but eventually it crashes and ...
bizna's user avatar
  • 149
0 votes
0 answers
24 views

What happens if the block driver returns I/O error when handling addr fault for swap

If a block device was attached as a swap space, there can now be virtual addresses which require operation from the block driver to be read/written. When such address is accessed, a page fault is ...
melonfsck's user avatar
0 votes
2 answers
62 views

why is all this swap space being used?

I have a Debian box, where I am doing some data recovery using ddrescue on a sata ssd. The process has been running for 24 hours, and has 24 to go (at least) in any event, the PC has 16GB ram, and ...
j0h's user avatar
  • 3,669
2 votes
2 answers
35 views

Page table address field for uncached page

According to Bryant and O'Hallaron's (somewhat abstracted) model of the page table on Linux-like systems, each page table entry (PTE) has an address field that holds one of three kinds of value: (1) ...
Amittai Aviram's user avatar
2 votes
0 answers
33 views

"Fatal error: Unable to allocate enough memory" but a lot of unused swap

I am trying to run CRABS (specifically the Pairwise Global Alignment subsection, which invokes vsearch) on a 128GB RAM workstation, with OS=Ubuntu 23.04, kernel=6.2.0-39generic. I have no problems ...
user24029707's user avatar
1 vote
0 answers
64 views

Linux SERVER swap memory

I have a linux server. It is running java process namely kafka. I set vm.swapiness = 10. But I see the swap capacity keeps increasing, There is a lot of free memory space. Can someone explain to me ...
Tai Nguyen Huu's user avatar
0 votes
0 answers
26 views

User space swap

I have low physical memory 1GB in my VPS container based (LXC), therefore I can't change kernel parameter such as swap memory swappiness. Even though there is swap allocated from built-in VPS when I ...
Muhammad Ikhwan Perwira's user avatar
0 votes
0 answers
34 views

Prevent OOM killer inside guest in LXC

I have a python program myprogram.py. I realized that my python program is being killed due to Out Of Memory (OOM). But, I noticed also that my VPS is inside LXC and has swap 1GB, when the memory full ...
Muhammad Ikhwan Perwira's user avatar
1 vote
1 answer
40 views

Is it safe to write to file's extents directly while the FS is r/w?

Given any file on an ext4 filesystem, it is possible (using filefrag -v) to get the list of real offsets+lengths where that file is located on the underlying block device. Is it safe to open the ...
melonfsck's user avatar
0 votes
0 answers
47 views

Something (presumably, mkswap) corrupted my btrfs partition

I am kind of new to arch (endeavour os particularly), but i am not sure that the problem is in the system. In short, my laptop won’t go to hibernation after it’s lid is closed because it didn’t have a ...
JosephWilliamsen's user avatar
0 votes
0 answers
64 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
36 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,785
1 vote
1 answer
594 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
68 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
35 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
121 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
78 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
178 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
21 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
  • 684
0 votes
0 answers
185 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
96 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,497
0 votes
0 answers
225 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
197 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
275 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
207 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
53 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
273 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
760 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
244 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
495 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
461 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 ...
user avatar
0 votes
0 answers
41 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
40 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
  • 572
0 votes
1 answer
163 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
93 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
547 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
  • 409
0 votes
4 answers
724 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
  • 87
0 votes
1 answer
61 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
191 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
  • 173
1 vote
1 answer
613 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
289 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
777 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,268
1 vote
1 answer
228 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
1k 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
905 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
40 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

1
2 3 4 5
15