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 ...
74
votes
17answers
24k 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 ...
29
votes
5answers
7k 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. ...
24
votes
1answer
28k views
19
votes
4answers
2k 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
...
18
votes
8answers
9k views
How to empty swap if there is free RAM?
When I open a RAM-intensive app (VirtualBox set at 2 Gb 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 2 Gb ...
17
votes
4answers
16k views
Adding 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 ...
12
votes
4answers
4k 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 ...
11
votes
2answers
3k 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?
11
votes
3answers
1k 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 ...
10
votes
3answers
1k 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 ...
9
votes
4answers
1k 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:
...
8
votes
2answers
9k 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 ...
8
votes
3answers
5k 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 ...
8
votes
6answers
1k 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 ...
7
votes
1answer
9k views
How to increase SWAP space in Ubuntu?
I have by default a 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 ...
7
votes
2answers
402 views
Is it safe to resize my swap partition on a production system?
I have a laptop with 4GB RAM, but when I first set it up, I had no plans to hibernate so I gave it 2GB swap. I don't want to use a swap file, so is it safe to resize the swap partition (and of course ...
7
votes
2answers
270 views
Swap, Swapiness and Standby: swapping starts when waking up
I'm running Ubuntu 12.04 on a Lenovo W500 (Core2Duo T9400, 4GB Ram)
Current kernel: 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:33:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux -- but the problems ...
6
votes
2answers
3k 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
...
6
votes
5answers
5k 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 ...
6
votes
2answers
329 views
How to configure how much RAM usage should to start swapping on Ubuntu
I always notice that Ubuntu start using swap, as soon as the RAM usage is around 60-70%.
How to configure it so it should wait so RAM usage became 80-90%.
And is there a way to empty the swap, as soon ...
6
votes
1answer
160 views
Why is swappiness=10 recommended?
A value of swappiness=10 is recommended in Ubuntu's SwapFaq.
Why is a value of 10 is recommended rather than swappiness=0?
Are there any pros of 10 or cons of zero?
5
votes
4answers
2k views
While installing Ubuntu, It asked me to allocate something called Swap Space, What exactly is it?
While installing Ubuntu, It asked me to allocate something called Swap Space, What exactly is it? What would happen if i dont allocate it?/ What is the use if i did allocate?
5
votes
1answer
583 views
what is SWAP and how large a swap partition should I create?
I have a system with 4gb of RAM and Intel i5 processor. I want to know how much memory I should allocate to SWAP. Will allocating more memory help increase the system performance.
In the past i have ...
5
votes
3answers
6k views
How do increase the swap size of my Wubi installation?
I have installed Ubuntu using the Wubi installer. So I have the default swap size of only 256MB. I have 1GB of RAM, so many times the system stars crying demanding more swap. I have read the Swap FAQ, ...
5
votes
2answers
3k views
Hibernate to a swap file
I have configured a new Ubuntu 10.10 installation in a Notebook to use a swap file, instead of using a swap partition. For default is not possible to get Ubuntu to hibernate using a swap file, so i ...
5
votes
1answer
701 views
Disk '______' doesn't contain a valid partition table
Having recently run through EnableHibernateWithEncryptedSwap, I now get 3 separate 'Disk doesn't contain a valid partition table' when I run sudo fdisk -l:
Disk /dev/mapper/ubuntu--t10194-root ...
4
votes
3answers
5k views
How to delete a second swap partition safely?
First of all I've tried to install Ubuntu , but something went wrong and the installation was interrupted.
Then I tried to install again , and it was installed successfully.
And there was another ...
4
votes
4answers
3k 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 ...
4
votes
3answers
6k 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.
4
votes
2answers
399 views
Why does ubuntu use swap when there is enough free memory? [duplicate]
While running Virtual Box my system is accessing the hard drive a lot and running slowly.
When I checked system resources using System Monitor it shows processor usage at 15%, RAM usage at 65% and ...
4
votes
1answer
2k 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 ...
4
votes
2answers
1k 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 ...
4
votes
1answer
784 views
How do I restore a swap partition I accidentally deleted?
I accidentally deleted my swap partition via gparted.
(I'm still logged in the system so restoring should be easier) Can someone help me please? I'm not sure how to configure it because the Ubuntu ...
4
votes
2answers
201 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 ...
4
votes
2answers
4k 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 ...
4
votes
2answers
2k 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 ...
4
votes
6answers
13k views
System not mounting swap partition
This is my first time using Ubuntu (Natty 11.04), and I'm having a problem. Even though the swap partition exists, and set to load in fstab, it's still not being mounted.
fdisk returns this for the ...
4
votes
2answers
1k views
Ubuntu sometimes starts swapping like crazy for no reason
Every once in a while, my Ubuntu starts using the hard disk like crazy, and for 3 minutes I can't move the mouse nor access any console, even CTRL-ALT-BACKSPACE and CTRL-ALT-F1 do nothing.
It is ...
4
votes
1answer
466 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 ...
4
votes
2answers
342 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 ...
4
votes
1answer
1k views
How large of a swap partition is needed to hibernate?
I've read this question, but it doesn't definitively answer my question.
If I want my computer to be able to hibernate, do I need to have a swap partition as large as my RAM, or will Ubuntu wisely be ...
4
votes
1answer
2k views
How do I get Ubuntu 12.04 to recognize swap partition so that I can hibernate?
I just installed Ubuntu 12.04 and used gparted to erase and enlarge my swap partition. When I rebooted, gparted said that the file partition for the swap was unknown. Gparted doesn't let me change ...
3
votes
2answers
3k 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.
3
votes
3answers
1k views
How to find text and replace that line if exists with terminal otherwise just append line to end
I want to put in sudo gedit /etc/sysctl.conf the one line vm.swappiness=10 which I sometimes change.
By default this line doesnt exist so I use echo "vm.swappiness=10" | sudo tee -a /etc/sysctl.conf.
...
3
votes
4answers
5k views
How do I add more swap easily so that I can hibernate my laptop?
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 ...
3
votes
5answers
2k 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" ...
3
votes
2answers
892 views
How do I create a swap partition for hibernation?
While installing Ubuntu 11.10 a months ago I had not allotted any swap space, I now came to know that there would be no Hibernate option without Swap space.
Is it possible to do it Now?, What if the ...
3
votes
2answers
5k views
Why can't I mount a swap partition?
When I try to sudo swapon -a i get this message:
swapon: /dev/sdb4: read swap header failed: Invalid argument
sdb4 is where my swap partition is.
sudo blkid gives back this:
/dev/sdb1: ...
3
votes
2answers
3k 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 ...
3
votes
1answer
1k 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 ...
