Do I have a swap file / partition? SOLVED

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
benchrest
Level 3
Level 3
Posts: 100
Joined: Tue Jan 17, 2012 2:19 pm

Do I have a swap file / partition? SOLVED

Post by benchrest » Sat Jun 29, 2019 10:25 am

I intended to have a swap file when I installed 19 but on reviewing / updating my installation documentation I am not sure. I have 8 GB ram and
I have never seen much more than half used. So having swap maybe mute. Using "top" command I see:
Screenshot from 2019-06-29 09-04-07.png
edit: apparently I can't figure out how to post a screenshot.

This shows I have 2 GB of swap space I believe with zero used. I believe this is what I would have set.

However sudo fdisk -l shows no swap partition. This device is a 256 GB SSD:

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0020BF61-531E-4B5E-8150-EAA228A949D9

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 500117030 499066407 238G Linux filesystem

fstab shows:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=db4d8d86-d2a2-43db-9a75-5e954f012489 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=9996-2DFF /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0

I'm not sure what this tells me about my swap space.
Do I have swap but it is in the /boot/efi partition? I have been running like this for probably 4 months or so. I am not new to linux, have been running LM since about 2010 and have never installed without swap before. I have never seen fdisk without showing a swap partition.
Rich
Last edited by benchrest on Sat Jun 29, 2019 11:00 am, edited 1 time in total.
LM Cinnamon 19, ASUS TUF B450M, Ryzen 5 2600x, 16gb memory, Samsung SSD 970 EVO-Plus, Samsung SSD 850 Pro 256gb, dual 27" monitors, MSI GEFORCE GTX 1050ti Areo ITX. Big user of Gramps, LibreOffice, Unison.

rjsrjs
Level 3
Level 3
Posts: 102
Joined: Sun Mar 17, 2019 6:47 pm

Re: Do I have a swap file / partition?

Post by rjsrjs » Sat Jun 29, 2019 10:42 am

If you don't have it, install HTOP in terminal, run it from terminal, type in htop ,and in the top section it will show your swap file and how much is being used. :)

athi
Level 6
Level 6
Posts: 1461
Joined: Sun Mar 30, 2014 10:15 am
Location: USA

Re: Do I have a swap file / partition?

Post by athi » Sat Jun 29, 2019 10:44 am

benchrest wrote:
Sat Jun 29, 2019 10:25 am
I intended to have a swap file when I installed 19 but on reviewing / updating my installation documentation I am not sure. I have 8 GB ram and
I have never seen much more than half used. So having swap maybe mute. Using "top" command I see:

Screenshot from 2019-06-29 09-04-07.png edit: apparently I can't figure out how to post a screenshot.

This shows I have 2 GB of swap space I believe with zero used. I believe this is what I would have set.

However sudo fdisk -l shows no swap partition. This device is a 256 GB SSD:

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0020BF61-531E-4B5E-8150-EAA228A949D9

Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 500117030 499066407 238G Linux filesystem

fstab shows:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=db4d8d86-d2a2-43db-9a75-5e954f012489 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=9996-2DFF /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0

I'm not sure what this tells me about my swap space.
Do I have swap but it is in the /boot/efi partition? I have been running like this for probably 4 months or so. I am not new to linux, have been running LM since about 2010 and have never installed without swap before. I have never seen fdisk without showing a swap partition.
Rich
Mint 19 uses swap file instead of swap partition by default. If you did not create a swap partition, Mint will automatically create a swap file for you. that is why you cannot see a swap partition.

There were several posts about need for a swap file/partition, I have 16Gb of ram and still create a swap partition. Here is link to one of the post
viewtopic.php?f=90&t=295720&hilit=swap
Mint Mate 19.1. Main rig is HP 800G2 I5 6500 16GB ram, 120GB boot drive, 2x3TB, 1x4TB data drives. Oldest rig is Mate 18.3 on Dell D620 with 32bits core duo.

User avatar
trytip
Level 11
Level 11
Posts: 3993
Joined: Tue Jul 05, 2016 1:20 pm

Re: Do I have a swap file / partition?

Post by trytip » Sat Jun 29, 2019 10:57 am

free the basic memory command in Terminal will tell you. you can also open system monitor and check in resources under swap
Image

benchrest
Level 3
Level 3
Posts: 100
Joined: Tue Jan 17, 2012 2:19 pm

Re: Do I have a swap file / partition? SOLVED

Post by benchrest » Sat Jun 29, 2019 11:05 am

Thanks for your answers. So I am not completely crazy, I did set swap to 2 GB. I don't remember seeing anything about this in the release notes. I ran
sudo swapon --show
which shows I have 2 GB active with zero used.
I have also change swappiness from 60 to 10
Thanks again, Rich
LM Cinnamon 19, ASUS TUF B450M, Ryzen 5 2600x, 16gb memory, Samsung SSD 970 EVO-Plus, Samsung SSD 850 Pro 256gb, dual 27" monitors, MSI GEFORCE GTX 1050ti Areo ITX. Big user of Gramps, LibreOffice, Unison.

DAMIEN1307
Level 8
Level 8
Posts: 2303
Joined: Tue Feb 21, 2017 8:13 pm
Location: Alamogordo, New Mexico, USA

Re: Do I have a swap file / partition? SOLVED

Post by DAMIEN1307 » Sat Jun 29, 2019 1:27 pm

The "system monitor" on the "resources" tab in the middle right side graph screen also shows any swap usage in real time...i also have an Intel 15 quad core CPU as well as 8 gigs ram...it has never used the swap file at all even when playing 1080p at 60 fps videos movies etc...you should be just fine...DAMIEN
ORDO AB CHAO

Post Reply

Return to “Installation & Boot”