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)

0
votes
0answers
3 views

Lubuntu - Cannot poweroff laptop when using swap

I'm using Lubuntu 16.04 on my Notebook HP Pavilion g6-2305sl, and I'm having some troubles apparently (I'm not really sure) connected to swap usage. I boot up with the command line login shell and ...
1
vote
0answers
49 views
+50

How to Allocate More Space to Swap and Increase its Size Greater than Ram?

Situation: increase swap size (/dev/sda3) greater than Ram (8 GB) when HD 128 GB Motivation: 8 GB RAM is too little; 30 GB free space in my SSD; I want to turn 20 GB to SSD swap Characteristics of ...
0
votes
1answer
39 views

How to deal with high number of page faults?

I've got ~200000 page faults per second and I think it's a huge number and it affects the overall system performance. I'm using MBP with 16G of RAM. How to deal with such number of page faults (...
3
votes
2answers
58 views

How to Resolve the Insecure warning in Swapon?

I do #!/usr/bin/env bash # http://askubuntu.com/q/799834/25388 # http://stackoverflow.com/a/69808/54964 set -e SWAP_FILE="/media/masi/SamiSwapVirtual/.swap_file_20.7.2016" SIZE_MB=16000 dd if=...
1
vote
0answers
10 views

Why total swaps and page faults/reclaims is empty in ps?

I'm running the following command: sudo ps -axo nswap,majflt,minflt,command | sort -nr | head which suppose to print total swaps in/out, total page faults and reclaims. But for given >400 ...
-3
votes
0answers
24 views

How to Do Error-trapping and Swapoff if Error/Warning?

Pseudocode where incomplete pseudo try-catch after cas' comment #!/usr/bin/env bash # http://askubuntu.com/q/799834/25388 # Use: `sh myScript`; sudo does not work with Matlab. #set -e # no ...
0
votes
0answers
10 views

Android, microSD and SWAP

I have an Android 4.4.4 device (which I can easily root) with a 32 GiB microSD card, which is secured well and will not be disconnected during normal work. Is there a way I could use that card or more ...
0
votes
1answer
42 views

Can swap get corrupted?

We keep having swap problems when moving a lot of files or deleting them. The latest message is "out of swap space" We rebooted. However, "out of swap space" now occurs during boot. Freenas just ...
1
vote
2answers
39 views

Increase swap space in linux through terminal

While installing Oracle DB in linux machine, I face a problem like swap space is not sufficient. How can I increase the swap space?
1
vote
0answers
29 views

Installing RHEL to multiple-boot with Windows and two other Linux distributions

Alright, so I made an earlier attempt to install RHEL 7.2 with automatic partitioning, and it turned into a mess since I have 3 other operating systems installed (windows + 2 Debian based Linux ...
4
votes
0answers
42 views

Why does /proc/*/status not account for all swap used on a system?

I have a system that has been swapping recently and am unable to account for all swap that is shown as in use by tools like free or top. Specifically, I can account for 19GB of 28GB swap used (...
0
votes
0answers
33 views

How do I setup an encrypted swap partition in Kali?

I am attempting to setup an encrypted swap partition on my Kali system, post-install. This system is also able to dual-boot into a windows 7 system that was encrypted with veracrypt. I have been ...
3
votes
1answer
86 views

I can't enable Swap space on CentOS 7

So I'm following a tutorial to install OTRS which is Open source Ticket Request System. So in order to install, it requires: 4GB of Swap space. Here's the command i used: [root@ip-10-0-7-41 ~]# df -h ...
8
votes
5answers
21k views

Swap usage too high?

I have a Debian Sid box, freshly installed about a month ago, with no desktop apps running at the moment. Any command I try to run (via ssh) makes the hard disk work very hard. The system worked ...
4
votes
1answer
112 views

Silent disk errors and reliability of Linux swap

My understanding is that hard drives and SSDs implement some basic error correction inside the drive, and most RAID configurations e.g. mdadm will depend on this to decide when a drive has failed to ...
1
vote
1answer
49 views

Use SWAP as disk cache in Linux

I am using different kind of disks on my server. Is it possible to use faster disk as SWAP and ask Linux to use it as Disk cache As I understand Linux use SWAP only for application data not disk ...
3
votes
4answers
3k views

How much RAM needed for preventing use swap?

At my system always available some "Free" and "Inactive" memory, but sometimes system move couple megabytes to swap. Per night it maybe around 100MB, but for a few days in swap could be more than ...
1
vote
2answers
3k views

How to recover from a boot hang after deleting old swap?

I did a fresh installation of Fedora 20 in the free space of my hard drive after failing to upgrade from the older version. Everything seems to be working fine until I deleted the partition containing ...
3
votes
0answers
27 views

Entire Harddrive to linux swap

I have an old hard drive that is less than 50Gb and a computer that only has about 4Gb of ram (and ~250Gb main HDD). I was thinking about using the second drive as an entire drive linux-swap partition....
4
votes
1answer
47 views

How will hibernation work in two Linux installations sharing a swap partition?

This question is a more specific "subquestion" of the one about side effects when two distros share a swap partition. What will actually happen if I install two Linux distributions on my machine with ...
1
vote
2answers
55 views

Can lower swappiness speed up wake-up from hibernate?

Does anyone use swap? what is your swapiness value? Mine are 60 $ cat /proc/sys/vm/swappiness I use hibernation. It worked but slow to load when wake-up.. If I tune swappiness from 60 to 10. Does ...
1
vote
1answer
39 views

How to obtain counters for swap-in/swap-out on Linux?

I'm trying to obtain counters for swap-in/swap-out activity on CentOS 6. The intention is to feed raw data into RRDtool to generate graphs, and use it to generate alerts. I've had a look at common ...
1
vote
1answer
35 views

mkswap complains that partition is misalilgned (LVM on RAID-0)

I have a RAID-0 setup on two identical hard disks (same brand and model). The partition table is identical on both (I have cloned it). However, /dev/md0 occupies only part of the disks, because I had ...
45
votes
3answers
51k views

How can I check if swap is active from the command line?

How can I check if swap is active, and which swap devices are set up, on the command line?
3
votes
1answer
23 views

Can I deny use of swap space to a specific process (and have it just get killed)?

While developing some software, a program under test sometimes eats all the memory, then proceeds to yomp into the swap space and start thrashing the disk, leading to a predictable drop in ...
1
vote
0answers
39 views

Unable to activate new encrypted swap partition

First off, I did not reboot and would not like to, it's a server. It is running Debian Jessie 8.4 with kernel 3.16.0-4-amd64. I followed these steps: apt-get install cryptsetup -> no problem ...
3
votes
2answers
114 views

Linux using whole swap, becoming unresponsive while there is plenty of free RAM

I am experiencing a weird issue lately: Sometimes (I cannot reproduce it on purpose), my system is using all its swap, despite there being more than enough free RAM. If this happens, the systems then ...
4
votes
2answers
2k views

swapoff fails when overcommit_memory==2

I've disabled memory overcommitting by setting overcommit_memory=2. Now when I tried to swapoff, I get this error: swapoff: /dev/sda5: swapoff failed: Cannot allocate memory But I in fact have 0 ...
0
votes
1answer
29 views

set swap space to 0 on RHEL for testing

I have tried to change the swappiness to 100, and used the malloc() code in order to set the swap to 0 on my rhel system But this not seem to be helpful . The system memory allocation looks like this :...
63
votes
3answers
34k views

Why is swappiness set to 60 by default?

I just read some stuff about swappiness on Linux. I don't understand why the default is set to 60. According to me this parameter should be set to 10 in order to reduce swap. Swap is on my hard ...
1
vote
2answers
38 views

Get swap memory info where swapinfo not available

I have HP-UX box. I need to write shell script to see the swap memory. Unfortunately. The box don't have swapinfo command. Is there any alternative way to see the swap usage percentage? Please note ...
1
vote
4answers
7k views

kswapd0 takes 99% to 100% CPU in RHEL 6.3

I have 5 systems on which I have just installed RHEL6. System configuration is CPU-i7 HDD-500 GB RAM-2 GB Swap- 4 GB I have installed the same software's and all the configuration as per ...
1
vote
1answer
86 views

Ext4 corrupted and unrecoverable after LVM resizing + power failure

I have a completely standard, single hard drive Fedora 23 desktop. The dual-boot installer set up the Linux partition as LVM, with root, swap and home logical volumes; root and home were both ext4. ...
0
votes
1answer
48 views

Vim saved file not updating on webpage

I am attempting to update an HTML file on my server, but when I do so it doesn't appear to be updating, but rather, serves an old copy instead. I went through the usual process of pressing :w and ...
3
votes
1answer
784 views

Swap appears to not be in use

(I am currently using Ubuntu 14.04 LTS, GNOME environment) tl;dr How can I force more memory swapping (swappiness already at 100)? I have recently been experiencing a lot of system freezes/crashes. ...
3
votes
1answer
74 views

Keep a process in RAM (prevent it from swapping)

I want to keep a process in RAM. It should never go into swap. Is this possible? The process is a Java program. I'm running CentoS 7.
1
vote
0answers
68 views

how does systemd activate encrypted swap file on alternate partition?

I have 2 partitions: / and /data. My swap file is encrypted at /data/swap. So /etc/crypttab looks like: root_crypt UUID=6666 none luks swap /data/swap /dev/urandom swap And /etc/fstab looks like (...
3
votes
1answer
34 views

How does Linux manage “simultaneous” writes to swap/disk partitions in virtual memory?

I'm currently working on an educational operating system called Pintos. While implementing virtual memory, one of the issues that I'm having is writing data to swap in a page fault that happened while ...
3
votes
1answer
46 views

Making a swap partition using lvm

When we make a swap using a regular physical drive, we just use fdisk and make a partition with type swap, using the swap code for that partition, followed by mkswap and swapon commands. But what if,...
0
votes
2answers
41 views

Cleaning swap space while running

I have a theoretical question, What would happen if I clean up all the swap space while running, Would the operating system crash because of page faults that would happen in the kernel?
26
votes
1answer
5k views

How to set per process swapiness for linux?

/proc/sys/vm/swappiness is nice, but I want a knob that is per process like /proc/$PID/oom_adj. So that I can make certain processes less likely than others to have any of their pages swapped out. ...
1
vote
1answer
63 views

Machine freezes once it hits swap space under heavy load

I encountered several crashes of my machine. Meanwhile, I can reproduce it when I start a program that fills up all memory. Once the system starts writing to the swap file, the system freezes and I ...
3
votes
2answers
2k views

Log from oom killer

I'm running a virtual machine at a provider where you pay for everything you use (CPU, memory, disk IO, bandwidth, etc). Currently my machine has 512MB ram and 1GB swap area. The kernel version is 3....
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 ...
0
votes
0answers
24 views

swap goes the second drive, how can I return it to normal from command line?

The following is my plan for partition of CentOS 6.7. I have two disks with A for system and files, B totally for backup. But, after installation, I log in using ssh root. Here is what I see: (...
3
votes
1answer
26 views

Setting up encrypted swap in LMDE (debian)

I want to use a swap drive that is encrypted by a random key on boot. I'm not sure if I am doing it safely, though. I currently have /etc/crypttab based off of the example on arch wiki. Unlike their ...
0
votes
1answer
52 views

-/+ buffers/cache & Swap

When should the usage of swap get started? or How do I know that my swap is being used? At least some times if not always, considering the default swappiness of 60 Also, why does free offer to omit ...
58
votes
5answers
8k views

What NOT to put on an SSD?

I bought an SSD and I am going to set up my desktop system with a completely fresh Linux installation. SSDs are known to be fast, but they have a disadvantage: The number of writes (per block?) is ...
1
vote
1answer
34 views

vm.swappines parameter influence on system without swap partition

I run across following definition of vm.swappines: The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. So, if I have ...
0
votes
1answer
29 views

Crash with input/out error and swap unmounting [duplicate]

I am looking for hints on this problem. I've searched around, but can't find something exactly similar. I am running Debian 8 stable, updated, very minimal install (i3wm, small number of apps running)...