Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
1 vote
2 answers
377 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 ...
user avatar
  • 161
0 votes
1 answer
47 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 ...
user avatar
  • 1
0 votes
0 answers
16 views

hard disk have enough swap area by df -h but in task manager is showing swap less

hard disk have enough swap area by df -h but in task manager is showing swap less how to done this? https://i.stack.imgur.com/aUEqI.png https://i.stack.imgur.com/qEvbC.png
user avatar
0 votes
1 answer
48 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 ...
user avatar
  • 3
0 votes
1 answer
158 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 , ...
user avatar
0 votes
0 answers
13 views

Swap settings for GPU cluster

I am administering a GPU cluster which is MOSTLY used to do Deep Learning and I have limited sys admin knownledge. I noticed recently that the swap was set to default (swappiness at 40) and that some ...
user avatar
  • 113
-1 votes
1 answer
149 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 ...
user avatar
  • 175
1 vote
1 answer
380 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-...
user avatar
  • 295
0 votes
1 answer
225 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.
user avatar
  • 3
0 votes
0 answers
77 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 /...
user avatar
  • 101
0 votes
1 answer
319 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, ...
user avatar
0 votes
0 answers
57 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, ...
user avatar
0 votes
0 answers
28 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 avatar
  • 103
0 votes
3 answers
133 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. ...
user avatar
  • 1,983
0 votes
0 answers
27 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 ...
user avatar
  • 162
0 votes
2 answers
309 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 ...
user avatar
  • 412
0 votes
1 answer
409 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 ...
user avatar
  • 103
0 votes
0 answers
125 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 ...
user avatar
1 vote
1 answer
454 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, ...
user avatar
  • 431
0 votes
0 answers
51 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 ...
user avatar
  • 101
1 vote
1 answer
480 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 ...
user avatar
  • 35
1 vote
1 answer
81 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 ...
user avatar
0 votes
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,...
user avatar
0 votes
1 answer
66 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-...
user avatar
  • 41
0 votes
2 answers
89 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 ...
user avatar
  • 237
1 vote
2 answers
811 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 ...
user avatar
1 vote
0 answers
43 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 ...
user avatar
  • 1,103
14 votes
1 answer
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 ...
user avatar
  • 299
0 votes
3 answers
785 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 ...
user avatar
0 votes
2 answers
776 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 ...
user avatar
  • 127
-2 votes
1 answer
172 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 ...
user avatar
0 votes
1 answer
3k 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 ...
user avatar
0 votes
2 answers
487 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 ...
user avatar
  • 233
3 votes
2 answers
846 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 ...
user avatar
-1 votes
2 answers
519 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 ...
user avatar
  • 101
2 votes
0 answers
120 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 ...
user avatar
  • 1,928
1 vote
0 answers
546 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/*/...
user avatar
1 vote
1 answer
3k 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, ...
user avatar
  • 279
0 votes
1 answer
9k 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 -/+ ...
user avatar
0 votes
1 answer
284 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="...
user avatar
  • 1
4 votes
1 answer
2k 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?
user avatar
  • 1,717
0 votes
0 answers
54 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 ...
user avatar
-1 votes
1 answer
113 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: ...
user avatar
  • 61
0 votes
1 answer
158 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 ...
user avatar
4 votes
1 answer
121 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 ...
user avatar
1 vote
2 answers
5k 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 ...
user avatar
1 vote
1 answer
905 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 ...
user avatar
1 vote
2 answers
995 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-...
user avatar
1 vote
1 answer
888 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 ...
user avatar
2 votes
2 answers
516 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.
user avatar
  • 21

1
2 3 4 5
7