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.

learn more… | top users | synonyms (1)

1
vote
0answers
138 views

Creating a sparse (automatically expanding and contracting) swap file with hole-punching support

I have this crazy idea, and want to know the pitfalls of such an approach (or whether it can even work with no deadlocks.. etc). The goal is to create an automatically expanding and contracting ...
0
votes
0answers
94 views

When hibernating : “PM: Swap header not found”

I've already seen Debian hibernate problem PM: Swap header not found, but the difference is that it's not a file swap but actually a swap partition. I'm on Ubuntu 15.10. My swap partition: $ ...
3
votes
0answers
70 views

Can't delete a swap partition, says that it's mounted while swapon says it's not?

I have a swap partition mounted on /dev/sda6 Linux Mint 17.2/Windows 10 dual boot. Am using HP 2000 notebook PC with 4GB RAM. When I installed Linux Mint I created a swap partition which as it happens ...
9
votes
3answers
178 views

Is it possible to impose some kind of soft limit on the memory consumption of processes?

I reckon it's not such an uncommon problem: one process allocates massive amounts of memory (be it due to a memory-leak bug, because you try to process an infeasibly large input file, or whatever). ...
1
vote
0answers
41 views

Restoring in-memory/swapped page state on resume from hibernation

I'm a big fan of Linux's hibernation support, which works extremely well on all the (admittedly slightly older) hardware I've tried it on. I highly prefer it to full shutdown and power up. There's ...
3
votes
2answers
97 views

What is happening with the Linux swap partition data when running Windows via dual-boot

Hmm, I would like to know what is happening with the data on the Linux swap partition when the Linux system is turned off and by the next start the Windows operating system via GRUB2 will start. 3 ...
4
votes
2answers
62 views

Why can I only have a limited number of swap files

This is a theoretical question. Why can I only have 29 Swap files/partitions? If I wanted to generate 10k 1MB swap file and swap them on, it fails at the 30 swap file with swapon: /tmp/swap29: ...
4
votes
1answer
155 views

How can I create a swap file?

How can I create a swap file on a Linux system? I know how to create and use a swap partition but can I also use a file instead?
1
vote
1answer
28 views

What happens if my RAID fails while the swap is on it?

Today I removed swap from the system drive on my Debian. And created a swapfile on md0. So, I have a RAID1 array for data and a swapfile (the only swapfile). The system with boot partition is on ...
0
votes
0answers
131 views

Change percentage of time swap space is used

A question was proposed to me in an interesting format. I was asked "How would I set swap space to be used 50% of the time?" I know how to set the swapiness value in a range from 0-100 in /etc/sysctl....
6
votes
1answer
288 views

How safe is it to increase tmpfs to more than physical memory?

My server has 2GB RAM and 120GB SSD, plus some RAID arrays for storage. OS is Debian 8 (Linux 3.16). I have a MySQL intense application that has tmpdir = /run/mysqld, which is a tmpfs configured by ...
3
votes
1answer
51 views

Is it necessary to encrypt a swap * file * if it will reside on an encrypted root filesytem?

I'm running Linux on my Laptop and wish to protect my data in case the machine is lost or stolen. I've configured an encrypted ArchLinux environment and have everything working the way that I want. ...
2
votes
1answer
25 views

Linux as 3rd boot OS

I would like to install another linux kali beside my linux mint and win10. My question is, do I need make 3 partition again for installation, /root /home and swap od I don't need swap because I ...
4
votes
2answers
491 views

Resize XFS home directory in LVM

I am desperately trying to increase the swap space available to my server from 4GB to 16GB, however at present XFS + something is making this impossible. I have a single SSD hosting the OS (CentOS 7),...
1
vote
1answer
128 views

Page cache elimination in Linux kernel

Optimizing the page cache space for less memory utilization in some system where systems don't have swap space and external flash drive or hard disk. Is there any possibility that if we can remove or ...
7
votes
1answer
2k views

How do I increase the maximum swap space on Mac OS X? [closed]

On Mac OS X Yosemite 10.10.5, when I try to run a calculation that needs to allocate and use 128 GB of memory (it is a command line program written in C), the kernel kills my process with extreme ...
3
votes
1answer
68 views

Expand the size of swap partition

I did some partition size expansions of my centOs system and recover boot loader and file system successfully.I also changed the location and expanded the swap (5GB to 8GB) partition along with above ...
1
vote
2answers
92 views

Fixing fstab after reformatting swap

I just made a small mistake and reformatted my swap partition. It's still formatted as a swap partition - I was fortunate not to touch anything more important. However, I notice that the uuid has ...
1
vote
2answers
215 views

On page fault, how does Unix determine if the faulting address is in swap space?

When a page fault occurs for a virtual address for any process how does the linux/unix operating system determine whether that page (of that virtual address) was swapped previously present in memory ...
1
vote
1answer
57 views

Cached Memory but swap is being used [duplicate]

I've got a VM with 16gb of memory and recently it's been using some of the swap space. At first I thought this was because it was using all the memory but then I read some articles about the Cached ...
3
votes
1answer
103 views

How does mkswap work? What is in the swap header it creates?

I am looking at mkswap and trying to understand how exactly it works. From what I understand, it sets up Swap space on a partition by creating a swap header. How large is this swap header? Is it one ...
1
vote
1answer
705 views

Is it safe to delete all swap partitions?

More explicitly: If it safe to shutdown a system, boot from a live cd, delete all disk swap partitions, and boot the system? This is in follow up to How to safely turn off swap permanently? (on ...
1
vote
1answer
166 views

How low can I go on RAM?

I have some old PCs runnning on my business. And by old I mean PENTIUM-3 800 MHZ and AMD DURON 950 MHZ, with 256MB RAM. They are running my business software today on Windows XP. I want to run Linux ...
4
votes
1answer
324 views

Permanent swapping with lots of free memory

We have a Linux server running Debian 4.0.5 (Kernel 4.0.0-2) with 32G RAM installed and 16G Swap configured. The system uses lxc containers for compartmentalisation, but that shouldn't matter here. ...
22
votes
6answers
8k views

How to safely turn off swap permanently? (on Debian Jessie)

I fresh installed Debian Jessie with default partitioning on an SSD drive. My current disk partitions look like this: As I have 16GB RAM, I think I don't need swap. On Windows, I had it turned off ...
5
votes
2answers
949 views

Is clearing a full swap necessary / wise?

We have a linux machine, in which the swap partition gets filled to the limit from time to time. There's still enough of RAM free, so there should be no risk of running out of memory. The usual course ...
3
votes
1answer
43 views

How to prevent swapping on Mac OS X?

I am inclined to run Tails through a virtual machine so that I could chain two VPNs. One running through the host Mac osx and one more running from inside the virtual machine that's running Tails. ...
2
votes
1answer
103 views

Zeroing out FreeBSD swap space?

I'd like to zero-fill the partitions/slices in my FreeBSD VMs in order to provide for better compression for archival. For those partitions/slices with file systems the process is no problem for me to ...
3
votes
4answers
1k views

8G RAM and SSD - how big should the swap be?

I have a computer with 8G RAM and a 128G SSD. I don't plan hibernating. What swap size would you recommend? Would you change any swappiness? In the nearest future I'll compile programs (or even ...
1
vote
1answer
32 views

Old Xen Installation Unable to be Formatted

I recently tried to format a disk that had an old Ubuntu 14.04 partition and a Xen Swap Disk partition. I am currently running the Ubuntu Live CD and trying to access my partitions on the drive for ...
3
votes
3answers
645 views

Linux, SSD and swap

This article suggests not to create a swap space on an SSD drive in order to reduce its wear. On the other hand, it suggested here that swap space positively affects performance. Would it be a better ...
1
vote
2answers
286 views

Is there way to force Linux to unswap when there is low CPU usage?

After working more than 1 day on my machine swap becomes about 1GB. Some of my panel plugins go to swap so they become laggy. Moreover system doesn't unswap until I make it to do it swapoff -all;...
0
votes
1answer
115 views

How to create Swap from already created mount points

I have prepared a CentOS 6.5 with all mount points at formatting time, including swap. Now, when I am trying to run command swapon, it shows 0 0 0. And when I am trying to create it again using mkswap,...
4
votes
0answers
77 views

FreeBSD shared swap partition with Linux

What must I do, to run these commands before Arch Linux calls swapon -a? mkswap /dev/sdaX swapon /dev/sdaX Just in case it matters, /dev/sdaX was created in FreeBSD 10.1 environment, as soon as ...
0
votes
1answer
78 views

Linux Swap Space

I have 32GB memory. SSD and NonSSD drives. I installed Linux to NonSSD drive but I prefer SSD for /var directory and I didn't create swap space because there is high memory. I know physical memory +...
4
votes
2answers
249 views

Swap on tmpfs (Obviously a bad idea, but is it possible?)

This question originated with a joke between co-workers about increasing performance by moving swap partitions to a tmpfs. Clearly even if this is possible, it's not a good idea. All I want to know is,...
0
votes
1answer
176 views

How to calculate Swap warning/critical dynamically through script?

I have used SAR in my below script and is trying to run on individual servers for my nagios monitoring. Can someone please suggest how i can get the swap warning and swap critical values in my check ...
4
votes
1answer
126 views

Encrypted filesystems with swap partitions

A common error that happens with Ubuntu, though not Ubuntu in particular is the options of being able to encrypt the file system at installation time which creates an encrypted swap partition with ...
2
votes
1answer
101 views

Swap suddenly vanished from Debian?

Everything has been going fine for 6 months now until my swap suddenly vanished today. Now that I look into it, I find that my disk partitioning is a bit weird. What happened to it, and what should I ...
1
vote
0answers
97 views

What is kswapd_low_wmark_hit_quickly from /proc/vmstat

What does this parameter mean? # cat /proc/vmstat | grep low kswapd_low_wmark_hit_quickly 2
2
votes
1answer
80 views

swapon command is not listing the lvm name

I am facing issues with swapon -s command. It is displaying some other filename instead of my lvm name which i have given ( swap is LVM partition ) swapon -s command is not listing my LVM Name for my ...
0
votes
1answer
765 views

Why and how is swap improving performance, and can I disable it? [closed]

I have a laptop with 8GB of RAM running 4.0.4-2-ARCH. Recently, I installed Android Studio, and bam, my normally pristine system was suddenly stuttering and all out freezing (more than once). Before ...
1
vote
1answer
134 views

How to add 100MB of swap space as a logical volume in CentOS?

I need to add 100MB of swap space to my machine. I was trying to use a logical volume. # lvcreate –name lv_swap2 –size 100M vg # mkswap /dev/vg/lv_swap2 # swapon /dev/vg/lv_swap2 # vi /etc/fstab /dev/...
3
votes
1answer
196 views

Linux doesn't drop FS Caches. Instead Memory starts Swapping

I'm quite confused about this behaviour of linux memory caching. total used free shared buffers cached Mem: 15953 14188 1765 64 ...
3
votes
1answer
353 views

What happens when a tmpfs volume is full and swap is full? Is Linux's OOM-killer involved? [duplicate]

I understand that if a persistent / disk-based volume is full, files need to be explicitly deleted to free up space before more can be added. Further, I understand that if memory is exhausted, the ...
10
votes
1answer
983 views

What sets the size of tmpfs? What happens when its full?

What sets the size of the tmpfs? (On my machine it resides in /dev/shm) I can see its entry in /etc/fstab, but no notation of its size. When checking with df -h, it seems to be half the size of the ...
11
votes
2answers
260 views

how to check what is in swap?

On my system i have some amount of swap used: undefine@uml:~$ free total used free shared buffers cached Mem: 16109684 15848264 261420 633496 ...
1
vote
1answer
110 views

SWAP write protection on SSD

When using SWAP on an SSD, does the filesystem offer any write-cycle protection? i.e. randomizing or otherwise managing writes to avoid "flash wear-out" since modern SSDs are generally rated in the ...
3
votes
0answers
40 views

Which parts of Memory can Swap Support

For this question, "swap" does not include RAM and only refers to the configured space on the disk. According to, http://www.ualberta.ca/CNS/RESEARCH/LinuxClusters/mem.html, a program's memory usage ...
3
votes
1answer
100 views

Can swap space accomodate single process?

From what I understand, the swap space can be used to swap out inactive processes to free up memory. But can a single process take advantage of swap space? For example, if my system has little memory, ...