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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

-2
votes
0answers
42 views

How to solve “timed out and dependency failure” while booting my Kali linux Rolling?

I have been using kali linux for 2 years .Today when I boot as usual Kali Linux shows "timed out and dependency failed" and stops booting above pic shows fstab file This above pic i analyze with ...
2
votes
2answers
68 views

Why does Linux write to swap space even if the system has available storage while copying a big file to somewhere?

I have been noticing that if I copy a file to some storage device (the system's HDD, SSD, or to a thumbdrive) a small amount of data (20 - 30 MB) is written to the swap space - and the count increases....
0
votes
1answer
57 views

MacOS,no swap commands?

Usually on various unix flavours for swap we have Those commands to see swap usage and activation of swap On Linux free swapon/off On Hpux swapinfo swapon/off On AIX swap ...
2
votes
1answer
61 views

Is there a per-user swap file?

I found out, I want to encrypt a swap, but it won't be detected by other users, or more like even corrupted. So swapfile for each user sounds like a nicer concept. Then it would be encrypted if dm-...
2
votes
2answers
68 views

Why does RHEL use swap even when vm.swappiness = 1?

RHEL 7.2 memory use, per free -m: total used free shared buff/cache available Mem: 386564 77941 57186 687 251435 306557 Swap: ...
4
votes
3answers
133 views

Linux swap file creation and management

I want to increase my swap size to be able to have the hibernate option. First, I tried to add some swapfile. I followed https://bogdancornianu.com/change-swap-size-in-ubuntu/ and typed this in my ...
5
votes
3answers
169 views

Despite ` vm.swappiness=100`, Mint system freezes, yet swap underused

My Mint 18.1 system often freezes for approximately 10 minutes due to running out of memory, as per a widget which shows 100% memory use at freeze time. SysRq + "Raising Skinny Elephants Is Utterly ...
1
vote
0answers
17 views

Hibernation with encrypted home and swap without initramfs

I have a Linux setup with an encrypted /home/<username> (LUKS) and without an initramfs. I currently have an unencrypted swap partition, intended for hibernation. For security reasons, I would ...
2
votes
0answers
42 views

Do I have a swap space leak in FreeBSD?

I have a system with 16G RAM and 23G Swap (6 x 3TB disks in ZFS), currently the swap sits at 98% but I can only see 5G of ram used. I have checked all possible resources to find who is using the swap ...
1
vote
0answers
23 views

How can I enable asynchronous swapping using a kswapd thread in a cgroup resolution?

I would like to enable active swapping (using a background daemon) on my cgroup even before the entire system is suffering memory shortage. I have a 128GB Linux host and a cgroup that is limited to ...
-1
votes
1answer
93 views

error messages::ext4-fs error(device dm-0) after write-error on swap device

recently, i moved fedora29 into the desktop harddrive from external hard drive (Miraculously, i installed fedora29 on external hard drive anyway ^^:) as installed as soon, it was too slow. i added up ...
0
votes
1answer
91 views

Why are there no values for 'shared', 'buff/cache' and 'available' in the swap line of free?

Why are the last columns empty in the swap line? $ free total used free shared buff/cache available Mem: 3912864 2255460 315388 249068 1342016 ...
0
votes
2answers
40 views

Why do we need both mkswap and /etc/fstab to set up swap?

Given $ cat /etc/fstab ... /dev/mapper/lubuntu--vg-swap none swap sw 0 0 why do we still need: $ sudo swapoff /dev/mapper/lubuntu--vg-swap $ sudo mkswap /dev/...
0
votes
1answer
41 views

Can't log in desktop environment after moving `/` and `/home` into different LVs and enlarge swap

I enlarged LV swap from 1G to 4G. I also moved / and /home in a single PV to two different LVs, by shrinking LV root and create LV home on the freed space, and then following https://askubuntu....
0
votes
2answers
66 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 ...
9
votes
0answers
265 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
49 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
3k 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
36 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
174 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 ...
2
votes
1answer
254 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
213 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
15 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
34 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
111 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
66 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, ...
2
votes
0answers
220 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
34 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 ...
1
vote
0answers
294 views

How do I make my system only use swap when RAM is totally full?

In the past, setting vm.swappiness to 0 meant the system would only swap when RAM was totally full. $ cat /etc/sysctl.d/99-sysctl.conf kernel.sysrq = 1 vm.swappiness=0 $ sysctl vm.swappiness vm....
-2
votes
1answer
154 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
23 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
20 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
32 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
566 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
200 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
202 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
893 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
89 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
30 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
183 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
369 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
349 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
45 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
239 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
518 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
420 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
100 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,...