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
0answers
34 views

Hibernate to separate partition or file from system swap to prevent failure

Having done a fair bit of reading and searching for this I don't believe what I am hoping for is possible, but wondered if anyone knows differently. The issue is my laptop keeps failing to hibernate ...
2
votes
0answers
21 views

“Preempting” less-used pages in high priority swap to lower priority swap

Let's say I've got two swap partitions on my Linux machine. One is zram and a higher priority. The other is on disk and a lower priority. I prefer the zram swap because it's faster. As I understand it,...
-1
votes
1answer
49 views

rhel + why swap memory isn't exploited

we have rhel servers with version 7.6 we configured the swap and we can see the swap size from the following free -g total used free shared buff/cache available ...
0
votes
0answers
11 views

Testing swap partition on OpenVZ vps

I am attempting to confirm swap usage on an OpenVZ vps. (I have had issues with badly configured swap files before) To do so I am slowly filling the memory using code from this question How to test ...
-1
votes
1answer
34 views

rhel + adding swap memory without reboot

we do the following procedure in order to add swap memory on rhel 7.x machine so before the swap additional memory we have : free -g total used free shared buff/cache ...
2
votes
1answer
22 views

Where can I find options used for swap devices?

When adding swap space for paging there are options other than priority (pri=). For example discard. However I could not find where to read back those options. /proc/swaps just has a priority column, ...
-4
votes
1answer
45 views

What is swap priority and why does it matter

While seeing the manual for swapon command the priorty option is described as -p, --priority priority Specify the priority of the swap device. priority is a value ...
1
vote
0answers
33 views

Linux increase swap partition failed

First I fdisk -l check disk usage Then check swap file, find /dev/dm-1 is my swap path I know I can increase swap by adding swap file, but I was wondering if I can do it by revising the default path ...
1
vote
0answers
27 views

Swap file with Btrfs and multiple device

System specs: # btrfs filesystem show Label: none uuid: 3899c47c-19e8-4db3-aac9-.... Total devices 2 FS bytes used 2.00TiB devid 1 size 931.42GiB used 690.01GiB path /dev/nvme1n1p2 ...
1
vote
2answers
45 views

High IO rate when the system out of RAM

I found that when the system goes out of memory, the disk IO usage will be very high. It seems many processes are reading from hard disk frantically (check htop output below). When I kill a process ...
0
votes
1answer
21 views

Differences between swap part in top command vs swap -l command

I have a system running with 256Gb RAM. My swap space is getting exhausted due to some process. So as a diagnostics, we put a crontab to monitor the usage and space. This is where I am confused. The ...
0
votes
0answers
40 views

Ubuntu 20.04.01, full disk encryption, btrfs, & hibernation?

I am trying to install *20.04.01 on my desktop with full (or almost full as Tj puts it) disk encryption including encrypted swap partition that allows hibernation, and btrfs. The last few years I am ...
0
votes
1answer
102 views

Swap partition vs swap file in ubuntu [closed]

I am a new linux user switched from windows 10. I have installed ubuntu 20.04.1 lts. I have swap file available in my system. Is it better to use swap partition instead of swap file? Thanks in advance!...
0
votes
1answer
40 views

High RAM and swap usage out of seemingly nowhere

(Manjaro 20, Linux 5.8.3, KDE, this laptop) When reasonably much is going on in my system, the RAM and swap usage often goes much higher than it should. For example currently I have a VM with a VM in ...
0
votes
2answers
42 views

How can I increase the size of an encrypted swap partition when the root partition already takes up all free space?

My laptop is getting kinda slow, especially when having Firefox opened with multiple tabs, which is why I'm trying different ways to make it a little snappier. It has an Intel Core 2 Duo T5600, 2 GB ...
0
votes
0answers
25 views

Will hibernation to swap partition automatically fall back to swap file when swap is smaller than RAM?

I'd like to understand how the hibernation process works in Linux, with regards to memory size and swap. Is hibernation limited to swap partition size? What does it do when RAM doesn't fit? Consider ...
28
votes
3answers
4k views

Is the “page-to-disk” feature Linus talks about in his autobiography essentially the concept of swapping we use today?

In his autobiography, Just for Fun, Linus mentions the "page-to-disk" feature that was pivotal in making Linux a worthy competitor to Minix and other UNIX clones of the day: I remember that,...
0
votes
1answer
249 views

Swap issue and “read swap header failed” for /swapfile

My Swap memory shows SWAP critical 0% free on NMS. I tried: `$ swapon --show` but nothing showed up. I went on to do: $ free -m total used free shared buff/cache ...
4
votes
0answers
2k views

Guide on how to enable hibernation on Linux Mint 20 Cinnamon (Ubuntu 20) and prevent unwanted wakeups

UPDATE: I have encountered some inconsistencies with my script in section 4 that is meant to be executed on every wake-up. Turns out, /proc/acpi/wakeup settings are only reset sometimes. Not on every ...
3
votes
3answers
51 views

Does page swapping happen when the main memory is still available?

I just stumbled upon a random question that goes like, does the Linux kernel swap out any memory pages even when there are still some available memory spaces? I thought it does not in principle, but ...
0
votes
0answers
106 views

Automatic swapping with sytemd on Manjaro broken

I'm running Manjaro on a fairly old desktop system & my memory usage differs greatly depending on what I'm doing. Therefore, I want to use systemd to automatically allocate swap space in files as ...
1
vote
2answers
1k views

Swapfile Swapon invalid argument

I had swap from a swapfile working for quite some time, but for some reason it stopped working. sudo fallocate -l 4G /home/.swap/swapfile sudo chmod 600 /home/.swap/swapfile sudo mkswap /home/.swap/...
12
votes
1answer
795 views

Out of memory, but swap available

My server runs out of memory even though there is swap available. Why? I can reproduce it this way: eat_20GB_RAM() { perl -e '$a="c"x10000000000;print "OK\n";sleep 10000'; } ...
0
votes
1answer
16 views

Centos 6 wouldn't swap

I'm almost out of the ram, was hoping to swap ram kicks in, but it doesn't do anything. CentOS release 6.10 (Final) root@auth33:~# free -m total used free shared ...
1
vote
2answers
35 views

Low size on home directory

Well I created a directory in the home directory in order to copy some books from my hard drive, and I found that there wasn't enough space on the home directory. As you can see below, I have got 377G ...
0
votes
2answers
871 views

Ubuntu 20.04 installation created a swapfile instead of swap partition. Is it normal?

Recently, I clean-installed Ubuntu 20.04, with minimal installation option. Now, when I check my swap space using the command swapon -s, I get the following output: Filename Type Size Used ...
0
votes
1answer
77 views

Python consume too much SWAP

Please take a look on output of command lsof -p PID where PID is python process. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME python 1459 root cwd DIR 253,...
0
votes
1answer
33 views

Page table content when the physical page we are looking for is in swap area

If this question depends on the linux distribution, please answer it in a "general way" (i.e. the most common implementation on linux distributions). In the page table of a process we can ...
0
votes
4answers
91 views

Reduce swap memory size and increase RAM access?

I'm on an Arch Linux machine running KDE Plasma desktop environment. I have 16GB of physical RAM installed in my machine. I had 8GB swap memory and apparently have access to 8GB of RAM. I wanted to ...
1
vote
2answers
528 views

How to increase swap space on Ubuntu 20.04 ZFS?

I have recently installed Ubuntu 20.04 with ZFS as the file system. I check my RAM / swap and it is as follows: qallaf89@desktop:~$ free -h total used free shared ...
2
votes
1answer
39 views

Why is my computer using a lot of swap memory?

My computer has been freezing quite a few times over the last few months. I was initially using Ubuntu 18.04. I then upgraded to Ubuntu 19.04 and now I am finally on Ubuntu 20.04. And slowly it has ...
0
votes
0answers
43 views

Encrypting swap partition

So I've recently struggled with encrypting both / and /home partitions with LUKS, without using LVM while installing Arch Linux. The goal was simple - unlock with only one passphrase, without the need ...
0
votes
1answer
35 views

What determines the number of kswapd:s?

On this system there are only 8 kswapds: top - 00:10:37 up 3:18, 5 users, load average: 60.96, 61.95, 58.34 Tasks: 4318 total, 47 running, 2433 sleeping, 1836 stopped, 2 zombie %Cpu(s): 0.2 us,...
0
votes
1answer
25 views

ERROR: could not insert 'slram'

I am running a laptop with 4 GB RAM + 4 GiB ZRAM, but it also does have integrated graphics: $ lspci -vvv | ruby -e 'puts STDIN.read.split(/\n\b/)[1]' 00:02.0 VGA compatible controller: Intel ...
3
votes
2answers
206 views

Swap and SSD linux

I'm about to install Linux in an SSD and I have doubts about how much swap space I should allocate. I have a 1TB SSD drive and 16GB of RAM. I'm not sure if I even need to allocate space for the swap ...
4
votes
1answer
143 views

swap is high inspite configuration is swappiness=1

we have moon server - version rhel 7.5 the behavior of consuming swap on this server is very strange we configured the /proc/sys/vm/swappiness to 1 and restart the server but we can see that server ...
3
votes
0answers
56 views

Swap grows slowly with 80% available memory

This has few views - so let me try with a tl;dr Is my claim that there should be plenty of free memory correct? Or am I misinterpreting Meaning of the buffers/cache line in the output of free? Can ...
2
votes
0answers
73 views

How to check actual RAM usage of tmpfs?

I know that tmpfs falls back to using swap if system is under memory pressure. I can query total tmpfs usage in KiB with df | grep tmpfs | awk 'BEGIN{sum=0} {sum = sum + $3} END{print sum}' but how ...
0
votes
0answers
44 views

why swapoff -a && swapon -a not help to Decrease the used swap in the linux machine [duplicate]

on the rhel version 7.5 the used swap is 12G we change the swappiness from 10 to 1 echo 1 > /proc/sys/vm/swappiness sysctl -w vm.swappiness=1 echo "vm.swappiness = 1" >> /etc/sysctl.conf ...
0
votes
0answers
24 views

is it possible to reconfigure the vm.swappiness on the fly? [duplicate]

we have the following kernel settings: sysctl -p fs.file-max = 400000 vm.swappiness = 10 vm.vfs_cache_pressure = 50 net.core.somaxconn = 1024 and the Used swap is: now we want to decrease the vm....
4
votes
2answers
79 views

Linux: Swap out in bigger chunks

My swapdisk can write 100 MB/s. When the system swaps out it only writes 8-20 MB/s. iostat says the device is 100% active, so I have the feeling that Linux is seeking on the drive or swapping out ...
2
votes
2answers
61 views

32GB RAM + 16GB Swap?

I just upgraded my RAM in my Acer Aspire TC-885-ACCFLi5 from 16GB to 32GB. I have 2x1TB SSDs and 1x2TB HDD. I dual-boot between an Arch-based and a Debian-based distros. I use one of my SSDs for my /...
1
vote
1answer
54 views

Can We save files in RAM?

So i noticed how linux sometimes uses swap memory (located in internal HDD / SSD). When ram is overloaded PC stores some ram data in swap to make things faster it guess. So if you can store ram ...
3
votes
0answers
56 views

Has Linux abandoned hibernation ? How to improve thawing process?

Is anybody trying to use hibernation under Linux (with a HDD), or am I the only one ? Is anybody satisfied with how it works, or am I the only one where thawing takes 20 to 30 minutes before the ...
0
votes
0answers
11 views

Setting a threshold on the resident memory used by a particular process or cgroup (no swapping below)

Under Linux with systemd, I would like to require a threshold on the resident memory used by a particular process or cgroup, i.e. prevent swapping below this threshold. The problem is the following ...
0
votes
0answers
204 views

Centos Stucked at “Assuming drive cache : write through” after running incorrect swap file

Centos system got stuck, how do i reset to normal dd if=/dev/zero of=/swapfile1 bs=65536 count=1024 Have run above command to create a swap file with sudo privilege, as I have entered the command ...
1
vote
1answer
50 views

Linux swap space usage not freed

i received alerts on one of my systems (RHEL6) saying that it had a high swap space usage. after looking at the VM, i can indeed see that the swap is fully utilized, while we have more than enough ...
0
votes
0answers
22 views

Issues Resuming from Suspend

I'm running KDE Neon 5.18 User Edition, but I came here because I suspect this is a more general problem than the particular distro. The issue is that I cannot resume from suspend whatsoever. ...
0
votes
0answers
21 views

Issue Resuming from Suspend on KDE Neon

I'm running KDE Neon 5.18 User Edition, but I came here because I suspect this is a more general problem. The issue is that I cannot resume from suspend whatsoever. Regardless of the circumstances, I ...
6
votes
2answers
639 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 ...

1
2 3 4 5
12