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 ...

learn more… | top users | synonyms

177
votes
1answer
332k views

How do I configure swappiness?

I need a step-by-step, simple and easy way to configure swappiness.
164
votes
19answers
144k views

I have 16GB RAM. Do I need 32GB swap?

I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of ...
129
votes
6answers
150k views

How to empty swap if there is free RAM?

When I open a RAM-intensive app (VirtualBox set at 2GB of RAM), some swap space is generally used, depending on what else I have open at the time. However, when I quit that last application, the 2GB ...
122
votes
5answers
91k views

Why is swap being used even though I have plenty of free RAM?

I thought the whole essence of swap was to act as a temporary storage safety net when RAM was full but my swap partition is constantly being used even though I sometimes have as much as 3GB free RAM. ...
82
votes
7answers
114k views

How do I add a swap partition after system installation?

I did not opt for a swap partition during Ubuntu installation. Later I freed up some space, and made a swap partition. Now after booting up I am manually opening gparted and right-clicking the swap ...
64
votes
5answers
82k views

How to increase swap space?

I have, by default, 250MB of swap space in Ubuntu, and I want to expand it to a larger size. I need 800MB, which I think will be enough to open several applications without having to hit the current ...
43
votes
3answers
43k views

How can I turn off swap permanently?

Swap makes my system all sluggish and turning it off makes everything smoother. I have 3.5 GB of RAM. I know how to turn swap off by entering sudo swapoff -a in the terminal, but that's just for the ...
37
votes
2answers
49k views

Is it safe to turn swap off permanently?

My system was getting slower, especially when I use browsers like Firefox / Chromium and Virtual Machines. I noticed that I've got at least 3.2 GB of free RAM (using Gnome system monitor) and there ...
33
votes
7answers
59k views

How do I disable swap?

I have some sensitive data in ram that i prefer not to be on disk. How do i disable swap? I have more then enough ram. If ram gets too high i have no problems with processes being terminated. How do I ...
31
votes
6answers
37k views

Why most people recommend to reduce swappiness to 10-20?

I have seen in several site which recommend to reduce swappiness to 10-20 for better performance. http://community.linuxmint.com/tutorial/view/998 https://sites.google.com/site/easylinuxtipsproject/...
31
votes
2answers
49k views

What to do about “the disk drive for /dev/mapper/cryptswap1 is not ready yet or not present”?

While booting Ubuntu 12.04, the disk drive for /dev/mapper/cryptswap1 is not ready yet or not present is showing. What is this? Is this is an error?
31
votes
4answers
7k views

Importance of Swap Partition

What is the purpose of a swap partition? How do I know I have just enough swap partition? Not too much/little. My Ubuntu PC is used for typical stuff: Web (email, facebook, etc.) Some movies ...
28
votes
6answers
37k views

How do I use zRam?

I installed zRam as described on webupd8.org. I installed it from the terminal. Is that all I have to do or do I have to do some configuration or something? Does the zram-enabler do everything by ...
27
votes
7answers
12k views

With an SSD, do I need to change my swappiness to increase SSD life?

I encountered this article which includes the following suggestion: Swap and swappiness I kept my swap partition on the old HDD. Swap on the SSD would be faster, but would also shorten the ...
26
votes
7answers
56k views

How do I find out if I have a swap partition on my hard drive?

I used the 12.04 live cd to install Ubuntu over my Windows 7 partition and deleted everything so I just have Ubuntu on my laptop. But since during the installer I chose the simple "erase entire disk" ...
24
votes
5answers
20k views

Swap not working on clean 14.04 install using encrypted home

Update 3: I decided to reinstall the system from scratch to remove any old cruft lying around since I had been experiencing some other issues after the upgrade aswell. Howver, this issue persisted. ...
22
votes
1answer
28k views

Adding a new swap file. How to edit fstab to enable swap after reboot?

I've deleted my existing swap partition due to some partitioning problem. I don't have a swap space now so I've created a swap file with: dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 Here's ...
22
votes
5answers
11k views

Does it make sense to create swap partitions for new installations nowadways?

For a desktop installation in a new and shiny laptop (let's say 16gb ram and ssd hd), does it make sense to have a swap partition?
20
votes
1answer
20k views

zram vs zswap vs zcache Ultimate guide: when to use which one

What the hell are they? how are they different (I've written my understanding in an answer below) In the Zswap system, when a page is evicted from the zswap to the actual swap is it stored in a ...
18
votes
3answers
19k views

Check if partition is encrypted

How do I check if a partition is encrypted? In particular I would like to know how I check if /home and swap is encrypted.
17
votes
6answers
33k views

Do we still need swap partitions on desktop?

I have read this question, but it was asked in the context of servers not desktops or notebooks. If a good amount of RAM is installed on a notebook, say 8 GB, do we still need a swap space?
16
votes
1answer
4k views

boot up problem (14.04 + GRUB + Swap + Nvidia) - with pictures

When I start my laptop, it takes as much as 7 tries to get past the place where the swap gets mounted; if anyone is looking over my shoulder then it becomes 15 tries! My laptop is a lenovo W520 with ...
15
votes
3answers
9k views

Allocate swap after Ubuntu 14.04 LTS installation

I've installed Ubuntu 14.04 LTS about one month ago, I'm dual booting Ubuntu 14.04 LTS and Windows 8.1. I didn't create any swap space while installation but now I really need to add this for Ubunutu....
15
votes
4answers
30k views

Put swap on SSD or HDD?

New installation coming up. 120gb SSD for OS and HOME and 1tb HDD for storage. 16gb of ram which means 16gb of swap if I recall correctly. SSD space is too valuable for a swap partition right? If my ...
15
votes
2answers
6k views

What is the default swap size?

How does the installer calculate what size of swap partition to create? Presumably it's based on installed RAM size, but does that depend on how much RAM?
14
votes
3answers
5k views

Why is the default swappiness 60? What would be the effect if I lower the swappiness value for my desktop PC?

I was reading about swappiness in various forums and I saw some videos. Many stated that it's a good thing for desktop users to decrease the swappiness value below 60 (which is the default). Some ...
14
votes
4answers
15k views

How big should I make my swap partition?

I'm (re)installing Ubuntu on my Toshiba NB100 netbook (Intel Atom, 120GB HD, 2GB RAM). Already have a partition I call "Stuff" with all my media and docs. Will be deleting the one I had Win7 on (...
14
votes
1answer
15k views

How do I setup an encrypted swap file?

When I installed Ubuntu, I setup an encrypted home partition. Now I have come to an issue where I am running out of memory because I haven't setup swap. How can I setup an encrypted swap file? A ...
13
votes
6answers
300 views
+200

How to Increase Ubuntu's Virtual Memory and/or Swap for Matlab?

Situation: fix Out of Memory errors in Ubuntu's Matlab Goal: allocate some virtual memory and/or Swap on external HDD/SSD; the read/write decrease from 20 GBps to 0.1 GBps, which is ok! Therminology: ...
12
votes
7answers
2k views

Is swap area required? Can we install Ubuntu without a swap area? [duplicate]

I bought a new Lenovo B50-80 laptop with 4GB RAM, 500 GB HDD preinstalled with Windows 7 Professional. I would like to install Ubuntu alongside the existing Windows 7. For that when I tried to create ...
12
votes
4answers
17k views

Why no swap partitions on SSD drives?

I often read that one should not place swap partitions on a SSD drive, as this may harm the device. Is this true? Can you please explain the reason to me? Because I otherwise would have thought that ...
12
votes
6answers
4k views

Do we need Swap partition on a LAMP server?

Do we need actually swap partition on the ubuntu-server with LAMP? I think I don't need it, but better to know for sure if it will not cause some unpredicted behaviour. Actually my thoughts were: ...
12
votes
2answers
9k views

Why is kswapd0 running on a computer with no swap?

I have a cloud server with ~14G of RAM and no swap. However, I occasionally see kswapd0 taking up some CPU when I run top. Why would kswapd0 be running at all if there's no swap space for it to manage?...
12
votes
4answers
12k views

Is my Swap (cryptswap) partition working properly?

I have a feeling it's not. I'm running Ubuntu 11.10 on a Toshiba Satellite L305-S5944 Laptop. Says I have 1.8 GiB of Ram (thought I had 2). When I look at the Resources tab in the System Monitor ...
12
votes
3answers
4k views

Does 12.04 support hibernating to a swap file?

I'm about to reinstall Ubuntu on a netbook with a tiny disk. Because of the tiny disk size, I'd strongly prefer to have a swap file than a swap partition. However, I want to be able to hibernate. I ...
11
votes
4answers
29k views

Using usbdrive as ram in ubuntu

In windows it is possible to use usb flash drive as a virtual ram. I wonder if it is possible to do so in ubuntu? If it is, how could one do it? [Edit]: I mean Ready boost equivallent for ubuntu. I ...
11
votes
3answers
2k views

Is the swap partition encrypted?

Selecting the encryption option at install time to encrypt the home partition. Does this enable encryption of the swap partition or is the swap partition unencrypted. If the swap partition is ...
11
votes
2answers
12k views

“Swap not available” - I must manually “swapon” after every reboot

I am on Ubuntu 12.04, Thinkpad Edge 13, encrypted home. A message in the System Monitor tells me that swap is "not available". I can get it back using the swapon option in gparted (I thought I could ...
11
votes
4answers
72k views

How to decide on Swap size [duplicate]

Possible Duplicate: I have 16GB RAM. Do I need 32GB swap? I wanted to just confirm how much the size of Swap partition should be. Lots of places tell that the swap size should be twice the ...
10
votes
2answers
8k views

How can I enable zswap?

Ubuntu 13.10's release notes mention that it includes Linux 3.11, which supports something called zswap: Zswap is a lightweight, write-behind compressed cache for swap pages. It takes pages that ...
10
votes
4answers
14k views

How to permanently enable compressed ram swap? What version to use?

EDIT: In precise there's now zram-config. It's an upstart job compressing up to half of your ram spread over $(number of CPU cores) swap devices. It didn't allways start at boot but issuing sudo ...
10
votes
1answer
9k views

Swap not being detected on 14.04 LTS

I upgraded from 12.04 to 14.04. When I opened my resource monitor, I noticed my swap was not detected. I installed Gparted, opened the program and started to look at my file tree. I noticed that my ...
10
votes
6answers
7k views

Swap shoots to 100% after a couple of hours of usage

For some reason or another, my swap usage will peak to 100% capacity after a couple hours of usage. My interface will then freeze, after which I have to wait 20 minutes time to be able to even move ...
9
votes
3answers
20k views

How to disable cryptswap?

How can I disable cryptswap? I would like an unencrypted swap like before. This is on an ubuntu 9.10 system.
9
votes
4answers
15k views

Is having the 'swap' partition at the 'beginning' better than at the 'end'?

I recently installed Ubuntu 11.04 onto a RAID0(stripe) device using the alternate installation disc and manually partitioned the HDs ext4 and swap partitions; during this process, I was reading in a ...
9
votes
7answers
38k views

System not mounting swap partition

Even though the swap partition exists, and set to load in fstab, it's still not being mounted. fdisk returns this for the swap partition: file system: /dev/sda5 start: 1 end: 244 ...
9
votes
3answers
8k views

Encrypted Swap Partition for 14.04

How can I produce an encrypted Swap Partition for 14.04 ? All the advices I saw here are for versions <14.04 and do not work for me. I tried a lot but nothing lasted longer than a reboot. Is there ...
9
votes
2answers
14k views

how to modify size of swap with a lvm partition?

I'm trying to add/modify a swap partition on my LVM-formatted hard disk by using GParted from a LiveCD. I only see one big partition taking up the whole disk. Is there a hidden swap? Does an ...
8
votes
4answers
10k views

Unsafe swap space detected

So I had a Ubuntu 13.04 installation and I had encrypted my hard drive while I was doing installation. I was playing around and mistakenly deleted all the partitions, now I downloaded lUbuntu 13.10 ...
8
votes
1answer
8k views

How to make a USB stick swap disk?

OK , I know this sounds a bit silly and solid state drives like a USB flash stick are probly the last thing on earth you want to use as a swap disk since they could go bad pretty quick from all the ...