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
6
votes
2answers
230 views

Linux: The difference between “paging on major page fault” and “swapping enabled manually” [closed]

On a Linux machine, we can enable swap by commands like the following sudo fallocate -l 500M /data/swapfile sudo chmod 600 /data/swapfile sudo mkswap /data/swapfile sudo swapon /data/swapfile But ...
0
votes
0answers
13 views

Activating swapspace causes system to freeze during file copy. (KDE Neon)

I recently updated my kernel from 5.0 to 5.3, after the update copying files between drives freezes my pc so much so that it is barely usable. After some research I found out that the problem was ...
0
votes
0answers
21 views

Swap with hibernation vs Swap without hibernation

So, I get my live USB of manjaro and sit down to install it. When I get an option for choosing between swap with hibernation vs swap without hibernation. The laptop only has 2gb of ram and I can't ...
-1
votes
0answers
32 views

How to delete swp file via command?

I ran swapoff to try to get rid of several swap files. However, I get this error swapoff: /dphys-swapfile.swp: swapoff failed: No such file or directory Despite the fact that it did find a swp file: ...
0
votes
2answers
48 views

What is lazy swap reservation?

I am reading the Linux Progamming Interface. 49.9 MAP_NORESERVE and Swap Space Overcommitting Some applications create large (usually private anonymous) mappings, but use only a small part ...
0
votes
1answer
19 views

Adding swap partition with LVM

I have a simple question. I have a virtual machine already installed with RHEL7 and I have to add the swap partition to the system. I haven't enough free space on the PV so I have to add a new disk. ...
1
vote
0answers
9 views

Hibernate menu option not working, but s2disk works

I set up a swap partition on my computer so I could hibernate. It's twice as big as my RAM, and shows up in System Monitor. When I run sudo s2disk, my computer hibernates, and resumes successfully. ...
1
vote
1answer
85 views

ubuntu hibernation - swap file UUID is missing and power issues

I am trying to add hibernation to ubuntu 18 on laptop. There are 3 disks, ssd m2, ssd and sd-card. Previously there were windows 10 on ssd m2 and ubuntu on ssd; now I have only one ubuntu on ssd m2. ...
0
votes
1answer
24 views

lsblk does not indicate if partition is a swap disk on Arch 2020.02.01

I'm trying to install Arch Linux on VMware workstation following Installing Arch Linux on VMware Workstation. I have created four partitions with cfdisk /dev/sda including a swap disk on /dev/sda2. ...
0
votes
1answer
72 views

“DxvkMemoryAllocator: Memory allocation failed” while running any WineHQ dxvk (d3d) game

While running any game, that is too memory hungry, thru Wine (WineHQ) it may completely fill up the RAM memory, before it have time to swap anything, causing this error: "DxvkMemoryAllocator: Memory ...
3
votes
1answer
184 views

Overloaded the RAM, now disk (SSD) is behaving as read only, fixable?

What happened; I started a badly written script to combine two binary files (via ssh), it needed more space than available in the RAM, presumably started using disk space as swap. My ssh connection ...
1
vote
1answer
48 views

Insufficient free space lvresize swap

My task is resize swap partition which is of LVM type. I turned off swap with swapoff. Now when I tried resize it sudo lvresize -L+1G /dev/ol/swap it trigger error message Inssuficient free space 265 ...
0
votes
2answers
83 views

Can't convince initramfs of my new swap partition

(Running Debian 10.2 XFCE) Due to some partition resizing needs, I had to delete my original swap partition and add a new one. I changed the entry in /etc/fstab - swap is recognized and working. I ...
1
vote
1answer
130 views

fstrim does not trim swap

I have set up an encrypted swap partition following this guide. My /etc/crypttab is set up like this (note the discard option on swap): rootfs UUID=<UUID_root> none luks,discard swap UUID=<...
0
votes
0answers
36 views

Host rebooted when issued `swapoff -a`

On a physical host running Ubuntu 12.04.4 LTS and serving as a hypervisor via qemu, hosting a single guest, I've issued: swapoff -a To the host, which hung for several minutes before kicking me out ...
43
votes
14answers
10k views

What specifically can swap do that RAM can't?

What specifically can Linux do when it has swap that it can't without swap? For this question I want to focus on the difference between for example, a Linux PC with 32 GB RAM and no swap vs. a ...
1
vote
0answers
46 views

Increase size of randomly created encrypted swap

Ubuntu 18.04 is by default creating a random encrypted swap during each boot using dm-crypt/Swap encryption. For me, this is creating a 1gb swap but I cannot find where to increase the size of the ...
0
votes
1answer
41 views

User-space swap on mmap()-ped files

Imagine a system with very small ram (nearly embedded). It is enough - for nearly all tasks, but with an exception. There is a task X, which requires a huge amount of RAM what the machine has not. ...
0
votes
0answers
49 views

vm.swappiness=0 is not respected

My Ubuntu 19.10 laptop has 32gb ram and a large swap partition. I set add vm.swappiness = 0 to /etc/sysctl.conf so that $ cat /proc/sys/vm/swappiness returns 0 Now I expect that swap will not be ...
0
votes
0answers
8 views

hugepagesz page table questions

trying to understand linux page tables... I am reading the RHEL 7 performance tuning guide and watching youtube vid of RH summit may 2018 https://www.youtube.com/watch?v=RLNMlsa173o* Having System H ...
0
votes
1answer
79 views

Are Virtual Memory and Swap Space the same?

I have been working with Linux for quite sometime and when we say virtual memory are we referring to swap space? Say for instance in the top command we have a separate column for VIRT(virtual memory), ...
2
votes
1answer
51 views

Can't disable swap on a GPT-based system

I want to disable swap on several running ubuntu 16.04 servers. I'd like, if possible, not to reboot them. From my research, it seemed that running swapoff -a to disable swap until the next reboot ...
0
votes
0answers
48 views

AIX strong memory consumption

Yesterday i had empty free memory on one of my main vio ! This vio got 8 lpars $ w rksh: 0403-031 The fork function failed. There is not enough memory available. Today i am lucky i can send command,...
0
votes
1answer
25 views

Why does the 'disks' app and 'system monitor' show different capacity for the swap on ubuntu 18.04

Context: I installed ubuntu 18.04 on a lenovo legion y540 laptop with dual hard disks. ubuntu 18.04 on 128GB m.2 and windows 10 on the second drive-ssd. When I installed ubuntu I chose 15GB swap ...
3
votes
1answer
53 views

Linux aggressively swaps when doing large IO operations

I have a strange problem on my Debian 10 desktop system when I am doing large IO operations like copy large files from/to external drivers or also on the internal disc. I could pin this down to the ...
0
votes
0answers
12 views

In Linux, is it possible to *reserve* swap space for swsusp, while *also* having some swap space for normal use?

My understanding is that suspend-to-swap (swsusp) will fail if there is not enough free space in swap. Is there a way to reserve swap space for swsusp, such that the space will never be used for "...
2
votes
1answer
245 views

How do I permanently disable swap on archlinux?

I have Archlinux x86_64 installation on my laptop and desktop. At the time of installation, I have created a swap partition with fdisk and enabled that with sudo swapon /dev/sda3. But even with ...
0
votes
0answers
53 views

fdisk mkswap No such file or directory

Im trying to create new swap partition but I have error when I try mkswap /dev/vda1p1 /dev/vda1p1: No such file or directory Please check -bash-4.2# lsblk NAME MAJ:MIN RM SIZE RO TYPE ...
2
votes
1answer
111 views

How to fine tune Linux cache/swap ratio?

I've got a problem with my PC which makes the GUI almost unusable, very sloppy until dead. I've come down in my analysis that it is caused by the cache/buff forcing too much swapping. Is there any ...
3
votes
1answer
87 views

Large memory allocations cause kernel to swap even though more than enough memory is free

My situation is virtually the same as this post on serverfault. To summarize: I have a really simple C++ app that uses a hash-map to count and merge a number of large files. I reserve memory with ...
2
votes
1answer
279 views

Hibernate to a swap partition without using it as actual swap space

For many years I set up my Linux machines with no swap, as they had enough memory to do what I needed and I would rather a process get killed if it used too much memory, instead of growing larger and ...
0
votes
1answer
28 views

How to move swap from encrypted lvm to one-time key?

Currently my setup is: cryptsetup lvm root home swap I would like to achieve something like cryptsetup lvm root home swap (one-time key) The steps i am thinking of are: remove swap (can do) ...
2
votes
2answers
50 views

How can I fix my swap partion?

So a couple of months ago I installed, on my computer, dual boot so I could have windows and ubuntu at the same time. I had some struggles because my PC is designed with UEFI support (Model: ASUS ...
0
votes
0answers
50 views

memory swapping and cgroup

I wonder how is swapping mechanism implemented under the memory cgroup v1. Most existing books (understanding the linux kernel, professional linux kernel architecture, understanding the linux virtual ...
2
votes
2answers
276 views

Ansible resetting swap on linux

I am newbie to Ansible, i failed using ansible via command that way : ansible host -a "/sbin/swapoff -a && /sbin/swapon -a" Only this worked ansible host -a "/sbin/swapoff -a ansible host ...
2
votes
2answers
31 views

Mounting temporary swap partition on boot

I bought some SanDisk 16GB U100 SSD's off of eBay and discovered that they had a peculiar problem; they act like RAM in that they can be partitioned/formatted/etc., all test come back positive, and if ...
0
votes
0answers
22 views

Swap partition is used only when RAM usage is to the full [duplicate]

Irrespective of the value I set for swappiness (/proc/sys/vm/swappiness) , the swap area is used only when the RAM is used to the full. Some configuration must be overriding the swappiness. My ...
0
votes
0answers
38 views

Shortcut to clear swap on demand

I am trying to make a shortcut on my desktop where i can just click on it from the Quicklauncher panel when the system is slowing down to clear the swap. Right now i am using this code in terminal: ...
1
vote
1answer
25 views

Deleted swap that I created

I am running Fedora 29 I was trying some things so I created a swap partition at /var/tmp/swap_file then I turned on the swap file. This caused me boot errors because it filled up my root directory. ...
1
vote
1answer
121 views

What are the pros and cons of using swap file on Ubuntu 16.04? Is it recommended to use swap file over swap partition on current Ubuntu version?

I am planning to implement swap file over swap partition on Ubuntu 16.04. Going through various blogs I found that hibernation is only supported by swap partition and resizing is privileged on swap ...
3
votes
3answers
322 views

How to Swap Partition Size For Domestic Ubuntu

Trying here to do an installation of Ubuntu 18.04 LTS, focusing on domestic surveillance with some ip cameras. There will be about 12 cameras, which we are going to add in Zoneminder with images ...
3
votes
2answers
170 views

How to configure Linux to use a swap partition on a different physical drive when the boot physical drive also has one?

I've installed Manjaro on a USB stick (I mean real installation, not the live ISO - Manjaro ISO lacks persistence support) and also made a swap partition on it. But I would like it to prefer using a ...
3
votes
1answer
98 views

Is it expected to have a system frozen for more than an hour because of intensive swapping?

Following on from this question: What can make Linux so unresponsive? I get forced to wait for a minute or more to get rid of the bloat, sometimes it stays unresponsive for twelve minutes, and ...
2
votes
0answers
56 views

Is there a syscall to move memory back from swap to RAM?

I am wondering, is there a syscall, or has this ever been discussed, to move memory pages from swap back to RAM, given there is enough free RAM? I am thinking of something like the infamous swapoff -...
0
votes
0answers
19 views

what does CPU do during process swapping

swapping out and swapping in of a process takes huge time (assume 2 secs as I read in Galvin) Question 1 : during that 2 secs does CPU waits for the process to load or it's assigned to some other ...
12
votes
2answers
1k views

Does Linux perform “opportunistic swapping”, or is it a myth?

Suppose a program asks for some memory, but there is not enough free memory left. There are several different ways Linux could respond. One response is to select some other used memory, which has ...
3
votes
1answer
30 views

“One-shot” swapping activity monitoring

I am trying to monitor the swapping activity in a Linux Server in the last, say, 1, 5 or 15 minutes. One way is to run vmstat and keep watching si and so counters during these intervals. However how ...
1
vote
0answers
17 views

Hardware ready net-to-old-device solution in linux

I'm not sure how to word my question, but here goes. I have a setup in which a linux PC is supposed to communicate with my custom hardware with the serial port. I installed "Damn Small Linux V4.10" ...
5
votes
2answers
824 views

Are Linux kernel modules a sort of Linux system paged pool?

I always read that Linux kernel isn't pageable. If I'm not mistaken Windows, instead, divedes system virtual memory in a paged part (paged pool) and non-paged part (non-paged pool). The non-paged part ...
1
vote
0answers
46 views

Long boot: BTRFS, swap space, and LVM

I'm running into an issue where my computer hangs for close to 30 seconds on "scanning for btrfs file systems" during boot. I don't have any btrfs filesystems. I tried removing btrfs-tools and ...

1
2 3 4 5
11