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
1answer
56 views

How to trigger swap space usage on linux?

Is there a linux command or process I can run to trigger or force it to use swap at a high rate, e.g. exhausting 50% of swap space? I tried copying files but only see memory usage going up and down.
0
votes
0answers
35 views

can not stop my server from consuming 10 virtual cores on kswapd0

I have a 40 vcore machine. something happened and it has been running 20 at 100% forever. Htop shows a large number of ./kswapd0 processes. I tried techniques like echo vm.swappiness=0 | sudo tee -a /...
0
votes
1answer
25 views

Windows page file best practices in regards to dump file?

Last night we had a critical server go down. Running Windows 2012R2. It appears to have been a random blue screen but we can't find much in the logs. We do not seem to have a dump file. Investigating, ...
0
votes
0answers
12 views

Windows page file best practices in regards to dump file?

Last night we had a critical server go down. Running Windows 2012R2. It appears to have been a random blue screen but we can't find much in the logs. We do not seem to have a dump file. Investigating, ...
0
votes
0answers
15 views

Optimal Swappiness in Parallel R Processes

I understand that optimal swappiness depends on the application. Database servers often have a swappiness close to zero, while in many other cases it is apparently recommended to keep the default ...
0
votes
3answers
90 views

Why does the system swap while it has enough RAM and is this harmfull?

I operate a 64GB RAM root bare metal ubuntu 16.04 server with SSDs that is under pretty heavy load. Now I learned that cloud servers generally disables swap as it can wear the SSDs in the long run. ...
0
votes
0answers
34 views

server in intense swapping - can it do any work?

I have a computer server with 128 cores and 528G RAM managed by SLURM on Ubuntu 18.04. When the required memory for each of many jobs is underestimated, the server takes hours to respond to simple ...
0
votes
0answers
25 views

Non-obvious restrictions in virtual servers

I apologize in advance for a beginner question. What attributes should I check for besides the obvious CPU, RAM, storage and bandwith parameters when ordering a virtual server? Two settings which have ...
0
votes
1answer
57 views

“non-bind mount source /swapfile is a directory or regular file” warning

I created a swap file on an ec2 instance following this procedure: https://aws.amazon.com/premiumsupport/knowledge-center/ec2-memory-swap-file/ When I run sudo findmnt --verify I get the following ...
0
votes
1answer
78 views

Ubuntu 18.04, 1.5G Swap 100% used (32G RAM), soft RAID1. How to increase SWAP size?

I have a production server, recently, I have seen server becomes slow sometimes, and SSH is slow, and once get into the terminal, even press ENTER is slow. When the server is OK, I checked the memory ...
0
votes
0answers
77 views

AMD Optane alternative

I want to have an Optane features with my Ryzen build: high TBW and high I/O. Disk space irrelevant (like MEMPEK1W064GA, 64GB would be enough for me). And it would be nice if I can utilize the full ...
1
vote
1answer
120 views

Swap being used when not necessary

I have: vm.swappiness = 1 as suggested here to prevent using Swap when there is plenty of available memory. (0 would completely disable swap, as far as I understand) In frequent cases, I end up with, ...
0
votes
0answers
36 views

Should I compile Node.js from source on an Amazon Lightsail smallest instance?

I'm using the cheapest Amazon Lightsail instance to set up an Nginx + Node.js server. I have compiled Nginx successfully already, however it's taking too long to compile Node.js. Is this is even a ...
0
votes
1answer
198 views

Do I need a SWAP partition? [duplicate]

I am going to remake a server with Ubuntu 20.04 It will have 6 GB of RAM, a 20 GB SSD for the operating system, and a 100 GB SSD for data. Should we make a SWAP partition ? If so, how many GB are ...
1
vote
1answer
64 views

Memory Running Low - VM Swapfile vs Host Cache

I have server running a VMware 5.5 hosting 3 VMs which are using all memory of my server. I've just added a 120GB SSD but I don't know what tool to use it to smooth performance a bit. Swapfile or host ...
1
vote
3answers
1k views

AWS ubuntu image has no swap with kernel 5.x

Just built a new AMI recently, based on the latest 18.04. Did also an apt upgrade when provisioning it, in order to have the latest packages as well. Problem is that this new AMI has no swapfile in it,...
0
votes
1answer
42 views

VPS's memory consumption [duplicate]

I have a VPS with ubuntu 18.04.4 with 2gb and 512mb swap. Working regularly with 600-800mb and 100mb swap and all is well. 2 weeks ago I updated the WAR (tomcat) and the memory jumped to 1.2gb and 400-...
0
votes
2answers
66 views

Ubuntu swap and RAM

I have an Ubuntu 18.04 which mostly runs tomcat. The memory consumption is between 800mb-1gb and I have 2gb total. The swap is 512mb and the used swap is 480mb. I set clamav to run at 3am and it ...
0
votes
2answers
468 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
34 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
4k 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
3answers
255 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
419 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
85 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
1k 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
2answers
208 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
588 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
231 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
104 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 ...
1
vote
0answers
267 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
2k 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
7k 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
199 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="...
2
votes
1answer
1k 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
50 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
101 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
82 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
104 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
4k 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
585 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
802 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
650 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
251 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
143 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
3k 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
2k 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
3k 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
92 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
622 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
2k 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
2 3 4 5
7