Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [swap]

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 ...

0
votes
0answers
18 views

Squid docker container configuration and swap

I'm currently running 4 squid container on my VPS. The server is a 1 vCore cpu with only 512 mb ram. I don't need a high percentage of hit rate, i don't need cache at all in fact. Starting from the ...
3
votes
3answers
22k 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, ...
4
votes
4answers
2k views

Should I turn off swap on AWS EC2?

I'm running a webserver and database server on the same AWS EC2 instance. I know it's a bad idea to have swap for web server, so should I just turn it off? Will it affect the database service (I guess ...
2
votes
2answers
90 views

Is swap file required for a Postgres database running on AWS EC2 instance with 122 GB memory?

What is the downside for running a Postgres database without a swap file? This database resides on an AWS EC2 machine with 122 GB memory.
2
votes
1answer
3k 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?
-1
votes
0answers
54 views

Enabled systemd unit is “inactive (dead)” after boot

I'm trying to create a swapfile in a CoreOS, official way (documented here) don't seem to work for me. Thus, I made a custom cloud-config file, as following : #cloud-config coreos: units: - ...
0
votes
1answer
37 views

Centos 6.10 Swap File Issue Wrong size

I have Centos 6.10 Server with initial swap of 3.81 GB working ok no issue. I noticed wrong swap today amount of 4kb. I tried removing the partition and recreate entry on fstab and remount but no ...
27
votes
4answers
61k views

Best way to disable swap in linux

I am running a custom compiled 3.18.9 kernel and I am wondering about the best way to disable swap on the system. I also use init if it makes a difference. Is it enough to comment or remove the swap ...
2
votes
2answers
97 views

Is there a way to force a single process to swap most/all of its memory to disk (NON-ROOT)

We are currently analyzing performance of some of our boxes at work and we find that we have boxes that are swapping a lot and things start crawling when that starts to happen cause we are using ...
1
vote
1answer
79 views

Make Ubuntu Server use less swap and more actual RAM

I have a server with 128 GB of RAM and a 100 GB hard drive in it. It seems to use pretty much swap instead of using actual RAM when rsyncing disks. I found other questions on Stack Overflow with ...
0
votes
1answer
67 views

kswapd process causing high system CPU

I'm troubleshooting some issues with my RHEL 5 server. This is an Oracle DB server which are running for a while now without much issue. Lately I notice that the server load is relatively high due to ...
3
votes
3answers
9k views

What is the danger in having a fully used SWAP in an Ubuntu server?

One of my Ubuntu servers' swap partition is full. What are the dangers and/or performance ramifications of this situation?
4
votes
3answers
2k 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 ...
3
votes
4answers
2k views

Running swap on RAID10 or RAID5?

In follow-up to this previous question (and it's excellent answer), I am curious to know if running swap on a RAID5 might not be better than on a RAID10. My thinking is that you might lose a bit on ...
4
votes
4answers
2k views

Can I run an Oracle server without swap?

Official Oracle docs say that for a machine with more than 16GiB of RAM we need to allocate 16GiB of swap. Our servers are RHEL 7 and have 256GiB of RAM. DBAs do not want to see the system swap, so ...
12
votes
4answers
9k views

Why disable swap on kubernetes

Since Kubernetes 1.8, it seems I need to disable swap on my nodes (or set --fail-swap-on to false). I cannot find the technical reason why Kubernetes insists on the swap being disabled. Is this for ...
0
votes
0answers
26 views

Why is my kernel choosing disk swap over 24G of inactive RAM?

Output below is meminfo from a Proxmox hypervisor. I noticed today that swap usage was 90%. I logged into the box and checked and and it seems there is actually 24G of inactive RAM. A couple minutes ...
2
votes
4answers
697 views

Creating swap files faster

I'm using Amazon EC2 and wish to be able to quickly generate large swapfiles (~10+GB) on instance startup. Unfortunately, I/O speed on my instances (c1.xlarge) is slow enough (20 MB/s) that this ...
75
votes
5answers
38k 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?
0
votes
3answers
71 views

Missing mdam RAID1 array during scan

I have built a new server (Ubuntu 18.04.1) with 4 HDD. My plan is to use RAID1 overall and came up with this layout after investigation: sda, sdb four primary partitions (all as fd) with sda1/sdb1 ...
0
votes
0answers
9 views

How to create randomly keyed swap with Kickstart

I want to create an encrypted swap partition using Kickstart. Instructions on how to create encrypted swap manually are in the related question How to create a randomly keyed, encrypted swap ...
12
votes
2answers
6k 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 ...
1
vote
1answer
206 views

Proxmox doesn't recongnize increased swap space

So I tried to increase the swap LV from 8GB to 16GB, but Proxmox web panel doesn't seem to see the change. The LVM increased the space, but Proxmox haven't changed it's panel. Originally lvdisplay ...
1
vote
1answer
186 views

swapon & hibernate on power key

I have a laptop & I run Arch Linux. My laptop has a spinning hard drive rather than an SSD, so I hate swap. However, I need one to hibernate, and I want my laptop to hibernate every time power key ...
2
votes
2answers
913 views

Could swap use many inodes?

I have got a graph about high inode use of our server's disk but I haven't got any detailed information (like df -i) so I'd like to guess the reason. Operating System: Red Hat Linux Process: PDF ...
0
votes
1answer
169 views

rsyslogd uses 435M of swap memory right after restart

I have Centos 7 # cat /etc/centos-release CentOS Linux release 7.3.1611 (Core) fresh rsyslogd # rsyslogd -version rsyslogd 8.36.0, compiled with: enough free memory # free ...
0
votes
1answer
29 views

Machine swapping despite there being enough memory

One of our Docker hosts is swapping like hell for no reason - at least, no apparent one (it's a Ubuntu 16.04LTS VM). All Docker containers in summary only use ~4 GB of the 12GB RAM total, but the ...
29
votes
4answers
62k 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 ...
5
votes
1answer
16k 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 ...
1
vote
1answer
529 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
0answers
174 views

Swap unused, high memory usage and swappiness at 100

I'm running a server with a number of game servers on it. My memory usage is very high, however there is almost no swap usage in comparison. My swappiness is set to 100 total ...
57
votes
10answers
22k views

Linux: how to explicitly unswap everything possible?

I've launched something that took lots of memory and now everything lags a lot. I guess all applications' memory has gone to swap in order to free some space for the memory-intensive process, and now ...
0
votes
1answer
104 views

JVM heap is being swapped causing GC go haywire - Tomcat

Info: # of VMs= 4, each with an instance of Tomcat 8.5.* in cluster Apps = 5 war applications- 2 UI applications and 3 Webservices. Java Version = java 1.8.* Configuratin = 2 LTMS and 2 Apache ...
0
votes
0answers
123 views

Cannot mount swap partition at boot on Amazon Linux 2

I am trying to mount swap partition in etc/fstab on Amazon Linux 2, but it doesn't work on the boot-up process. here the steps I have followed: create swap file: dd if=/dev/zero of=/swapfile bs=1024 ...
1
vote
1answer
1k views

Linux Mint: Python process gets “MemoryError” before swap is even close to fully used

I'm attempting to run a Python script that requires a lot of Virtual Memory. I'm on Linux Mint 17.3 64 bit and Python 2.7. As the Python process grows, I can see (using free -m) the amount of RAM ...
2
votes
0answers
2k 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 ...
1
vote
2answers
414 views

High swap usage on CentOS server with plenty of spare RAM

We have a fleet of web hosting servers all running the exact same software & hardware with similar load. One of our server gets very high load that leads to it locking up for brief periods of ...
5
votes
2answers
836 views

Swap with a huge amount of ram available

I have an old, legacy server with an odd problem with swap. Linux version: Red Hat Enterprise Linux Server release 5.6 (Tikanga) Kernel version: 2.6.18-238.el5 Server is virtual. Server has 2 virtual ...
1
vote
0answers
145 views

OOM killer kills process though page cache is never evicted

Our servers in production sometimes under load runs into the following issue (Linux 4.10): Application handling the load (webserver) is running at high load. A new job starts (e.g. cron). This ...
0
votes
1answer
322 views

How to prevent kernel I/O thrashing in absence of swap memory on Linux?

I had problem with a process spawning very many threads due to a bug, eating up memory, causing heavy swapping to the swap partition. Thus, I switched off swap – which is recommended in server ...
0
votes
1answer
391 views

Delete a file that was created with fallocate

I started to create a swapfile. I used this command: sudo fallocate -l 1G /swapfile Then, I decided that I want to make the swapfile in a different path, so I used the command again with the right ...
6
votes
2answers
1k views

Linux OOM disk I/O. Also: swap, what is it good for?

I'm having problems with the OOM killer on one of my Linux (2.6.37) installs. The computer has 4GB of memory which I sometimes utilize fully. In those cases, I expect the OOM handler to come in and ...
0
votes
0answers
437 views

CentOS 7 swap space used up by qemu-kvm but no si/so operations

I have a DL360 server running CentOS 7 KVM. This server has 256GB of RAM and I have assigned 16GB for swap. My concern is that swap is pretty much used up with only 1GB free. I have 2 other KVM ...
1
vote
0answers
337 views

Docker memory swap account broken in ubuntu 14.04.2

I'm using ubuntu 14.04.2 . I saw that recently swap support was broken, maybe with a recent kernel upgrade? On a fresh install: cat /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=...
1
vote
1answer
198 views

dd using all memory and swap

I have a dedicated Centos 6.9 linux server with a company that crashed due to hardware failure and has been restored with the old HDD's on a usb caddy. I am trying to move lvm partitions over to the ...
1
vote
2answers
10k views

Solaris: how to list swap space per process?

On Solaris, how can I find out how much swap space a given process is occupying? Or even better, how can I list all running processes sorted by swap space usage? I'm asking this particulary for ...
10
votes
11answers
11k 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
685 views

vm.swappiness works differently on CentOS 6 and 7

We have an Hadoop cluster of CentOS 6 (kernel version 2.6.32-504.el6.x86_64) and CentOS 7 (kernel 3.10.0-327.el7.x86_64) servers . All the nodes are configured with a swapinness of 1. All nodes have ...
8
votes
4answers
4k views

Linux: Where to put the swap file

Are there any conventions on where to put swap files on Linux? I usually just create them in /var/swapfile, but that seems a bit too high up in the hierarchy.
4
votes
0answers
152 views

AWS ElastiCache Redis - Why has SwapUsage slowly climbed just over 100MB dispite having FreeableMemory available?

Starting around 7/28/2017 the SwapUsage started to climb for reasons I cannot figure out. I have spent many hours Googling and reading AWS documentation. At no point do we run out of FreeableMemory. ...