Swap file not showing up in Gparted but shows in bash "free" command
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Swap file not showing up in Gparted but shows in bash "free" command
I recently added a 2nd drive (60 GB nominal SSD (59 GB available)) to a small PC (Acepc AK1 with J3455 CPU) which came with Windows 10 pre-installed on a 32 GB (nominal) eMMC drive (28 GB available). I Gparted the new SSD drive with two partitions, 39 GB ext4 and 20 GB NTFS. I set up the 20 GB NTFS to work with Windows 10 storage sense facility and I installed Xubuntu 18.04 to the 39 GB ext4 partition from the live USB. When finished, the installation routine set up the distribution along with Grub 2.02, which found the Windows OS and generated a boot menu. The installed Grub works in booting either Windows or Xubuntu and both are running fine. However, when done, I discovered from running the bash "free" command there is a 1.8 GB swap file implemented somewhere but it doesn't show up in Gparted as a separate partition on either drive and it seems small (roughly half the size of my available 3.7 GB RAM). I have two questions. How do I find the swap file? Should I just leave all of this alone or should I shrink the Xubuntu ext4 and create an additional 1.9 GB Linux-swap partition? Please help me with this if you know. Thanks.
If it was a swap file it will be put into an existing filesystem. If it was a distinct partition you could find it (as a partition), but if it was a file you won't.
probably it is better explained here: https://www.linux.com/news/all-about-linux-swap-space
Thanks for the quick response and thank you for the information link. Apparently it is a swap file and not a separate partition but I still don't know why the installation routine set it up as only half the size of my available RAM. If I may bother you with one more question . . . . . Should I add an additional 1.8 GB Linux-Swap partition? I appreciate your help.
1. I don't know why (why was created a file instead of partition). But that is probably not important.
2. I don't know why it was only half of your RAM.
I don't use any swap personally. So probably you don't need it at all. I don't know how do you use your linux and how much memory you need. You can use the command free to check, and if you see your swap is not enough you can add more. But probably you have already another swap file/partition too.
In general you can read the following page about memory usage: www.linuxatemyram.com
Thanks once again for the additional info. I have been monitoring my RAM usage from time to time with the "free" command and thus far have never exceeded 2.7 GB so I think I'll just leave it as the Xubuntu installation routine implemented it.
swap was needed on a pentium 1 @ 120 MHZ @ max 128MB RAM.
even the gentoo handbook suggests swap, which is total nonsense.
The only time i had issues with running out of memory, was with google chrome and it well known memory hole bug. That was a turion mt-32 cpu and 1GB of RAM.
When your box has 4GB of RAM and a penryn cpu or better you do not need swap at all.
swap is useful when you use tuxonice.
I upgraded from 8GB => 16GB => 20GB. 8GB is enough for anything these days. 16GB or 20GB is suggested when you do as I compile software in RAM.
--
you can check htop / top and see how much memory is used. this will answer if you need swap. also pay attention on how much memory is free, when you have a lot of memory free, remove swap.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.