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.

63 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
722 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. ...
Curtis's user avatar
  • 41
4 votes
1 answer
758 views

Apache is not using SWAP and it's reporting page allocation failure

Check the logs: httpd: page allocation failure. order:4, mode:0xd0 Call Trace: [<ffffffff8000f696>] __alloc_pages+0x2ef/0x308 [<ffffffff80017a40>] cache_grow+0x139/0x3c7 [<...
Spacedust's user avatar
  • 568
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
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
3 votes
2 answers
347 views

Server using swap with plenty resources left

I have a Centos 7 with a swap of 256 MB. I have at least 1GB o free RAM memory all the time and my CPU never gets over 60% of usage. But anytime I check the swap use it's using about 200 MB! My ...
Gil's user avatar
  • 39
2 votes
1 answer
182 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
2 votes
0 answers
175 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,148
2 votes
2 answers
662 views

Active process swapping despite free memory

For some reason our system starts swapping (actively used memory) at around 60GB used memory. (see edit below, it seems I/O and disk cache usage, even of previously run processes has an effect) ...
b.buchhold's user avatar
2 votes
0 answers
4k 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 ...
YuTendo's user avatar
  • 21
2 votes
0 answers
260 views

Linux (Debian 7 x64) swapping activity despite lots of free memory

Yes, I have reduced vm.swappiness a lot: % sysctl -a | grep swap vm.swappiness = 1 Memory is mostly free: % cat /proc/meminfo | head MemTotal: 8070592 kB MemFree: 2619580 kB ps_mem....
LetMeSOThat4U's user avatar
1 vote
1 answer
699 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
110 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,172
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 vote
0 answers
72 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
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
1 vote
0 answers
190 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 ...
Server Fault's user avatar
  • 3,784
1 vote
0 answers
772 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 ...
Confused's user avatar
1 vote
1 answer
186 views

Can swapped memory be read directly by java?

When the kernel swaps stuff to disk, can this data be subsequently read by the process directly from swap? or it must absolutely be put back into physical ram (thus generating si so activity in vmstat)...
Bob's user avatar
  • 49
1 vote
2 answers
2k views

Linux swapping blocks system (freeze)

I have a problem with my Debian Servers. We run 4 different server which all have Intel CPUs and 128GB of RAM. Two of them run Wheezy, two of them run Jessie. We run a Java software on those systems ...
mr.simonski's user avatar
1 vote
1 answer
268 views

New Swap Drive - Linux Hangs during Boot

An application checked the swap space during install and required it to be the same amount as ram. So i added a new disk (Server is a VM) and done the following: swapoff /dev/mapper/ol-swap vgcreate ...
embedded's user avatar
  • 476
1 vote
1 answer
911 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 ...
NIX's user avatar
  • 11
1 vote
0 answers
599 views

(mysqld), uid 88 inumber 281675 on /: filesystem full

I created a swap file that was a little to big. So I deleted it. The swap file is gone, but the free space is never reallocated. I have rebooted, fdisk is no help, not sure where to go from here. The ...
nix's user avatar
  • 145
1 vote
0 answers
438 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=...
Mascarpone's user avatar
1 vote
0 answers
374 views

How to copy locked swap files in ESXi?

Based on this question : How to disable swap files in ESXi?. The main answer states that it is possible to extract data from the swap files (for exemple using strings) so I tried to make a simple ...
user3779430's user avatar
1 vote
1 answer
730 views

Why is /proc/meminfo reporting misleading SwapTotal after suspends

Consider this: [skrat@apex geri]$ cat /proc/meminfo | grep SwapTotal SwapTotal: 18438120 kB [skrat@apex geri]$ swapon -s Filename Type Size Used ...
skrat's user avatar
  • 515
1 vote
1 answer
1k views

OpenVZ Swap space?

From what I understand with OpenVZ you just increase privvmpages and vmguarpages for the swap memory, and even though the guest shows it as RAM the host will swap it were possible. Am I right here or ...
Not Available's user avatar
1 vote
2 answers
2k 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 ...
Igor Semenov's user avatar
0 votes
0 answers
38 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
86 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
0 votes
1 answer
994 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
0 answers
166 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
0 answers
337 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
1 answer
979 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
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
0 votes
0 answers
160 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
0 votes
0 answers
95 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
0 votes
2 answers
102 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
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
1 answer
439 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
0 votes
0 answers
85 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 ...
Artem Khmil's user avatar
0 votes
1 answer
5k 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 ...
Jason Oon's user avatar
0 votes
1 answer
396 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 ...
Marco Schuster's user avatar
0 votes
0 answers
546 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 ...
James McDonnell's user avatar
0 votes
1 answer
2k 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 ...
prashma's user avatar
0 votes
0 answers
365 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 ...
fromthestone's user avatar
0 votes
0 answers
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 ...
loicmathieu's user avatar
0 votes
1 answer
182 views

Server responsiveness and swapping

I know how swapping basically works, why it's automatic and why it's generally a good thing. There is, however, a common scenario where I wish I had more control. I write LOB web applications with ...
John's user avatar
  • 123
0 votes
1 answer
528 views

coreos: Why is there no default swap partition?

The standard install of coreos seems to come without a defined swap partition and swap setup. What is the reason for that? Would it be recommended do add swap space in coreos node, which works as ...
Mandragor's user avatar
  • 231
0 votes
0 answers
327 views

Red Hat Enterprise Linux 6 lvremove succeeds but causes system to not boot

I started with a fresh install of RHEL 6, and it created a default swap as a logical volume (/dev/vg_hostname/lv_swap), along with the root (/dev/vg_hostname/lv_root) mounted as / I then created a ...
ray_voelker's user avatar