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 swap space is the amount of virtual memory available. Linux has two forms of swap space: the swap partition and the swap file.

Filter by
Sorted by
Tagged with
0
votes
2answers
93 views

Linux: The difference between “paging on major page fault” and “swapping enabled manually”

On a Linux machine, we can enable swap by commands like the following sudo fallocate -l 500M /data/swapfile sudo chmod 600 /data/swapfile sudo mkswap /data/swapfile sudo swapon /data/swapfile But ...
1
vote
0answers
24 views

Puppet keeps pushing .swp files

Our current setup has a manifest/site.pp that include the following for all of our modules File { ignore => ['.swp'], } However when running puppet on the client side, it still tries to push ...
14
votes
1answer
3k views

Linux goes to swap while plenty of RAM installed

I have a linux box that is used as SAN storage. It is equipped with 14 SATA HDDs and the only software it run is iscsi target and zabbix agent. This is physical box, not VM. The RAM size installed is ...
0
votes
1answer
39 views

how to prevent swap usage when all my php-fpm running in swap

i have 32gb ram running on redhat. I am using this server dedicated to querying a list in the database and processing them using php from cron. # free -m total used free ...
0
votes
2answers
164 views

Temporarily turning off swap on a production database?

If I need to turn off swap on a linux server mysql database so I can increase the size of the swap, what would happen to the database? The database is using all 8GB of swap. What would be the best ...
-2
votes
1answer
37 views

Moving Processes to and from Swap [closed]

Referring to Moving a process to and from swap and other answers which talk about moving processes to and from the swap space for Linux, none of them give a prolific description of the pros and cons ...
0
votes
1answer
122 views

Increase Swap file size that already exists (EC 2 linux)

I created swap file doing this: sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=4096 sudo /sbin/mkswap /var/swap.1 sudo chmod 600 /var/swap.1 sudo /sbin/swapon /var/swap.1 I would like to ...
0
votes
0answers
45 views

Sum of /proc/[pid]/status:VmSwap does not match /proc/meminfo (SwapTotal - SwapFree)

Issue: The sum of all the VmSwap entries inside of /proc/[pid]/status does not match the difference between SwapTotal and SwapFree. More details: I am noticing instances in which /proc/meminfo ...
0
votes
2answers
55 views

Isn't swap file in KVM guests wasteful? Is there a better way?

So I am running a bunch of guests on a bunch of servers and currently my "standard" guest partitioning goes like this: 1GB for /boot 4 - 8 GB for swap the rest for / I allocate various amounts of ...
2
votes
2answers
311 views

Is swap compression in RAM (ZSWAP) benefitial on a Linux server with SSD drives?

I am trying to improve performance (responsivity) of a webserver during rare events of high memory utilization (90%...) where it starts to swap a lot, in order to help manual intervening faster and ...
-1
votes
2answers
59 views

Will any running process be killed if I free the swap memory from my Ubuntu server?

The question (title of this question) came into my thought for the below reason. If anyone gives a solution of that reason then I don't need to free the swap memory. The Reason: After installation ...
2
votes
0answers
101 views

measuring total swap with SNMP when swap is larger than 4TB

We have a system with more than 4TB of swap space. I want to measure it's memory with SNMP (because I'm using MRTG to graph it). SNMP is reporting negative numbers for memTotalSwap. I suspect that ...
0
votes
0answers
81 views

How to investigate which docker container is causing swap to my system?

In a Debian 9 Stretch with docker 19.03.1 I'm using 6 containers and I observe swapping of 125Mo while memory usage never exceed 10% of total. ( usually around 500Mo / 16Go ). for file in /proc/*/...
1
vote
1answer
650 views

Remove swap completely or set swappiness to 0?

In managing a server with 512GB of RAM I encountered a process that keeps consuming swap until it hits 100% of the swap space then stops consuming more (6GB of swap) but keeps working fine (albeit, ...
0
votes
0answers
3k views

swapoff failed: Cannot allocate memory

Server's Output shows the following: # free -h total used free shared buffers cached Mem: 7.7G 7.6G 123M 156K 1.8M 248M -/+ ...
0
votes
1answer
112 views

Intermitent bug on encrypted swap over Ubuntu 18

Wanting encrypt swap and the only script I found to do it as I want is it: sudo -i cd /root mkdir -p ./.myfolder cd ./.myfolder swapsize='4G' curdir=$(pwd) flNmDev="...
1
vote
1answer
407 views

Swapfile mount (/etc/fstab): “swap swap” or “none swap”

There seems to be conflicting information on how to mount a swapfile. swap swap: none swap: both: Both ways work. What is the official recommendation and how does each way affect swapping?
0
votes
0answers
40 views

After enable rules of ipfw my server collapsed

I enable ipfw rules on my mail server. After some time server collapsed. In /var/log/messages is nothing information of my damage. But when I connected monitor, I saw some troubles with swap ...
-1
votes
1answer
97 views

Linux refusing mapped image file created with dd as swap device

Getting the error "WRITE ERROR ON SWAP DEVICE" on boot but all works fine when I change the line: truncate -s $swapsize $flPtDev by cp /swap.img $flPtDev The complete script is the following: ...
0
votes
0answers
39 views

EC2 - Persist instance store swap volume after stop/start

I have an EC2 instance for which I want to configure a swap instance volume. I can do this relatively easily, by launching the instance with the instance store volume attached, and then running the ...
4
votes
1answer
89 views

Swap Memory Anomoly

I am currently experiencing a memory issue on my centos 7.6 distro. It began with my system swapping even though up to 80GB ram should have been available. free -m total ...
1
vote
2answers
2k views

Java crash due to native memory allocation map failure, despite n

A Java 11 application is crashing in a manner that from my understanding is impossible with the settings I have. The application in question runs on Amazon Linux 2, utilizing Java 11. The server is ...
1
vote
1answer
326 views

AWS EC2 Amazon Linux is using swap even if it shouldn't

I have a few ECS servers running various apps. After a few mysterious outages I noticed that the instance is swapping hard and it consumes its IO Burst Balance rendering the instance useless. The ...
1
vote
2answers
536 views

FreeBSD swap usage with mysql

For the past few months, on a few different servers with similar FreeBSD versions and specs, I've been experiencing high swap usage with MySQL while seemingly having plenty of free RAM. FreeBSD 11.2-...
1
vote
1answer
403 views

Increasing swap space and removing previous swap space on ubuntu?

I have a virtual machine (hosted online) with 2Gb swap space. free -m total used free shared buffers cached Mem: 1995 438 1557 37 ...
2
votes
2answers
185 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.
0
votes
1answer
113 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 ...
2
votes
2answers
2k 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 ...
2
votes
1answer
1k 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
2k 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 ...
0
votes
0answers
68 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 ...
0
votes
3answers
297 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 ...
1
vote
1answer
1k 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 ...
2
votes
2answers
989 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
716 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
67 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 ...
0
votes
0answers
408 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 ...
0
votes
1answer
495 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
257 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
2answers
1k 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 ...
1
vote
0answers
369 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
803 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
898 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 ...
41
votes
4answers
32k 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
1k 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 ...
4
votes
0answers
272 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. ...
-1
votes
1answer
271 views

Volatile Linux with a huge tmpfs and swap partition

I want to deploy Linux on user computers in a way state is never preserved between boots (except state saved explicitly by users on external removable devices). System image will be stored on a read-...
0
votes
2answers
419 views

Try to empty buffer and cache

I try to clear the cache and buffer. Because they grow very much and starting use some swap. Will it affect the system? The system running in production. Or is there any other solution? Memory ...
-1
votes
1answer
705 views

Linux - Use disk as RAM [closed]

I have a VM and in it a process that consumes a lot of memory (~200GB). Some sort of in-memory DB. I need to run it on a standard laptop and I cannot recompile it or see the code. I've added 256GB of ...

1
2 3 4 5
7