Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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

MariaDB consuming swap on AlmaLinux 9.4

After upgrading from AlmaLinux 9.3 to 9.4, MariaDB started consuming swap more and more on several servers. Using MariaDB 10.11.8. Having vm.swappiness = 1. MySQLTuner 2.5.3 shows: -------- ...
ivp's user avatar
  • 21
0 votes
0 answers
18 views

Understanding Netdata Warnings/Report

We're getting constant Swap memory Utilization warnings between 70% to even 100%, we have about 7 - 8 applications on this VPS which is deployed on Linode through Runcloud. This isn't happening on any ...
Thor Solutions's user avatar
0 votes
1 answer
137 views

How do you make an encrypted swap partition setup persistent across boots?

I have a procedure which will manually create a plain dm-crypt swap volume, with a random key, which appears to work. This is a QEMU/Ubuntu 22.04 system. However, there's no swap after a reboot, so I'...
QF0's user avatar
  • 223
1 vote
1 answer
130 views

Swap file is not recognized by the Ubuntu server

I've noticed that my Ubuntu server is using smaller swap file then there is available. swapon shows 9GB swap file, but other commands show 1GB swap file Some outputs: swapon --show NAME TYPE SIZE ...
OTETS's user avatar
  • 11
0 votes
0 answers
40 views

Why do I have a large swapfile2 on my system?

I'm running a Digital Ocean Droplet running Debian 11 with 2Gb of memory, and there is a file /swapfile2 that is 6Gb in size, but I don't understand why it's there. There is a /swapfile that is is 2Gb ...
linucks's user avatar
  • 101
0 votes
0 answers
92 views

High latency when using FUSE to pass through to tmpfs + swap

I'm creating a shim layer over an in-memory file system (tmpfs) so that I can intercept the file system commands and do extra processing (the end goal is to replicate the writes over the network for ...
davidchuyaya's user avatar
2 votes
1 answer
208 views

How to Root volume partition without losing the data

We have this scenario : I to increase the disk space of one of our VM, Disk details : root@Test-01:~# blkid /dev/vda2: UUID="0eae0eb4-92ed-45ec-aa99-6d606f17e70a" TYPE="swap" ...
sam23's user avatar
  • 59
1 vote
1 answer
730 views

zram-generator doesn't create zram device

I try to used zram-generator to create a zram device but it doesn't work. I followed the steps listed in the README.md from the github repository. Install zram-generator using one of the methods ...
fbrzggn's user avatar
  • 11
1 vote
0 answers
113 views

Swap space extensively used while enough RAM is available on Ubuntu 20.04.01

On a new dedicated root server with Ubuntu 20.04.01, running only MySQL 8.x the system starts to swap extensively while enough RAM is available. System: RAM 230GB Swap space 64GB InoDB_Buffer set to ...
merlin's user avatar
  • 2,182
3 votes
4 answers
1k views

Server uses 100% swap after fresh mysql installation

I set up a new server with 220G RAM and Ubuntu 22.04.1 LTS. After installing MySQL I changed the mysql config to: innodb_buffer_pool_size = 170G innodb_buffer_pool_instances = 64 ...
Zystrix's user avatar
  • 31
0 votes
2 answers
703 views

High iowait, swap nearly always fully in use

I'm often experiencing slowness on a large server that is used by several users simultaneously, with many CPUs (72) and a decent amount of ram (125gb). Granted, the server runs a lot of stuff so gets ...
dreamer's user avatar
  • 101
3 votes
1 answer
2k views

How to inspect why my service process be killed by Linux?

I have a vital service running a Ubuntu(20.04.1) server. Recently it is always killed by OS. At first I guess that probably is resulted by the OOM(out of memory) operation of OS, so I modified the ...
Leon's user avatar
  • 179
4 votes
2 answers
8k views

How to permanently remove /dev/zram0 as swap in Armbian

My Armbian Bullseye system insists on setting up swap space on /dev/zram0. I don't want it to, as I have created a swap partition that I would prefer to use. But I can't find how to permanently remove ...
mbrampton's user avatar
  • 361
0 votes
1 answer
1k views

Swap used but there is free RAM

I am surprised to see my Ubuntu 20.04 using swap as there is 700G in buffers/cache. It has never done this before. Is something wrong? I feel like it should return RAM used in buffers/cache to be free ...
qq72's user avatar
  • 1
0 votes
1 answer
330 views

Does my swapping server with ~80GB available RAM need even more?

I'm administering a Debian Linux x86_64 server with 125GB RAM, a 10GB swap partition and a swappiness value of 60. A free -gw output prints: total used free shared ...
eheu's user avatar
  • 3
1 vote
1 answer
2k views

CPU Limiting & kswapd0 Advice Saught

Through hours of testing, I have found that the nextcloud desktop sync client for ubuntu 20.04 (appimage or ppa) both seem to have a bug to where... if a common nextcloud file sync error occurs , ...
Maestro223's user avatar
-1 votes
1 answer
385 views

Manually trigger swappiness?

I am playing around with ZFS on Proxmox and have noticed that swappiness never seems to kick in. The swappiness value is currently set to 50 but never swaps unless I reach 100% RAM usage acting as if ...
Toodarday's user avatar
  • 235
2 votes
1 answer
2k views

Restricting swap usage for a systemd service in Ubuntu 18.04

I am trying to restrict the swap usage of a process using MemorySwapMax as mentioned in the doc with Ubuntu 18.04. Environment ubuntu@vrni-platform:/usr/lib/systemd/system$ uname -a Linux vrni-...
tuk's user avatar
  • 343
0 votes
1 answer
797 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.
newbie's user avatar
  • 3
0 votes
0 answers
171 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 /...
bhomass's user avatar
  • 101
0 votes
1 answer
996 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, ...
Luke Johnson's user avatar
0 votes
0 answers
344 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, ...
Luke Johnson's user avatar
0 votes
0 answers
38 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 ...
user's user avatar
  • 103
0 votes
3 answers
890 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. ...
merlin's user avatar
  • 2,182
0 votes
0 answers
32 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 ...
Beginner's user avatar
  • 163
1 vote
2 answers
2k 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 ...
StevieD's user avatar
  • 562
0 votes
1 answer
791 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 ...
The MW's user avatar
  • 103
0 votes
0 answers
162 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 ...
tchspprt's user avatar
1 vote
1 answer
2k 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, ...
Nuno's user avatar
  • 643
0 votes
0 answers
97 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 ...
gregn3's user avatar
  • 101
2 votes
1 answer
2k 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 ...
Mathieu's user avatar
  • 45
1 vote
1 answer
248 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 ...
Ygor Montenegro's user avatar
1 vote
3 answers
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,...
dimisjim's user avatar
  • 245
0 votes
1 answer
101 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-...
Amos's user avatar
  • 141
0 votes
2 answers
103 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 ...
Amos's user avatar
  • 267
1 vote
2 answers
1k 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 ...
John the Traveler's user avatar
1 vote
0 answers
73 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 ...
Tolsadus's user avatar
  • 1,193
14 votes
1 answer
6k 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 ...
Kevin M's user avatar
  • 299
0 votes
3 answers
2k 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 ...
shorif2000's user avatar
0 votes
2 answers
2k 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 ...
CzipO2's user avatar
  • 157
-2 votes
1 answer
616 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 ...
Aaron John Sabu's user avatar
0 votes
1 answer
5k 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 ...
Chris Muench's user avatar
0 votes
2 answers
1k 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 ...
velis's user avatar
  • 233
3 votes
2 answers
1k 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 ...
Ján Lalinský's user avatar
-1 votes
2 answers
2k 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 ...
Shamim's user avatar
  • 101
2 votes
0 answers
182 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 ...
vy32's user avatar
  • 2,158
1 vote
0 answers
1k 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/*/...
idiocrate's user avatar
2 votes
1 answer
5k 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, ...
Gizmo's user avatar
  • 289
0 votes
1 answer
17k 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 -/+ ...
user533509's user avatar
0 votes
1 answer
441 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="...
Paul's user avatar
  • 1

1
2 3 4 5
7