Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [swap]

Swap space is an area of the hard disk that serves as an overflow when the computer memory is full. The memory used by inactive applications is partially written out to disk to make room for other applications and for the disk cache for active files.

0
votes
2answers
63 views

Is swap a partition, but not a file system?

Is swap a partition, but not a file system? Is that the reason why df doesn't show it? Is there a command which can list all the partitions (whether they hold file systems or not)? Thanks. $ df -h ...
6
votes
0answers
91 views

Why can't I “swapoff” when there's plenty of memory?

I've recently noticed that even though there's a lot of memory on my system: # free -m total used free shared buffers cached Mem: 15965 9680 ...
1
vote
1answer
29 views

Sharing swap partition between Ubuntu and Kali

I am making a fresh install dual-boot for kali and ubuntu. I had this question in my mind if I will create a swap-area of 32GB (16 Gb RAM) will it work for both the Linux distro?
38
votes
6answers
2k views

How do I use swap space for emergencies only?

I have a Debian (Buster) laptop with 8 GB RAM and 16GB swap. I'm running a very long running task. This means my laptop has been left on for the past six days while it churns through. While doing ...
1
vote
0answers
21 views

High swapiness on VM host

Would setting very high swappiness so that more RAM could be assigned to VM impact performance? I would assume that VM related tasks wouldnt be swapped, and the tasks within the VM.
0
votes
0answers
28 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
3answers
134 views

how to know the right swap size for hadoop Linux machines

we are using many hadoop clusters for now we are using swap size - 16G free -g total used free shared buff/cache available Mem: 125 ...
1
vote
1answer
120 views

Why does swappiness not work?

We have a RHEL 7 machine, with only 2G of available RAM: free -g total used free shared buff/cache available Mem: 31 28 0 ...
1
vote
1answer
96 views

How to limit swap usage in Solaris?

I have an Oracle Solaris 11.3 which has 128 GB of Memory (RAM) and 80 GB of Swap. I want to limit the use of swap space (not its size just the usage). I know in more modern linux distros ...
0
votes
0answers
13 views

How to resume system (from disk) manually

I suspend the system to disk using s2ram. When I reboot into shell (busybox sh) and run resume $SWAP ($SWAP is my swap partition), it only writes a message that says resume is started but nothing ...
2
votes
0answers
32 views

Swapping takes 20% of cpu cycles, is this thrashing? [closed]

I run a long bootstrapping compilation. I have 16G of physical memory but my main process attains 32G virtual memory. UPDATE (response to Austin Hemmelgarn's comment): This is on a two core Intel ...
1
vote
1answer
52 views

Will swap file engage automatically when I write too much to /dev/shm

Text analytics programming today. My program is going to write about 45 million small temporary files to /dev/shm and their size estimate is 177.0 GB. I'm going to delete them soon after the next ...
0
votes
1answer
38 views

Process is stuck with more virtual memory than physical memory available

I have a process that seems to be stuck in an interesting way. top shows this: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 38984 gergely 20 0 332m 276 184 S 0.7 ...
0
votes
0answers
15 views

Migrate old swap to slow storage

On a machine I have 2 swap partitions: A fast one (on SSD) and a slow one (on magnetic media). I use the fast one as the first priority. Can I migrate the pages that have been untouched in the past, ...
1
vote
1answer
148 views

Swappiness set at 100, but is empty nonetheless

Backstory: So, I have a vm running and managed to open enough browser tabs to make linux mint freeze completely, by filling up both swap and ram. Then swappiness was at 60. So after this happened a ...
1
vote
0answers
31 views

How to force the kernel to always maintain at least some page cache?

Is there any way to force the kernel to always maintain at least some page cache for writeback caching purposes, even when faced with memory pressure? I have a rather special use case, where swapping ...
0
votes
0answers
176 views

Why is my system ignoring vm.swappiness?

I have previously set vm.swappiness to 0, which should mean my system only swaps when RAM is totally full. $ cat /etc/sysctl.d/99-sysctl.conf kernel.sysrq = 1 vm.swappiness=0 $ sysctl vm.swappiness ...
-2
votes
1answer
91 views

Swap partition and swap file at the same time?

I've added the swap file while having the swap partition: NAME TYPE SIZE USED PRIO /swapfile file 4G 6M -1 /dev/dm-0 partition 1,9G 0B -2 The size of RAM is 4GB. I'm on ...
0
votes
1answer
18 views

Can I distinguish between swap thrashing and non-swap high IO latency somehow?

My system becomes much, much less responsive, every time I clone a VM image. I'm using virt-manager, and I can see the IO is performed by several qemu-img convert threads. I tried to gather some ...
0
votes
2answers
25 views

How to record max value of swap during period?

I have some script that consumes a lot of swap memory. How can I measure maximum swap load during script execution period ? Is there any specific bash cli tool for my task ?
0
votes
0answers
18 views

Set minimal amount of disk read cache

I have slow HDD and 5.5 GB of RAM, and thus I'm using zram and no any disk swap. According to my observations, the lack of disk cache has much worse impact on performance than active swapping. While ...
3
votes
1answer
31 views

forcing a process into swap and restoring it into memory

I'm doing some tests in Debian Linux on an arm sbc. There seem to be some issues which I couldn't confirm if it may be related to my zram swap setup. Is there a way when I run a particular program to ...
2
votes
0answers
395 views

Dependency failed for swap, (boots warning at startup) [closed]

After accidentally formatting by windows (I use kali alongside win as dual boot), I entered into grub rescue, and did the usual stuff to recover grub set prefix=(hd0,gpt2)/boot/grub set root=(hd0,...
5
votes
1answer
188 views

Ubuntu 14.04 32 bit swapfile max 60k issue

Have a strange issue where suddenly all my swapfile (1gb each) get truncated to only use 60k . I can remove/recreate etc but whatever i do , the max seems limited to 60k with following message in ...
-1
votes
1answer
153 views

Swap on secured partition is not being mounting on boot

I've got a work laptop Lenovo P51. There is Win10 on a secured partition. I installed Ubuntu 18.04 on a secured partition as well. Also, I've created a secured partition for swap, but it doesn't mount....
8
votes
1answer
867 views

How can I zerofill the /swapfile without wiping out what makes it a swapfile?

I have a script that I run in order to optimize the disk space prior to backing up a virtual guest (really doesn't matter too much which hypervisor is used). Modern Ubuntu versions (e.g. 18.04) seem ...
0
votes
0answers
73 views

Building custom kernel with kswapd0 disabled

What are the necessary kernel .config options changes for a kernel with disabled kswapd0 ? ie. what options to ensure exist inside kernel .config file such that it builds with kswapd0 disabled? The ...
1
vote
1answer
26 views

Order of magnitude of when vmstat's swap si/so must be considered unhealthy?

With vmstat I can see in the swap si/so columns how many blocks are read/written from/to the swap per second. I have a system with tight memory and therefore need to make use of the swap. Which is ...
1
vote
3answers
150 views

How much swap space does Solaris 11.3 need to run a compiler?

I have a desktop with a Core i5 3rd gen and 4 GB of RAM. I am using the machine to test building some free software projects I contribute to. The machine serves no other purpose. I allocated 4 GB ...
3
votes
2answers
267 views

What is using my swap space?

On a Debian Linux 3.16 machine, I have 244 MB of swap space used: # free -h total used free shared buffers cached Mem: 94G 36G 57G 1....
1
vote
2answers
271 views

Can't create a swapfile for Solaris 11.3

My compiles are failing on Solaris 11.3 due to out of memory kills. The box is an UltraSPARC workstation with 600GB drives and 8 GB of RAM and a fresh OS install. It is absolutely befuddling there's ...
1
vote
1answer
41 views

POSTing large files into Apache causes swap

The setting that I have is a compute with only 2Gb of free memory. When I upload large images (3.5 Gb) through the Horizon (which uses apache2) the image fills the cache and starts to swap. I ...
3
votes
0answers
201 views

How can `cat /proc/$pid/cmdline` take several seconds?

I encountered this strange behavior yesterday on one of our servers. ps, pgrep and htop (on startup) were very slow. strace ps showed that read('/proc/$pid/cmdline) took several seconds on some ...
-1
votes
2answers
372 views

Why Linux does not clean up disk caches and swap automatically?

For example, when I archive a few gigs of files (using tar), Linux uses quite a lot of disk caching (and some swap) but never cleans it up when the operation has completed. As a result, because there'...
1
vote
2answers
329 views

What's the difference between /tmp and /swap and /system/volatile in Solaris 11

My Solaris 11 df output has different swap entries root@hostname:/# df -h | egrep "tmp|swap" /tmp 108G 5.1G 103G 5% /tmp swap 150G 119G 31G ...
1
vote
1answer
77 views

Why is my Fedora Linux system swapping like crazy? [closed]

Every few days, at differing times my system starts swapping like crazy and the load goes extremely high such that the system is very slow to respond. Sometimes I have waited 4 hours for it to recover,...
0
votes
1answer
422 views

Ubuntu 16.04 swap space fills up, never releases

Over the course of about a week or so, our Ubuntu 16.04 server's swap space fills up and never releases it, causing other cascading problems on the server. Namely, an instance of Tomcat running Solr ...
0
votes
1answer
57 views

Doesn't work create swap on partition

I want to create swap on /dev/sda3, but parted -l doesn't show me. Number Start End Size File system Name Flags 1 1024kB 17.0GB 17.0GB ext4 2 17.0GB 17.5GB ...
0
votes
0answers
35 views

How to limit kernel cache for copying large files

Does anyone know how i can limit the cache when the system is copying large files? The scenario is that i have about 1.5 GB or ram available and when i upload an image to the disk the cache gets ...
2
votes
3answers
81 views

Swap memory, and when the OS starts using it

We are running Red Hat Enterprise Linux version 7, and all our machines are virtual machines. Our memory resources are limited and physical RAM costs money so we are thinking of increasing swap ...
1
vote
1answer
220 views

can a full ram-disk cause swapping?

I have a application that is using /opt/otrs/var/tmp for caching a lot of temporary data. The vendor suggest that one option could be also to put this directory on a ramdisk (If you have enough RAM). ...
0
votes
0answers
52 views

Log sysctl changes to a particular variable

Is there any way I can log (preferably only a particular variable, vm.swappiness) because I want to find when and what changes vm.swappiness value to 1 during boot even though I have configured it to ...
5
votes
1answer
201 views

Make or force tmpfs to swap before the file cache

Consider the following scenario. You have a slow read-only media (e.g. write-protected Thumb Drive, CD/DVD, whatever) that you installed Linux on (not a Live CD per se, but a normal build), and use it ...
0
votes
0answers
44 views

Am I ok to use a hidden 1MB partition for Swap?

I'm about to install Linux Mint. I've already set everything up (UEFI config, freed partition, etc). I'd like to use the recommended settings to be safe, but it says that it'll use some 1MB partition ...
0
votes
1answer
1k views

No swap on Manjaro

So I recently installed Manjaro, used default installation options, and installed it on a partition of nearly 275GiB. I have a low end device with only 4 GB of RAM space. My device is usually slow so ...
0
votes
0answers
69 views

how to restore swap partition

I have a problem. I have tested some commands to free my swap: $> free && sync && echo 3 > /proc/sys/vm/drop_caches && free and swapoff -a Orginally I have a swap ...
0
votes
1answer
126 views

Question about RAM and SWAP on Windows Host OS

i've read and appreciated the original post by Thompsonn. At work i'm forced to use Windows as the host OS (I work with and prefer Linux) because of the mandatory requirements in certain applications ...
20
votes
1answer
491 views

Is this how linux paging should behave? (because it seems awful…)

When my linux system gets close to paging (i.e., in my case, 16GB ram almost full, 16GB swap completely empty) if a new process X tries to allocate some memory the system completely locks. That is, ...
0
votes
1answer
228 views

Best way to use and install Linux (Ubuntu) using two hard drives

I'm currently looking to switch from Windows 10 to Ubuntu 18.04 LTS (not dual-booting, Ubuntu only). On Windows I've used my 128GB SSD for OS-files almost exclusively, while all other stuff goes to ...
6
votes
1answer
2k views

Read error on swap device

After a long suspended session my system gives me this message Read-error on swap-device (8:0:441040) (this is the last one received). It reboots in some way, because there are not more programs ...