Swap space is a virtual memory of RAM. It is used when the amount of RAM is full. Swap space can be a dedicated swap partition, a swap file, or a combination of swap partitions and swap files.

learn more… | top users | synonyms

4
votes
3answers
4k views

Reserve RAM for cache and buffer

I usually run many programs and virtual machines on my desktop. The CPU isn't the bottleneck but the memory. (Buying more memory isn't a solution because it's not my own computer.) I started ...
4
votes
1answer
1k views

Unnecessary Swapping in Linux

It seems that sometimes, my computer will start swapping unnecessarily (memory usuage is ~25%), and I can't figure out why. It seems to happen most often when running Perl scripts, but these aren't ...
4
votes
2answers
1k views

how to configure Linux to call oom_kill on its own

I do not want my computer to swap data to disk. I have no swap partition: $ free total used free shared buffers cached Mem: 3841912 3670012 171900 ...
4
votes
2answers
458 views

Bringing pages for a particular process out of swap

I'd like to know if it's possible to bring pages from a particular process into main memory, or to set parameters for a given process, or class of process so that it will not be swapped out.
4
votes
1answer
377 views

Is there a way to exclude a specific drive vdi from “snapshots” in VirtualBox?

...or is there another space-efficient way of dealing with the page/swap file of the Guest O/S? I've realised that its quite possible/likely that one of the things which "bloats" the snapshot/diff ...
4
votes
2answers
92 views

How to load entire program from pagefile quickly?

Sometimes I do not use some programs with high memory usage (e.g. virtual machine with 2 GB of memory) for several days. When I return to it, its memory is mostly swapped onto HDD. When I try to work ...
4
votes
1answer
172 views

What happens when you try to hibernate but there is not enough swap available?

I have a Linux box with a swap partition of size RAM + x. Suppose more than x of the swap is already in use. Now I try to hibernate. Will the kernel randomly kill sleeping and/or not sleeping ...
4
votes
1answer
1k views

How to tell Linux to explicitly swap out main memory of a suspended process?

I run a memory-hungry process (mkcromfs) which consumes more memory than I have physical memory on my latop, so it is paging and swappin and thrashing all the time and loadavg is about 2 (compcache is ...
4
votes
1answer
278 views

swap rule 1.5 *memory= swap still valid [duplicate]

Possible Duplicate: Why should the size of the swap partition be double of the RAM size? Does the rule of 1.5 *memory= swap still apply in these days where systems can have32 GB of memory. ...
3
votes
6answers
8k views

Linux: don't create swap partition?

I was wondering since I heard that swap is used when you're out or RAM and and swapping too much is bad, since I have a lot of RAM ( 8GB ).... what if I dont create a swap partition? Also, do I need ...
3
votes
2answers
4k views

Using SSD as Linux RAM

I have a very very fast SSD OCZ Revo. I want to use a lot of RAM but I'm limited to 4GB RAM for the moment. If I use my SSD OCZ Revo as swap (the whole of it, 160GB), does that mean I have effectively ...
3
votes
1answer
2k views

Windows 8 pagefile on usb FLASH

Not duplicate :) Windows 8 hides usb flash drives in the list of virtual memory drive list. The picture taken when I installed 2 usb flash drives but they are not in the list. Any body knows the ...
3
votes
1answer
191 views

Where is terminal scroll back information stored (how does tmpfs work)?

While trying to test something unconnected, I launched an infinite loop on my terminator terminal emulator which printed a lot of data to STDOUT. After running it for a few minutes, I noticed that my ...
3
votes
2answers
362 views

More RAM than motherboard supports using ram disk + swap?

I want to put 6GB of RAM in a motherboard that supports 4. I heard something about using the excess RAM as a RAM disk and formatting that partition as SWAP, but that doesn't seen like it will work. I ...
3
votes
1answer
3k views

controling tmpfs memory usage

Any way to limit the amount of RAM used by tmpfs wihtout limiting the amount of swap? Most documentations says that tmpfs' size option will limit the total size of the tmpfs partition and later on ...
3
votes
1answer
173 views

Create Linux swap on external USB 3 hard drive

I have an external USB 3 hard drive USB 3 port on Debian, and I would like to create a swap partition on that drive which drive also holds the partitions for databases and other high-volume stuff. ...
3
votes
1answer
768 views

disable pre-emptive swapping in windows xp

If I leave my XP pc for a while, it seems to swap most of my processes to disc. I come back to use it after X hours/days and each process takes 10-30s to get going as it loads it in off disc. It seems ...
3
votes
1answer
455 views

How do I prevent my computer from freezing when it starts to swap?

I work as a Java programmer, so I often have to run several programs at the same time that consume a lot of memory. When my memory is full and Linux starts swapping, my computer almost completely ...
3
votes
2answers
2k views

How to use compcache for Linux 3.2 (Debian Wheezy)

How do I set up and configure compcache for Debian Wheezy (3.2 kernel). As far as I can understand compcache is now in the kernel and is not to be found in the debian repo either. Compcache should be ...
3
votes
1answer
481 views

OS X “Swap used”

I'm a bit confused here, I'm trying to open a tab in Chrome and sometimes it takes few seconds while freezing my computer significantly so that I can't use even to bring Dock menu... I even closed ...
3
votes
2answers
792 views

Should I symlink my /private/var/vm dir to another volume in OS X Lion?

So I just installed an SSD in my MBP and have been a bit concerned about running out of disk space. I noticed that /private/var/vm holds an 8.6 gb sleepimage file as well as swap files. I'd be much ...
2
votes
3answers
112 views

Need more swap space - out of disk slots

A server I am using was setup incorrectly with only 1G of swap space. There are no more hard disk physical slots. There is content on the existing disks. I would like to resize the partition, but ...
2
votes
2answers
2k views

How can I make Windows XP use more than 2.5GB of RAM?

At work, I have four system with Windows XP SP 3 with 4GB RAM installed. When I start a lot of apps, I see that Windows gets unstable when more than 2.5GB of RAM is in use with the usual effects: ...
2
votes
2answers
1k views

How do I make two linux partitions share a swap partition?

I have two Ubuntu linux partitions, and each has its own swap space. Is it possible to make them use the same swap space?
2
votes
3answers
4k views

Swapon failed: Invalid argument on a Linux system with Btrfs filesystem

What's wrong with this sequence of operation, running on a Debian Squeeze system with a Btrfs filesystem? $ dd if=/dev/zero of=swapfile2 bs=1024 count=524288 $ sudo mkswap swapfile2 $ sudo chown ...
2
votes
4answers
734 views

Force swapping of certain stopped processes

When I'm playing minecraft, my computer often has to swap because Google Chrome takes much RAM, too. So, I'd like to manually swap out Google Chrome. I know that I can temporarily stop all its ...
2
votes
2answers
409 views

How to make a good guess for the swap partition size when using tmpfs?

I have an SSD, so space is a scarce resource. I'd like to use up as little as possible for swap. In fact, I have spent the last year completely without a swap partition (the computer has 6 GB RAM). ...
2
votes
3answers
2k views

Ubuntu memory usage

I'm running Ubuntu 10.04 and I do some dev with it. As I open FF, Chrome, Eclipse (Zend Studio 7.2), etc. and do some work, then leave, screen saver goes on, and when I come back a few hours later ...
2
votes
2answers
473 views

Too Much Swapping, even though RAM is ~75% Empty

I have a VPS with 9GB RAM, 300GB HDD, 3 GB Swap, 7 Cores. The OS is CentOS 5.7 Final. I have postgres9.0 running on my machine, with proper tuning done (at least by book/wiki of PostgreSQL). What ...
2
votes
3answers
667 views

Does having swap space on a solid state drive affect the drive's lifetime?

Let's say you have an 8GB solid-state hard drive, which has a limited number of writes by nature (I think). If you have swap space for your Ubuntu installation, will the lifetime of your solid state ...
2
votes
2answers
324 views

Can I use Nand flash as a swap memory in Embedded Linux?

I have 128 MB of Ram in one of my products, which was sufficient when we released first version of the product. But now we added some extra features in it, So this much Ram may cause a problem of OOM. ...
2
votes
2answers
2k views

Any performance gain by putting Windows Pagefile.sys onto an Software RAID-0 Striped Volume?

I have a workstation class laptop running 64bit Windows-7 with 8GB-RAM (expandable to 16GB) and Dual SATA2 7200rpm disks. I know my system will be making heavy use of the pagefile since I will be ...
2
votes
2answers
120 views

how much swap space is too much on x64 and will cause problems?

Apart from using up too much disk space, how much swap space can you allocate before it will degrade performance or cause problems on an x64 OS? What differences are there between the x64 OSes? I'm ...
2
votes
1answer
125 views

Linux swap robustness and/or mirroring - kernel 3.2

i have 8x 2TB disks in raid6 with mdadm and I decided to add a little "slack" partition to each drive just in case a replacement drive is not exactly the same size of the drives i now use. The purpose ...
2
votes
3answers
97 views

Temporarily adding my user to another system

So i need to send in my mac laptop for repair and i have plenty of development work to do for the week that it will be gone for. I can borrow a laptop but obviously it wont have my data and dev stuff ...
2
votes
1answer
735 views

Why does swapon take ages when enabeling a swap file?

I've created a swap file with dd if=/dev/zero of=swap.img bs=1024k count=4k mkswap swap.img swapon swap.img While this works, the swapon command takes ages (approx 10min) to finish. Enabling the ...
2
votes
1answer
278 views

Should I use the openSUSE installer to encrypt /swap until ecryptfs is updated to work with systemd?

I recently installed openSUSE 12.3. I didn't use any partition encryption in the installer. Immediately after the install was complete, I installed ecryptfs-utils and ran ecryptfs-migrate-user -u ...
2
votes
2answers
1k views

Linux zram (compcache) + SwapCached

I have a question about zram + swapcached. I know that zram is a compressed swap in memory, but linux use it's own internal SwapCached area to store recent swap pages also in memory. I have a 512MB ...
2
votes
1answer
2k views

How can I get Linux to not thrash and just kill processes?

Firefox (and flash) tends to chew up memory at random times, causing my computer to thrash, and it drives me crazy waiting for the oom_killer to kick in and kill processes,[1] while I can't do ...
2
votes
1answer
285 views

Protected with Linux Per-Directory Encryption (no swap)?

I have been using full-disk encryption for some time on Linux with good success, but the additional layer of complexity that it adds is something I'd like to avoid, e.g. backup/system restore ...
2
votes
4answers
203 views

Filesystem of swap space

What is the name of the filesystem used for swap space?
2
votes
1answer
68 views

Pick which swap partition to use for Suspend to Disk

Is there anyway in Linux to pick which swap partition to use for Suspend to Disk? I have a setup with 2 swap partitions, one on an SSD and one on a HDD. I want the swap partition on the HDD to be used ...
2
votes
1answer
695 views

My Ubuntu laptop swap cache to disk freeze my system

My laptop is Thinkpad x220, 4G ram, harddisk is 7200rpm, installed with Ubuntu 12.04, using Unity desktop. When I open eclipse and chrome, they eat about 2G memory. Here is the free -m result: ...
2
votes
2answers
3k views

Moving the OS X swap file to a faster drive

I have a new Mac Mini that's running the latest version of Snow Leopard. The internal drive is a bit of a slouch. I'd like to move the swap file (or whatever it's called is OS X) to my faster external ...
1
vote
2answers
1k views

Sharing RAM resources between 2 or more computers

I know there was a somewhat similar question before: How to share CPU or RAM? But, let me just specify it a little more... When Microsoft Windows requires more RAM capacity than available it uses a ...
1
vote
2answers
786 views

Is it possible to mount a swap partition into a directory?

I want to have a look inside the swap partition of an external linux drive. How can I mount it as a regular file system directory? I tried mounting it via mount -o loop,offset=35556433920 -t ...
1
vote
4answers
247 views

Why is my system swapping if there is free RAM available?

I have a KVM host running several virtual machines. The hardware is comprised of 24 cores w/ 40G of ram. This is the output of the free command: total used free ...
1
vote
3answers
1k views

What is the meaning of pri=42

When mounting a swap partition on Linux, what does the mount option pri=42 mean? fstab: /dev/hda1 swap swap pri=42 0 0
1
vote
2answers
86 views

even if we have enough RAM space, why OS will use SWAP memory? [duplicate]

from the above pic, you can see we have 3191 RAM free, but at the same swap is also using about 661 bytes. why it is occurring ? can any give a glance regarding this. Thanks
1
vote
2answers
746 views

How to create Swap in Fedora?

I am new about swap and filesystem. Now I encounter a problem: 2G ext4 disk /dev/sda7 # Want to be used as swap in fedora 24G ext4 disk /dev/sda8 # My fedora is built on it without Swap As ...