Questions tagged [swap]

Unix systems, and other Unix-like operating systems, use the term "swap" to describe both the act of moving memory pages between RAM and disk, and the region of a disk the pages are stored on. In some of those systems, it is common to use a separate whole partition of a hard disk for swapping. These partitions are called swap partitions.

Filter by
Sorted by
Tagged with
5 votes
2 answers
9k views

Change swap memory size after adding RAM?

I ordered some addon RAM a few days ago to install on my Ubuntu 10.10 stationary computer and while giving it some thought, I remember that I previously did change the SWAP memory file size on a XP ...
Industrial's user avatar
  • 1,698
5 votes
1 answer
954 views

Why swap is touched when zswap is enabled and zswap pool is not full?

current configurations is swappiness = 40; zswap cache = 40 free -m command says total used free shared buff/cache available Mem: 3615 1353 ...
fxrbfg's user avatar
  • 151
5 votes
1 answer
677 views

Is my swap encrypted or not?

I chose to encrypt the home folder while installing Lubuntu 12.10 (64-bit), but after that, sometimes I get error that the system "cannot find /dev/mapper/cryptswap1 wait for mount or cancel at splash ...
Abhijit Navale's user avatar
5 votes
1 answer
4k views

Encrypted partitions (LUKS) with login password + hibernate

on my company laptop I have Windows 11, that has encrypted disk, working hibernate, at I need to provide password just once at log-in. I would like to have same on my personal laptop with Ubuntu. RN I ...
Mlocik97's user avatar
  • 448
5 votes
2 answers
7k views

Hibernate not working in 18.04

When I use the command sudo systemctl hibernate, the system seems to go to hibernation, but when restarted, it is a fresh start without any of the previous windows that were left open. And when I ...
CluelessNoob's user avatar
  • 2,285
5 votes
1 answer
3k views

Ubuntu freezes when compiling software

I have a Xubunut16.04 install with 16GB RAM and a 20GB enrypted Swap. When I start a large compilation with configure make -j in a terminal, I can see in the panel load monitor all cores go to ...
CatMan's user avatar
  • 1,409
5 votes
1 answer
3k views

Why can't I use hybrid-sleep?

In Kubuntu 18.04 I have created a swap space that is operational already, as in the KDE partition manager it has the option "Deactivate swap", which means it is activated. Also, I can see this: $ ...
user avatar
5 votes
1 answer
1k views

swapfile takes a long time to "get cleared"

I have a swap file /swapfile of 1GB size in accordance with the procedure described in the ubuntu swap faq. When doing a RAM intensive task, I use the "System Monitor" to check the load on my Memory ...
S.A.'s user avatar
  • 195
5 votes
1 answer
4k views

Encrypted home partition + encrypted swap + working hibernate

I would like to set up disk encryption on Ubuntu 13.10 such that I have plain / encrypted /home partition encrypted swap partition working hibernation and resume As these requirements suggest, this ...
nh2's user avatar
  • 1,631
5 votes
2 answers
4k views

Without having swap partition how to hibernate using only "SWAP FILE"

I found answer near to this question but not exact answer in Ubuntu-forums.I found answer to How to create swap partition after installing Ubuntu. How to create or add swap file to existing swap ...
learner's user avatar
  • 571
5 votes
1 answer
9k views

Using Hibernation in Ubuntu 19.04 (not enough swap file) [duplicate]

So I'm trying to hibernate my Ubuntu laptop, using sudo systemctl hibernate, in turn it says "Failed to hibernate system via logind: Not enough swap space for hibernation". I already tried this ...
DepChemical's user avatar
5 votes
2 answers
3k views

How to recover data from formatted swap?

I am using Ubuntu 12.04. I have 4 partitions of hard disk. 1st of 43 GB contains Windows 7, 2nd (43 GB) and 3rd (32 GB) contained valuable data and 4th of 42GB contains Ubuntu. Now, while installing ...
n.arrow001's user avatar
5 votes
2 answers
661 views

Swap partition is not recognized

I think this problem might be related to this one: Failing to recover from hibernate Basically, as soon as ive installed ubuntu, using the automatic partitioning, if i run gparted and look at my ...
richzilla's user avatar
  • 12k
5 votes
0 answers
1k views

Why is Ubuntu server 20.04 with vm.swappiness = 0 still swapping where are plenty of free memory?

Background We're running several KVM servers on Ubuntu 16.04 and have started testing the upgrade to 20.04. What we found is that even though we've never seen any swap usage on our 16.04 servers, ...
Stian's user avatar
  • 66
5 votes
0 answers
932 views

Ubuntu 19.10 is using swap aggressively

currently I have allocated 2 GB swap size (RAM size in my machine is 8 GB) tried setting the swappiness value to 10 and right now the value is 1 but still Ubuntu is using swap when the used ram hits ...
himel's user avatar
  • 151
5 votes
0 answers
520 views

Ubuntu 16.04 with no swap freezes when running out of memory

I have an up-to-date 16.04 64bit system with 24GB of memory, configured without swap. Sometimes due to the nature of my work (multiple VirtualBox VMs running, Eclipse running, Firefox and Chrome ...
Tryfon Farmakakis's user avatar
5 votes
0 answers
165 views

Encrypted swap killed my Ubuntu install and a virtualbox debian one at once!

My whole HDD and home dir are encrypted (so it seems to encrypt the swap partition too by default) I accidentaly shutdown the PC by with the power button. The result was that Ubuntu was starting only ...
user240891's user avatar
4 votes
3 answers
12k views

Swap Not available in system monitor

i make a swap partition with 5 GB but i notice always that it is marked as "not available" on the system monitor plus when i do operations consume the whole RAM ubuntu starts to kill to relief the RAM ...
Ahmed Zain El Dein's user avatar
4 votes
2 answers
17k views

Is there a difference between SWAP and Cache memory?

I installed the indicator-multiload 0.2-0ubuntu1 from the software center. (It's very similar to the gnome panel indicator showing memory and CPU graphs) When I click on the Unity panel which shows ...
mloman's user avatar
  • 1,007
4 votes
3 answers
6k views

Swap Full But Memory Available In RAM

I've a AWS ec2 instance running Ubuntu 16.04 with 64 GB RAM and have a swap file configured for 8GB. During a nightly batch process which syncs the backup data from an EBS volume of this instance to a ...
Deb's user avatar
  • 143
4 votes
1 answer
7k views

Why swap file is never used?

Even when memory is fully loaded, the swap file I created is never used. Did I do something wrong ? Output for swapon -s Filename Type Size Used Priority /file.swap ...
pheeln's user avatar
  • 53
4 votes
3 answers
2k views

Do I need a swap partition for every Linux distribution?

To install various Linux distributions on the same physical machine, do I need to add a swap partition for each distribution, or one will suffice for all?
user283280's user avatar
4 votes
1 answer
7k views

make zram use lz4 compression algorithm

Ubuntu 18, trying to make zram to use lz4 compression. Tried modifying /usr/bin/init-zram-swapping file #!/bin/sh ........... ........... for i in $(seq ${NRDEVICES}); do DEVNUMBER=$((i - 1)) ...
Sirajus Salekin's user avatar
4 votes
2 answers
19k views

Changing swappiness in sysctl.conf doesn't work for me

I'm using 12.04 LTS and can sudo sysctl to set swappiness to 10, but adding vm.swappiness=10 to sysctl.conf doesn't work for me - after I reboot, swappiness still reports 60 (default) I'd like to be ...
Graham's user avatar
  • 41
4 votes
2 answers
7k views

How do I add more swap easily so that I can hibernate my laptop? [duplicate]

I installed Natty on my laptop with default options. I guess it created a swap partition equal to the size of my RAM. Every time I try to hibernate I get the "not enough swap" message, which is ...
swrobel's user avatar
  • 338
4 votes
1 answer
3k views

Swappiness on WSL2 gets reset to 60

I recently tried installing Ubuntu on Windows (WSL2). I tried the free command, and few blocks of swap memory were utilized. I thought of reducing the swappiness so I added the entry vm.swappiness=10 ...
Deekshith Anand's user avatar
4 votes
2 answers
18k views

Installing ubuntu in free space of extended partition: "You have not selected any partitions for use as swap space"

Here is a picture of my hdd's partition table : I wish to install Ubuntu in the free space shown in the below picture. However I don't understand how to configure the installation. I chose the ...
Vineet Kaushik's user avatar
4 votes
3 answers
36k views

Do I need a swap partition? [duplicate]

I have 4GB of RAM and I want to install Ubuntu. Do I need a to have a swap partition? Because my computer has 4GB RAM, I do not think it is necessary to have a swap partition. If I do need to have a ...
Bryan Marroquín's user avatar
4 votes
1 answer
2k views

Is SWAP used when suspending a computer

I know that SWAP is used when putting a computer into hibernation. But is SWAP used when the computer is suspended?
mloman's user avatar
  • 1,007
4 votes
2 answers
5k views

How to use a compressed ramdisk (ramzswap)? Huge speed gain

Since I don't use my laptop's CD-drive I want to put a small (8 GB) SSD into the CD-drive slot (I'll use a caddy similar to this one). I want to use compressed btrfs on the SSD and put all the data on ...
turbo's user avatar
  • 4,622
4 votes
1 answer
4k views

disable and remove install created /swapfile

The swap file created during install, when deleted, is recovered after reboot. I did a clean install of Ubuntu 22.04 64-bit Desktop on a Raspberry Pi 4 8 GB using a Kingston 960 GB SSD. Added a swap ...
WaffleHouse2t2's user avatar
4 votes
1 answer
5k views

swap option missing while installing in ubuntu server 14.04 lts

There is no option to select swap partition while installing the server version....I have tried all the possible ways to check the option and not found anything. Is their anyway to enter manually
Pavan Sadhineni's user avatar
4 votes
1 answer
3k views

Enlarge swap partition without disturbing anything!

I'm having a few issues with 12.04 right now when manipulating large image files, which never used to occur when doing the same with 10.04. I noticed when I clean-installed that the swap partition it ...
Mark Whitehead's user avatar
4 votes
3 answers
280 views

swap is only being recognized when trying ubuntu from live CD

I recently increased space and swap space for ubuntu on my laptop. Even though the space got increased, my swap is not being recognized. It is showing as 0 bytes of space. However, interestingly, when ...
Omnipresent's user avatar
4 votes
1 answer
3k views

Can I delete /swapfile after I reassigned new larger swap on other partition?

My swapfile at / was installed long time ago and since I need larger amount of swap now I assigned it on another partition for swap, so I would like to know that if I can delete the older one.
Negrito's user avatar
  • 794
4 votes
2 answers
2k views

Size of swap partition for 4GB ram

I got a notebook with 4GB RAM and i want to create a swap partition with the exact same size, using gparted. gparted has GiB and MiB as units. is the correct amount 4 GiB or 4.295 GiB?
The AntiGuru Max's user avatar
4 votes
1 answer
37k views

Disk doesn't contain a valid partition table - partition table entries are not in disk order

I am in need of some help. I am completely new to linux. I have created and installed a Ubuntu 10.04 server as a virtual machine that is running in a Citrix Xenserver 5.6 Fp1 environment. While I ...
Casey's user avatar
  • 43
4 votes
2 answers
11k views

Damaged swap partition - How and what to do?

I needed GPartEd to format a MicroSD card (don't trust Disk Utility too much as more problems seem to occur with hard drives and memory cards I formatted with it, than with the ones I formatted wth ...
RobinJ's user avatar
  • 8,920
4 votes
1 answer
8k views

Out of memory: Killed process

I got from dmesg Out of memory: Killed process 24502 (python) total-vm:19568804kB, anon-rss:14542148kB, file-rss:4kB, shmem-rss:0kB, UID:1000 pgtables:31232kB oom_score_adj:0 How can I increase the ...
sam's user avatar
  • 1,333
4 votes
2 answers
5k views

Does the blocksize (bs) value in swap settings matter? If yes, is there a command to show current settings about swap block size?

This post gives this command to resize swap sudo dd if=/dev/zero of=/swapfile bs=1G count=8 Does the blocksize (bs) value in swap settings matter? If yes, is there a command to show current settings ...
czlsws's user avatar
  • 233
4 votes
1 answer
344 views

Is it possible to patch without spiking the CPU? [duplicate]

I'm using unattended upgrades to patch about 300 ubuntu (16.04 LTS) machines (network appliances really), some are 1 CPU VMs running on ESXi, azure and AWS and others bare-metal quad core Atom IOT ...
Peter Turner's user avatar
4 votes
2 answers
2k views

How can Ubuntu become unresponsive when OOM without thrashing?

When I use too much RAM on my Ubuntu 18.10, the GUI freezes. It stops reacting to keyboard and mouse and there is nothing to do other than hard reset the computer. I believed that this was because ...
Martin Drozdik's user avatar
4 votes
2 answers
470 views

Incredibly reluctant swapping

A weird problem has appeared on my laptop running Ubuntu 16.04. I have 8 GiB RAM and 10 GiB swap area. It worked fine, programs were swapping fast from the SSD, the swapped memory were mostly memory ...
Dugi's user avatar
  • 1,059
4 votes
1 answer
4k views

zswap: compressor lz4 not available, using default lzo

After configuring zswap and running (for enabling lz4 compression in zswap on the initramfs stage): sudo -s echo lz4 >> /etc/initramfs-tools/modules echo lz4_compress >> /etc/initramfs-...
user avatar
4 votes
2 answers
5k views

Lost Swap Partition

I set up a new Ubuntu Partition a few days ago. Yesterday I installed the Kubuntu-Desktop to replace the Unity thing. Since I installed the new desktop the Linux-Swap partition won't work anymore and ...
Severus15's user avatar
  • 300
4 votes
2 answers
13k views

swapon: /dev/sdb1: swapon failed: Invalid argument

I am unable to mount a swap partition Terminal code: Device Boot Start End Blocks Id System /dev/sdb1 2048 7831551 3914752 82 Linux swap / Solaris root@...
Billy_2lgit_2qt's user avatar
4 votes
1 answer
3k views

Swap F keys to perform functions without Fn key

My laptop has a function key which turns F keys into keys which change volume or brightness. I would like to swap a number of them so that they perform that function under normal operation and are a ...
superbriggs's user avatar
  • 1,307
4 votes
3 answers
5k views

Deleting Unused Swaps Partions

Good evening everyone , I got a little issue with Swap Partitions. Due to some issues after installing Ubuntu first time, I reinstalled it and now I have 3 Swaps. Here is sudo fdisk -l result Disk /...
Nikki Kononov's user avatar
4 votes
1 answer
537 views

Caps lock key swaps back to default after minute or so after I set it with setxkbmap

Im trying to swap caps with control in last ubuntu xfce4 windows manager. I googled alot of variants, and fastest was /usr/bin/setxkbmap -option "ctrl:nocaps" but it auto swapped back after a minute ...
RusAlex's user avatar
  • 289
4 votes
2 answers
6k views

Is it safe to flush the swap space?

I've noticed that my swap space has been at 410 MiB for the past three days. Is that normal, or should I flush it, and if so, how? I've got total 3.69 GiB Ram, and 1.33 GiB swap.
Snxw's user avatar
  • 69

1
3 4
5
6 7
28