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
1 answer
10 views

Why k3s is still seeing swap on Debian Bullseye?

I've installed k3s on Debian Bullseye (on M1 Pro through qemu/UTM). k3s recommend to disable the swap. After reading the answers of the following questions: How to safely turn off swap permanently ...
user avatar
0 votes
1 answer
31 views

How to get cache used per process on *nix systems

I would like to know, what is cache usage per process. Is there a way to do it? I'm currently on Ubuntu. The problem is, that my PC fills up whole cache, and then when I need RAM just starts swapping ...
user avatar
5 votes
1 answer
140 views

Is swapped memory encrypted on encrypted partitions?

If I installed Ubuntu on an encrypted ext4 partition, I normally have a /swapfile. Now I would expect that the swapped memory is also encrypted by default. However, the man-page of swapon says: The ...
user avatar
  • 181
2 votes
1 answer
97 views

What is the replacement of memory.swappiness file in cgroups v2

I'm currently migrating from cgroups v1 to cgroups v2. And I can't find the memory.swappiness file that I used in cgroups v1. There are only the following files concerning swap memory.swap.current ...
user avatar
  • 105
0 votes
2 answers
74 views

What kind of content/data does "fallocate" command generate?

When is executed the sudo fallocate -l 2G /swapfile command, then 2 GB is created, but with that kind of content or data? Can be it customized? If yes How?. I did do some research but there are no ...
user avatar
0 votes
0 answers
20 views

swap file: dd or fallocate? [duplicate]

About swap file in many tutorials within their procedures user either dd or fallocate dd as: sudo dd if=/dev/zero of=/swapfile bs=1024 count=N # N represents a high number to get X giga fallocate as:...
user avatar
1 vote
1 answer
81 views

What should be in my /etc/fstab if I have two discs?

I have a laptop. It has two hard drives. One is an SSD with a normal Windows 10 install on it. The other is an mSata with a normal install of FreeBSD13 on it. To install FreeBSD I removed the SSD, ...
user avatar
0 votes
2 answers
35 views

On Linux what is the technical minimum size for a functional swap partition

What is the technical minimum size for a functional (holds some pages) swap partition or file on Linux. If it's architecture dependent, or depends on the size of physical memory or something, how ...
user avatar
  • 383
0 votes
0 answers
28 views

Running computations from SWAP without complete performance drop - Discussion on NVMe speeds and if they ever come in reach for RAM replacements

I have been setting up my Linux machine (currently pop-os) in several ways recently to upgrade my system to demands of specific data analysis done in R. In brief: The Data set I am working on is ...
user avatar
-3 votes
1 answer
51 views

what is the different between settings swappiness to 0 to swapoff

we want to disable swap on all our rhel servers ( hadoop servers ) we have 2 options set swappiness to 0, and swapoff -a & swapon -a swapoff -a , and disable swap from fstab from my ...
user avatar
  • 10.9k
3 votes
3 answers
531 views

Does swap on zram free backing pages when pages are unswapped from it?

Imagine a scenario where 2GiB is swapped out to zram and compresses down to 1GiB. Once the memory pressure is alleviated and the 2GiB gradually become unswapped, does Linux free the 1GiB of pages that ...
user avatar
  • 333
1 vote
0 answers
84 views

linux + running swapoff and swapon on the background

We want to update the vm.swappiness from 10 to 1 and to perform swapoff and swapon , so the consuming of memory will be only from the memory cards and not from disk So we wrote the following bash ...
user avatar
  • 10.9k
0 votes
0 answers
34 views

Is there any configuration that I can change to make the system kill a process when RAM memory is full?

I work on a computer with 32GB of RAM using Ubuntu 20.04. I often open some VirtualBox machines and keep a lot of stuff open at once. Sometimes I accidentally fill all the RAM memory on the computer ...
user avatar
  • 319
0 votes
1 answer
107 views

Can't boot into my LUKS-encrypted Drive after deleting swapfile

My drive uses LVM and is LUKS encrypted (EFI). I am trying to get into my drive, but after I put in my password for the LUKS encryption, it hangs. I recently needed to add more memory to my root ...
user avatar
2 votes
1 answer
63 views

Maximum number of swapfiles - kernel documentation bug?

I'm writing an article about swapfiles. I decided to check how many swapfiles can I create and use. According to man 2 swapon, I know that it should be 29 - https://man7.org/linux/man-pages/man2/...
user avatar
0 votes
0 answers
39 views

Why swap still used? [duplicate]

My system has 72GB of RAM. My program ( build code ) uses about 7GB of RAM to build code. I don't understand why swap (HDD RAM) is still used? Since there is about 65GB of free memory.
user avatar
  • 371
0 votes
0 answers
34 views

Is there a way to restrict use of swap to cases when otherwise the OOM-Killer would kick in? [duplicate]

Is there a way to completely restrict using swap if there are buffers/cache in use? And use swap only to prevent Out-Of-Memory Killer. Is there a way to forbid using swap if are there still buffers/...
user avatar
0 votes
0 answers
17 views

How to log hardware usage stats for some time and get peak swap usage?

I'm building Android frequently and I need to figure out peak swap usage during build process. How I can do that?
user avatar
  • 47
0 votes
1 answer
965 views

mount(2) system call failed: No such file or directory

I cannot mount the swap subvolue. -> sudo mount -av / : ignored /home : already mounted mount: /swap: mount(2) system call failed: No such file or ...
user avatar
  • 247
0 votes
1 answer
30 views

What's the purpose of initializing a swap file without a mount point? [closed]

The zram-generator's documentation states, If a mount point is not specified, the device will be initialized, but will not be used for anything. Why would anyone want to initialize a swap file ...
user avatar
0 votes
0 answers
51 views

My Ubuntu + i3 freezes randomly without any log

I'm using Ubuntu server 21.10 with i3 along with Compton. Everything thing works fine, but sometimes (every 2 or 3 days) it freezes completely and no more action could be taken, nothing works and I ...
user avatar
1 vote
1 answer
106 views

How to add encrypted swap file on FreeBSD 13

I want to add encrypted swap file in FreeBSD 13. I have read this documentation page, but it doesn't explain how to set up encryption for the swap file. I've also read another one, but it only gives ...
user avatar
  • 161
0 votes
0 answers
110 views

"This disk is currently in use" - but nothing seems to be using it?

I am installing ArchLinux for the first time I made the corresponding partitions but for some reason when I want to do the swap or format them it tells me that it is busy. I deleted all the partitions ...
user avatar
0 votes
2 answers
362 views

parted: create swap partition on gpt disk (one liner) not working

I am trying to create a swap partition in my script using parted based on the Arch Linux guidance. https://wiki.archlinux.org/title/Parted#Partition_schemes Somehow it is always sort of skipping the ...
user avatar
1 vote
0 answers
85 views

GNU/Linux starts swapping with 50% RAM available

Recently (like 1-2 months ago) my laptop has started to become sluggish for short periods (~1 minute). It is due to kswapd. I would love it if kswapd preemptively slowly freed up RAM in the background,...
user avatar
  • 29.6k
0 votes
0 answers
31 views

If I disable swap on linux will it open up the possibility for a hard reboot?

I know the OOM killer is invoked when out of memory. And this answer here: https://askubuntu.com/questions/440326/how-can-i-turn-off-swap-permanently says that it can potentially cause a hard reboot. ...
user avatar
  • 101
3 votes
1 answer
191 views

How does the kernel decide between disk-cache vs swap?

Following on from topics raised in other questions, I believe that when the Linux Kernel is trying to free up physical RAM it makes some kind of decision between discarding pages from its disk cache ...
user avatar
0 votes
1 answer
33 views

Centos release 7.3.1611 Extend Swap partition from current 1GB to 2GB

Could someone who has a deep knowledge can try explain how to achieve and increase a swap memory from 1 to 2G? I'm running Centos on Oracle Virtualbox. After utilized a command lsblk : sda ...
user avatar
0 votes
0 answers
43 views

Swap space not being used effectively

I am using Parabola Linux (variant of Arch) on a Macbook Pro laptop. I have 8 GB of RAM and 8 GB of swap space set up. As far as I can see, the swap space is enabled and working; however, it seems it ...
user avatar
  • 2,122
0 votes
1 answer
72 views

Will Clonezilla ignore my swapfile when saving a disk?

I have a PC with 32GBs of RAM running Linux Mint 20. As per instructions found here (which were meant for 19, but appear to work for 20), I have increased my swapfile to just a little larger than my ...
user avatar
1 vote
1 answer
332 views

Cannot disable swap

I have a freshly installed fedora system, and I am struggling to turn off swap. I have checked /etc/fstab and there are no mentions of a swap partition there. I can turn swap off with swapoff -a but ...
user avatar
  • 113
0 votes
0 answers
34 views

Wanted to expand main partition but accidentally deleted swap and expanded using that space too

This is a centos 7 vm running on hyperv. Two weeks ago I wanted to increase the root partition space. what I had is: dev/sda1 - boot dev/sda2 - swap dev/sda3 - root By mistake i used fdisk to delete ...
user avatar
-1 votes
1 answer
64 views

Questions about swap [closed]

My PC - I am using Ubuntu 20.04 on my old potato pc to get it working. It has 2GB of RAM and an Intel i5 processor. I know it is really old, but I want to get this working. Problem in detail- I only ...
user avatar
  • 162
0 votes
1 answer
23 views

need RAM & SWAP Memory monitoring Threshold

I wish to setup monitoring alerts upon used memory percentage. I had setup 0-80% used RAM as Green (good) 81-90% as yellow(acceptable) 91-95% as orange(warning) 96+ as Red(critical) However, i see ...
user avatar
  • 297
6 votes
3 answers
1k views

Disabling Swap on Debian Permanently

Every guide presents disabling swap permanently as simply commenting out the corresponding line in /etc/fstab to prevent swap from mounting on reboot; however, that does not work in Debian 11. Example:...
user avatar
0 votes
0 answers
38 views

Whats the safe minimun value of swappiness?

Im looking to make a little faster a system, and I have wonderig if this helps or not, and so whats the min safe level to set it?
user avatar
  • 119
20 votes
9 answers
6k views

When is swap file harmful?

In discussions about swap files ("should I create one?") I often see an obscure mention along the lines "in certain situations swap file can do more harm than good". That comes up ...
user avatar
1 vote
2 answers
349 views

Creating swap when out of memory

Out of memory is a common issue and the official OOM is not efficient. Several other programs have been introduced to do the killing job faster. I wonder why there is no approach to creating swap ...
user avatar
  • 1,663
0 votes
0 answers
34 views

Performance improvement disabling the swap

I have an USB 3 thumb with a Debian testing os and an Arch os installed on it, I'm using it for development of web apps with docker. Maybe is not the best environment, but I'm brave. The partitions ...
user avatar
  • 131
1 vote
1 answer
99 views

Explain Zram and Swap numbers

Ok, so there are really 2 questions here, why is my on disk swap being used? Is the compression of my swap really this good? It seems pretty unlikely, but it's also possible it is because it's memory ...
user avatar
-1 votes
1 answer
96 views

Ubuntu: server is doing nothing, but memory is full

My server is actually on this state: I am executing htop as root, so I'd see everything. Sorting by MEM%, I see al processes under 1%. And this even in tree view). But what does it mean when memory ...
user avatar
  • 541
0 votes
1 answer
295 views

Watchdog message about CPU soft lockup in Fedora

I am running Fedora 34 KDE on my ASUS ZenBook Flip 14 with an Intel 11th Gen i7. It seems like every few minutes, I get this error message: watchdog: BUG: soft lockup - CPU#7 stuck for 22s! [swapper/7:...
user avatar
1 vote
2 answers
73 views

Does swap out of memory pages belonging to a process pauses or stop the process itself?

I have a real-time networking application that is extremely sensitive to any kind of "blocking" and needs to be extremely responsive most of the time with perfect latency. The app (...
user avatar
  • 1,492
0 votes
1 answer
53 views

What parts of a process memory can get swapped?

I'm trying to learn more about the swapping system of the linux kernel. I figured out that if a r/o or a code part of a binary in memory needs to get swapped, it shouldn't be moved to the swap file/...
user avatar
0 votes
1 answer
55 views

Script to display swap utilisation in top command

I need to write the script for displaying swap utilisation in top command, I am able to display top command but next shift+f needed to be included in script can you guys help me here
user avatar
-5 votes
1 answer
54 views

Out of Memory Killer OOM and Swap [duplicate]

Greetings to the service of dear masters and masters I have a question : Thanks for pointing me to a process called Out of Memory Killer in Linux, or OOM for short, how it works and what the processes ...
user avatar
0 votes
0 answers
24 views

Mystery memory accumulating instead of swapping after a program consumes all 16GB available to it in its cgroup

I'm trying to evaluate the memory usage of some software X in a memory-restricted setting. All that's really necessary to know about X for the purposes of this problem is that its memory consumption ...
user avatar
  • 101
0 votes
1 answer
189 views

Swap file management [closed]

What is swap space? Is there a recommended size for the swap space? Are there advantages to using files as swap space instead of disk partitions? How can I get information about my computer's ...
user avatar
1 vote
2 answers
251 views

I deleted my swap partition and ended up with longer boot times and no RESUME file

I am running Ubuntu 20.04, dual-booted with my Win10 on 1TB nvme M.2 SSD with 16GB of RAM. I initially made a 32GB swap partition while installing Ubuntu, but now, I wanted to utilize that space ...
user avatar
0 votes
1 answer
106 views

rEFInd doesn't find Linux after hibernating while updating

Unfortunately my laptop hibernated on low battery while performing an update, during the installation part of the update. On booting up rEFInd shows only Windows and not Manjaro. The update was of ...
user avatar

1
2 3 4 5
13