Linux divides its physical RAM (random access memory) into chucks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory(RAM) and the ...

learn more… | top users | synonyms

1
vote
2answers
1k views

Ubuntu Server 14.04LTS Swappiness for server with 16GB memory

(don't worry I'm not asking what my setting should be, asking for the theory behind some conflicting advice I've read) My application is one that is lightweight and not under much load, but needs to ...
8
votes
3answers
5k views

How can I create a swap partition on Amazon EC2 with ephemeral storage?

This is the output of df -k: Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda1 10317860 7059008 2734732 73% / none 847584 0 ...
10
votes
3answers
2k views

Background discard on swap partitions on Linux + SSD

Problem I want to enable background TRIM operations on a swap partition within a SSD disk on Linux. According to several articles, e.g. this one, the kernel detects this configuration and ...
0
votes
0answers
26 views

Postgres shared buffers tricking Linux into swapping? [duplicate]

Why is my system swapping when I have 45GiB of "cached Mem"? Is Postgres causing problems by using a lot of SHR memory? Here's my situation: 12 cores, 64GiB of RAM on my server running Ubuntu ...
2
votes
1answer
507 views

Avoiding swap on ElastiCache Redis

We have been having ongoing trouble with our ElastiCache Redis instance swapping. Amazon seems to have some crude internal monitoring in place which notices swap usage spikes and simply restarts the ...
0
votes
2answers
43 views

How to remove SWAP partition, and add back to root partition in cli

I am on Ubuntu 14.04 server with only ssh access into the machine in question. Someone else setup this machine, and they added a ridiculous swap space...a little more than half of the SSD. Here's ...
7
votes
8answers
5k views

Do I even need a swap partition with Linux?

I have a core 2 laptop with 4gb of ram. I use the machine for browsing, network stuff and simple programming. (I use this machine to host a small ftp and web server semi-occasionally.) Would there be ...
10
votes
11answers
8k views

How big should the swap partition be?

for some years, I've read that it's a good idea to create a swap partition having the double space of my RAM. does it still apply today? or this isn't needed anymore? I have a server with 8 GiB of ...
0
votes
0answers
37 views

Linux process resident + buffers + cache + free less than total

We are using Ubuntu 12.04 on real hardware: $ uname -a Linux test-precise-03 3.13.0-85-generic #129~precise1-Ubuntu SMP Fri Mar 18 17:38:08 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux And are unable to ...
0
votes
2answers
22 views

Are there any risks I'm not considering for when a swap partition fails?

I'm planning to setup 4 drives in a raid10 configuration, but putting separate swap partitions on each (no raid), and letting the kernel do something similar to raid0. When/if one of the drive fails ...
3
votes
2answers
937 views

How can I keep important VMs in memory without disabling swap?

VM Host -> Xenon E5-2440 w/ 48G mem... Everything runs CentOS6.5 (2.6.32-431) I have 4 guest VMs running each w/ 2G of memory. Their disk images are local files. The host machine is also running a ...
2
votes
0answers
83 views

Linux swap partition not mounted by systemd on boot after dist-upgrade

Recently, I performed a dist-upgrade from Debian Wheezy to Jessie. The upgrade was performed without any error but after the upgrade the swap partition was no longer mounted/activated. The mentioned ...
0
votes
1answer
35 views

New Swap Drive - Linux Hangs during Boot

An application checked the swap space during install and required it to be the same amount as ram. So i added a new disk (Server is a VM) and done the following: swapoff /dev/mapper/ol-swap vgcreate ...
1
vote
2answers
55 views

Implications of increasing physical ram of VM

I have a Centos7 VM running under VMware and I'm considering increasing virtual memory in the Centos VM. Currently my VM has 8GB of virtual memory, 6GB of swap and using 0 swap right now. I am ...
0
votes
0answers
76 views

Swap partition not mounted on boot

I'm having issues with a fresh SLES12 install and swap not mounting. It's a DL360 G6 server with P410 and 2x 146GB drives in RAID1. The single /dev/sda has MBR with sda1 for swap and sda2 for ext4 ...
1
vote
0answers
82 views

Linux swapping blocks system (freeze)

I have a problem with my Debian Servers. We run 4 different server which all have Intel CPUs and 128GB of RAM. Two of them run Wheezy, two of them run Jessie. We run a Java software on those systems ...
14
votes
5answers
2k views

How to get the Linux OOM killer to not kill my process?

How do I get the Linux OOM killer to not kill my processes when physical memory is low but there is plenty of swap space? I have disabled OOM killing and overcommit with sysctl vm.overcommit_memory=2....
4
votes
3answers
3k views

kswapd often uses 100% CPU when swap is in use

Most of the time when my computer starts to need swap, I see a massive spike in CPU usage (kswapd0 is consistently using 99%-100% CPU). According to top, the time is spent in sy (system/kernel) not wa ...
0
votes
2answers
31 views

Why takes CLEARING swap soo long?

Why is moving from RAM to swap fast and from swap to RAM very slow? When I run program that needs more memory that is available, I see that the RAM is prety quickly "cleaned" by moving unsused (=the ...
1
vote
1answer
55 views

Linux hibernate: how to specify a swap partition to store data if I have two?

We can specify the swap partition to load data from when recovering from a systemd hibernation using kernel argument resume=/dev/xxx. However, I didn't find any command-line or kernel argument to ...
1
vote
1answer
424 views

Is there ever a reason to use tmpfs instead of or in addition to zRAM?

I'm thinking about using zRam on my server. From what I've read about zRam, it apparently does everything tmpfs does and more. Once zRAM is working, is there any reason to keep tmpfs around? Is there ...
23
votes
4answers
41k views

How do I tell if my Windows server is swapping?

I'm using Process Explorer to monitor my windows server while it reconstructs some data. It's primarily a CPU intensive process, but I want to make sure it's not swapping. How can I tell if it is ...
0
votes
0answers
25 views

mixed storage types for swap

My shop utilizes mixed storage types for swap. We have limited fast virtual ram drives and more abundant cheaper slower disk space, all on the same system. I can prioritize the order in which the ...
3
votes
1answer
262 views

Docker using huge amount of swap memory on Ubuntu 15.04, why?

I am suffering from excessive memory usage, currently amounting to ~940 MB physical and ~1 GB swap memory, on my Ubuntu 15.04 x64 Docker (1.9.1-cs2, build 4ade326) host. According to top, Docker is ...
1
vote
1answer
105 views

Centos clear swap usage

I got nagios monitoring and it is picking up high swap usage on a specific server. The user is using some application which triggers the high swap. Even after they quit the application, top still ...
11
votes
2answers
10k views

Ubuntu Server hanging on adding swap

A fresh install of Ubuntu Server is refusing to boot and hanging on "Adding 524284k swap on /dev/mapper/test--vg-swap_1. Priority:-1 extents:1 across:524284k I can get around this by dropping onto ...
2
votes
0answers
126 views

Ubuntu Server 15.10, process not being allowed to use all physical memory, kswapd0 using 100% CPU

I have a 24-core server with 64G of DRAM, and it's running Ubuntu Server 15.10. I am getting some strange behavior with respect to swapping and physical memory use. I never had this trouble until I ...
1
vote
1answer
330 views

How do I increase the swap size on a xen guest machine using xm?

I'm attempting to increase the amount of swap on a xen guest machine. At first I thought it'd be similar to increasing the hard drive space, which I do like this: cd /srv/xen/domains/$host/ xm ...
5
votes
1answer
13k views

why is kswapd using high CPU on an idle system?

I have an idle Linux centOS system and yet kswapd is using 100% cpu. All I have running is a single bash session with top running.... I have 32G RAM and yet kswapd is constantly using 100% cpu for ...
49
votes
12answers
37k views

How much SWAP space on a 2-4GB system?

How should I decide what size to make my swap on a new Linux machine (Debian) with 2-4 GB of RAM? Do I really need swap space?
2
votes
2answers
439 views

Linux swap not used, even when OS run out of memory

The swap is at low usage, and the OS sometime run out of memory and start scarifying processes swapon -s Filename Type Size Used Priority /dev/vda1 ...
2
votes
3answers
652 views

How to enable swap with salt stack?

How can I create and enable permanent 1GB swap file with salt stack that will work after reboot? salt.states.mount.swap does not allow to define swap size. Furthermore I need to define swappiness. ...
51
votes
4answers
25k views

Why don't EC2 ubuntu images have swap?

I started a couple servers on EC2 and they don't have swap. Am I doing something wrong or is it that the machines just don't have any?
1
vote
2answers
544 views

Linux Swap used is higher than total [duplicate]

I found a bizare think on my server. The swap used is significantly higher than the total swap. free -m total used free shared buffers cached Mem: 1869 ...
1
vote
2answers
819 views

Moving a process to and from swap [closed]

I've got several server-type processes on my linux server that use up 50MB of RAM. They are not constantly being used, and I'd like to be able to run more instances than my RAM capacity allows. I want ...
1
vote
2answers
151 views

Kill or revive a process based on system memory usage

Consider a system with limited memory, like a smallish VPS. Suppose there are a handful of processes that need to stay alive, and one process "P" that would be nice to have around, but is not ...
3
votes
1answer
343 views

Limiting memory usage and minimizing swap thrashing on Unix / Linux

I have a few machines that I machine that I use for running large numbers of jobs where I try to limit the number of jobs so as not to exceed the available RAM of the machine. Occasionally I mis-...
1
vote
2answers
59 views

Server using swap with plenty resources left

I have a Centos 7 with a swap of 256 MB. I have at least 1GB o free RAM memory all the time and my CPU never gets over 60% of usage. But anytime I check the swap use it's using about 200 MB! My ...
4
votes
2answers
497 views

Is it safe to store a swap-file on the Temporary Disk on Azure?

I've got a virtual Linux server running on Microsoft Azure. The machine has a disk /dev/sdb1 mounted to /mnt. This folder contains a file DATALOSS_WARNING_README.txt with the following content: ...
0
votes
1answer
150 views

KVM hypervisor swap

I've had my first CentOS 7 KVM host setup for about a year now, it is a dual quad-core machine with 32GB of physical memory. I have a dozen VM's running with a total allocated memory of 23GB. This ...
1
vote
1answer
4k views

“Lack of free swap space” on Windows Server

I have several Windows Server 2012 Virtual Machines, which are monitored by zabbix 2.4. The zabbix throws "Lack of free swap space" for some VMs, but there are disk and memory free on these machines, ...
-1
votes
1answer
100 views

Is there a way to make /tmp mounted as tmpfs to use only swap? [closed]

I have a swap of 64 GB SSD. So is there a way to make /tmp mounted as tmpfs to use swap alone and not use RAM?
0
votes
0answers
57 views

CentOS file size (file lost after download if bigger than 2 gb)

I have a problem with I download file with my server and upload on my server. It's a server, centos 64 bit 16gb ram x cpu 4 core x2. If I try to download for example test file, if test file is lower ...
1
vote
1answer
182 views

How can I maximize the memory usage of a single Windows process?

I have a system with a large amount of memory. Right now, to prevent a single application from paging, I've disable the paging file completely. The issue that I'm running into is that I cannot ...
1
vote
0answers
606 views

ATOP: vmcom / vmlim -> SWP is red

in ATOP I'm getting a red alert like this: vmcom 76.3G | vmlim 49.8G This is a value that is attached to the "SWP" (so "SWAP" is meant?)-line. What does this mean and what can I do against it?
33
votes
6answers
29k views

swap partition vs file for performance?

What is better for performance? A partition closer to the inside of the disk will have slower access times, and we must wait for the drive to switch between the OS and swap partitions. On the other ...
-2
votes
1answer
91 views

Increasing swap on RAM-limited VPS used for calculations [closed]

I'm using a VPS for some computationally heavy tasks but not to host a publicly-facing website. The author of the application I'm using recommends running the jar with 8GB of RAM, but adding those ...
0
votes
0answers
215 views

mysql swap file crash on freebsd

I have a low memory VPS that mysql and the swap file crash out every morning at exactly 0300. There are no cronjobs on the system that have been configured. The server is a basic LAMP development ...
0
votes
1answer
36 views

What happens when the swap folder on your harddrive is full? [closed]

So this is an "what if" question. It may not happen that often, but I am just curious what happens if it would exactly happen. So in short a computer needs space somewhere to store different thinks ...
4
votes
3answers
2k views

Should I use swap in KVM guest?

Now I'm trying to create KVM templates with CentOS and I'm not sure should I create swap partition on guest OS or not. In future it will be lot's of small VPS with 256-1024Mb RAM and if swap partition ...