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.

1388 questions
361
votes
9 answers

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 limit of swap. I hope someone can help me.
Bruno
  • 3,797
  • 3
  • 15
  • 13
213
votes
9 answers

How do I add swap after system installation?

I did not create a swap partition during Ubuntu installation. Later, I freed up some space and made a swap partition. Now after each boot up, I am manually opening gparted to right-click the swap partition to turn on the 'swapon' option. How can I…
user13593
180
votes
8 answers

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 than enough RAM. If RAM consumption gets too high I have no problems with processes being terminated. How do I disable swap? Note: I do not have a…
user4482
109
votes
6 answers

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 current session, because after a reboot swap turns…
Alex Li
  • 1,291
62
votes
3 answers

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 was no swapping. What I did now is swapoff -a and…
One Zero
  • 27,153
  • 26
  • 88
  • 109
30
votes
6 answers

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?
Thomas Johnson
  • 505
  • 1
  • 6
  • 9
22
votes
4 answers

How to decide on Swap size

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 size of RAM. Somebody also told me that it shouldn't be more than 8 GB.If twice the size of RAM is more than 8 GB how…
18
votes
6 answers

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 the mouse. The current suspected culprit is…
Pwnna
  • 499
18
votes
4 answers

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 stated that 60 is good for servers. Exactly why would…
842Mono
  • 9,790
  • 28
  • 90
  • 153
16
votes
4 answers

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 the Swap always says 0 bytes of 0 bytes. I tried…
BentSpace
  • 161
16
votes
2 answers

Why dont changes to the swappiness remain permanent after reboot?

System Ubuntu 14.04 I want to change my swappiness from the default 60 to 10. According to this answer https://askubuntu.com/a/103916/71679 I need to log in as root and edit /proc/sys/vm/swappiness and add or edit to vm.swappiness = 10 When opening…
damien
  • 2,096
16
votes
2 answers

"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 also do sudo swapon -a in a terminal, but that…
geoffrey
  • 2,359
14
votes
4 answers

What should my swap size be if I have 32GB of RAM?

I am new to Linux and want to install ubuntu on a computer that has 32GB of RAM. I've read a lot about the recommended size of swap for people with much smaller RAM capacity, but nothing for my size. Can anyone help me? Thank you, I really…
14
votes
2 answers

Sharing of swap partiton between linux systems?

I have a laptop on which I have installed Ubuntu 12.04 and Windows Now just for learning purposes I am going to install Backtrack OS on it. My laptop has 4 GB of RAM so according to the recommendation I have allocated 8 GB of swap space on my hard…
Null pointer
  • 2,547
  • 5
  • 26
  • 38
12
votes
1 answer

Why can't I enable swap on startup?

I made I swap partition with GParted and it works great, since my computer only has 2 GB of memory. But, every time I boot up, I have to execute sudo swapon /dev/sda1 until it enables. How can I set it up so it enables automatically. I am have only…
SnorriChinchilla
  • 339
  • 1
  • 5
  • 16
1
2 3
8 9