Skip to main content

Questions tagged [swap-file]

Swapfile is commonly refers to a file backed storage for paging. (aka swapping)

Filter by
Sorted by
Tagged with
0 votes
1 answer
84 views

Managing LUKS encrypted swap files/volumes. Manual mounting on remote dedicated servers, boot behavior, and fstab settings

I would like to setup an as simple as possible encryption at rest solution for a remote dedicated server. The host I am using will provide physical disks and there is no off the shelf solution for ...
Uzer's user avatar
  • 101
1 vote
1 answer
40 views

Can offset of swapfile change?

If you want to hibernate using a swapfile, you need to set the resume_offset kernel parameter to the swapfile's offset in the partition. You can find its offset with filefrag -v /swapfile. [1, 2] I'm ...
user2623008's user avatar
3 votes
1 answer
633 views

How to deal with huge pagefile (committed memory) usage created by ASUS LightingService?

I have an Asus TUF Gaming laptop that I have owned for around a year. I am running Windows 11 on it. Recently, I noticed a significant increase in memory usage, specifically from higher page file ...
Farshid Nasrollahzadeh's user avatar
1 vote
1 answer
110 views

dphys-swapfile on btrfs volume fails

I have used dphys-swapfile with the default path of /var/swap and a 2048M swap file. However, since /var/swap is on a SD card, I wanted to move the swap file to a magnetic disk. So I ran sudo dphys-...
user149408's user avatar
  • 1,100
3 votes
1 answer
200 views

Cannot find swap device

I'm using Pop OS 22.04. GRUB isn't used. Here is the procedure I've followed in order to activate the swap fich=/swap/swapfile truncate -s 0 $fich chattr +C $fich btrfs property $fich compression ...
david.perez's user avatar
0 votes
2 answers
298 views

Cannot use free space for swap partition

I am trying to increase the swap space on a CentOs-7 VM. I was running a program that crashed on the VM complaining about running out of memory. I thought increasing the swap space might fix the issue....
Mohammed Arshaan's user avatar
1 vote
2 answers
149 views

Differences swap to file and (usual) swap for VMware guest

I would like to ask about the main differences of "swap no hibernate" and "swap to file" in case of a virtual machine. By default I choose swap without hibernate because that's ...
l4jos's user avatar
  • 13
0 votes
1 answer
310 views

should i create swap space in my laptop?

My Laptop has i7 10th gen + 8GB ram NVIDIA GeForce MX230 2Gb graphic card my daily usage inteliiJ (3-4 instance), chrome (15-20 tabs), postman (1 instance), VS code(2 instance),
Uvraj Singh's user avatar
0 votes
1 answer
156 views

Ubuntu stuck at HP logo after trying to setup swapfile for hibernation

I use Ubuntu 20.04 LTS which I installed dual boot to Windows. I wanted to add Hibernation as an option. So I installed pm utilities and tried sudo pm-hibernate It did not work. I read somewhere that ...
Adhesh Sagar's user avatar
1 vote
1 answer
758 views

Windows 10 Swapfile/pagefile on D: drive not being used

I am having issues mainly with backup software like DPM, where swapfiles cannot be excluded, and the recommendation seems to be to put the swapfile on a second disk/partition that is not being backed-...
Andreas Reiff's user avatar
2 votes
1 answer
6k views

How to delete swap file in ubuntu?

I am trying to delete the swap file by the following link: https://www.digitalocean.com/community/questions/delete-swap-file However, when I type: sudo rm /swapfile I am getting the following error: ...
khalidh's user avatar
  • 145
2 votes
1 answer
3k views

What kind of storage would nowadays be good for swap partitions (Linux, Windows)? If NVMe SSD is used, how will this impact longevity?

Does it still make sense to use a good old magnetic disk for this purpose, maybe a RAID 0 configuration?
user2943111's user avatar
0 votes
1 answer
414 views

Win10 doesn't respect pagefile settings for other disks than C:

I tried to move my pagefile off from C: to another disk, D:. I set my preferences in Start > Advanced System Settings > Advanced > Performance > Advanced > Virtual Memory. I have set C: ...
xarx's user avatar
  • 353
0 votes
3 answers
878 views

Why does a computer need a swapfile?

I searched with “Why do I need a swapfile?” and “Why does a computer need a swapfile/” and the first page of results didn’t tell me anything technical. Rather to turn it off or to not use it in high ...
user970696's user avatar
2 votes
0 answers
113 views

Should I remove swap file before shrinking partition? (Ubuntu)

I have a laptop which dual boots Windows 10 and Ubuntu 20.04. I have realized that I gave the Windows partition too little space when I installed Ubuntu so I want to shrink the Ubuntu partition (p4) ...
glaux's user avatar
  • 123
0 votes
1 answer
1k views

How to create and configure swap space on an SSD with a running, LUKS-encrypted Linux system?

I have a trusty old ThinkPad R60 with only 3 GB RAM (upgraded from 2 GB) with Linux Mint Debian Edition 4 running on it. I chose LMDE for stability and the desktop environment. The machine is one of ...
david's user avatar
  • 337
1 vote
1 answer
326 views

Caching large files in ram

I have 4K Video files, which are slow and jerky when played from a HDD. They play flawlessly from an SSD, but my SSD has a limited lifespan, so I don't want to use it playing large temporary files. ...
zitryko's user avatar
  • 27
1 vote
1 answer
214 views

What size swap partition will allow a Mint 19.3 installation with 64G RAM to hibernate?

This same basic question is asked at How can I enable hibernation under Linux Mint 18.3?, but the question as asked only tells how much space is desirable for a 4Gi installation, and conflicting ...
Christos Hayward's user avatar
0 votes
1 answer
2k views

How to reduce the size of swap file from 3.8 GB to 1GB?

I'm using Jetson TX2 L4T v28.3 but I can't seem to find the swap file in L4T OS 28.3 (UBUNTU Bionic 18.04). I tried to locate it via grep but the file can't be located. jetpack4-2@jetpack42-desktop:~$...
Anuj Patil's user avatar
0 votes
1 answer
644 views

Less Threads or More Swap Space?

I am running multiple terminal cmds using threads in Python (don't make fun of me, there is a reason). These cmds sometimes overpower the available memory and I have been forced to increase my swap ...
Daniel Connelly's user avatar
2 votes
1 answer
231 views

Why is the modification date of my swapfile not changing?

If I check with stat the modification date is not up to date File: /home/shares/swap.file Size: 1962934272 Blocks: 3833864 IO Block: 4096 regular file Device: 801h/2049d Inode: 15 ...
bomben's user avatar
  • 272
1 vote
1 answer
857 views

Mac Mojave Swap File

I have a question and I'm not sure if what I'm thinking is possible to do. I have a 2015 iMac 17 with One 4 GHz Intel Core I7 64 GB 1867 MHz DDR3 Ram AMD Radeon R9 M395 2048 MB 2TB Hitachi Hard ...
Rick's user avatar
  • 11
1 vote
1 answer
2k views

Change default swap disk in Centos7

We disabled older swap space (disk) that already mounted in /dev/mapper/centos-swap to increase size of the root(/). Then we create new swap file in /dev/sda3: # lsblk NAME MAJ:MIN RM ...
shozdeh's user avatar
  • 11
0 votes
2 answers
460 views

Swap - One disk or multiple disks

Hi there internet hivemind! I have a EC2(t2-large) on AWS running Ubuntu. Due to high memory consumption I'm going to add about 8G of Swap. The machine has 4 disks, all of them with enough space. ...
Vinicius Zolin De Jesus's user avatar
5 votes
0 answers
4k views

swapon failed: Invalid argument with ext4 swapfile and swap partition

I've tried enabling swap both on a swapfile (on ext4): # file /mnt/usb/swapfile /mnt/usb/swapfile: Linux/i386 swap file (new style), version 1 (4K pages), size 1023999 pages, no label, UUID=9dfaa27a-...
Flobe's user avatar
  • 51
1 vote
0 answers
825 views

Linux Kernel configuring swapping parameters.

Linux may perform a swap out on the following occasions: By a kernel thread denoted as kswapd that is activated periodically whenever the number of free page frames falls below a predefined ...
randominstanceOfLivingThing's user avatar
0 votes
0 answers
24 views

I have 8GB of Free RAM, Why am I SWAPing? [duplicate]

I have 16GB of RAM in my iMac, right now 8GB of RAM is used... and I have 2.31GB of SWAP... [ My question is, if there is 8GB of RAM still free, then why am I swapping?
Jeffrey L. Roberts's user avatar
0 votes
1 answer
884 views

Using swap file instead of a partition

I just wondered while using a swap file instead of an dedicated partition seems to only have advantages, isn't a swap file is slower due to the filesystem's overhead like e.g. ext4's journaling?
lal12's user avatar
  • 1
0 votes
1 answer
297 views

Gimp "Failed to resize swap file: Invalid argument"

Occasionally, when editing an image in GIMP, I'm shown the error message "Failed to resize swap file: Invalid argument". After 5 seconds, this is usually followed by a second error "unable to write ...
Stevoisiak's user avatar
  • 14.6k
1 vote
1 answer
6k views

Change swap file size Fedora 23

I'm on Fedora 23, Dell OptiPlex 745, Core 2 Duo, 2.13 GHz, 1066 MHz FSB and 4 gig of RAM; the drive is a Samsung 840 EVO solid state drive. The swap file is currently at 4 gig. How can I change this ...
Janning's user avatar
  • 21
1 vote
1 answer
220 views

Swap operations and boot are much slower in Windows than in Mac OS

I have a MacBook Pro 15" Late 2011, where I have installed Windows 7 and Mac OS Lion in dual boot. I have disabled Windows Pagefile because I have installed 16 GB RAM. I cannot figure out why ...
Vito Gentile's user avatar
2 votes
1 answer
234 views

Swap file automatic loading in Linux

How can I get the Swap file to load at boot up time rather than having to load it manually with GParted after each boot up? I have Linux Mint 17.2 Xcfe and Mate and both use the same swap file. Here ...
user519395's user avatar
3 votes
4 answers
13k views

How to disable Swapfile.sys on Windows 10? [confirmed bug]

I want to delete the swapfile.sys from my C: partition because it prevents me from shrinking the drive. I set the Paging File option to 'No paging file' in the 'Virtual memory' window for my C ...
IceCold's user avatar
  • 2,101
0 votes
1 answer
190 views

is it necessary to create swap partition while installing RHEL?

I'm a newbie to RHEL.I've installed RHEL 7 using VMware .but,during the installation ,it asked me to create Swap partition and i created it worth 2GB. please brief me the reasons.what if the swap ...
Vijay Thewampire's user avatar
2 votes
1 answer
53 views

Swap series of filenames conditionally

If have the following problem: I have a series of files that come in pairs (but not always). There is 2400??????_001.jpg and 2400??????_002.jpg. I need to swap the _001 and _002. So I thought I could ...
dexter's user avatar
  • 141
1 vote
1 answer
250 views

Empty swapfile after using dd

According to many tutorials available on the internet (like for example this one https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 ), to generate a swapfile, i need to ...
mbajur's user avatar
  • 125
12 votes
3 answers
2k views

Does it matter about the amount of the swap area in Linux system

Does it matter if the amount of a swap area in Linux was set too small (say 1Gb), and the main RAM is 128Gb? Should we always set the amount of swap area to be twice the amount of RAM? UPDATED: Hi, ...
mining's user avatar
  • 233
3 votes
0 answers
740 views

How to limit (not Disable) Swapfile.sys size?

How can I limit the size of c:\swapfile.sys? I would expect wmic swapfileset to work, but it doesn't exist: wmic swapfileset where name="c:\\swapfile.sys" set initialsize=1000,maximumsize=1000 ...
John Peterson's user avatar
3 votes
1 answer
6k views

swap file vs partition

I needed some more swap for something I'm doing so I set up a swap file rather than editing partitions. Are there any disadvantages to using a swap file instead of a swap partition? My OS is ...
Carbon's user avatar
  • 165
1 vote
0 answers
1k views

Giant Swap File fills hard drive to capacity

Today I had a most odd experience on our student computing server. Suddenly, you could not save a file and you got a "file system full" message. So I did a du -sh on all user directories to see what ...
ncmathsadist's user avatar
26 votes
8 answers
70k views

Why half of my RAM of 8GB is missing?

Have been sitting with 8GBs of RAM for 2 years still thinking I needed another 4GBs and never questioning why so often I get message about low physical memory that would close all open programs (...
Boris_yo's user avatar
  • 5,884
1 vote
1 answer
472 views

Windows7, defragment swap and hibernate file and move them to begin of hdd

I tried find any tool for windows7 that help me with defrag swapspace, and move them to beginning of volume. I have no option to create separate partition for swap only, because I have 4 primary ...
Znik's user avatar
  • 366
3 votes
2 answers
2k views

how much swap space is too much on x64 and will cause problems?

Apart from using up too much disk space, how much swap space can you allocate before it will degrade performance or cause problems on an x64 OS? What differences are there between the x64 OSes? I'm ...
BeowulfNode42's user avatar
3 votes
1 answer
4k views

Why does swapon take ages when enabeling a swap file?

I've created a swap file with dd if=/dev/zero of=swap.img bs=1024k count=4k mkswap swap.img swapon swap.img While this works, the swapon command takes ages (approx 10min) to finish. Enabling the ...
Chaos_99's user avatar
  • 928
0 votes
3 answers
616 views

Moving swapfile.sys from Linux

I have two operating systems installed (windows 8 & mint) and I am trying to shrink the original windows partition, but there is the swapfile.sys permanent file in the way. So I was wondering, is ...
topherg's user avatar
  • 1,120
4 votes
4 answers
11k views

Why using swap file over a SMB/NFS mounted filesystem is not possible in Linux?

I'd like to use another machine's unused RAM as swapspace for my primary Linux installation. I was just curious about performance of network ramdisks compared to local (slow) mechanical hard disks. ...
Avio's user avatar
  • 927
140 votes
14 answers
397k views

What's the easiest way to delete Vim swapfiles I've already recovered from?

Sometimes Vim crashes and leaves me a swapfile. That's awesome. Then I open the file I was editing and Vim asks me if I want to recover. I do, thanks. When it's done, Vim tells me, You may want ...
Peeja's user avatar
  • 2,909
-1 votes
1 answer
3k views

Will a swap file not slow down the system so much if a solid-state drive is used?

When RAM runs out on a computer, the swap file is used, and then the system can become quite slow. But if the notebook or desktop is using SSD nowadays, will it be less of a concern? (Updated Oct ...
nonopolarity's user avatar
  • 9,696