LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 05-05-2018, 12:30 PM   #1
Danux
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Rep: Reputation: Disabled
Question 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.
 
Old 05-05-2018, 12:35 PM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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
 
1 members found this post helpful.
Old 05-05-2018, 12:45 PM   #3
Danux
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-05-2018, 12:53 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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
 
1 members found this post helpful.
Old 05-05-2018, 01:01 PM   #5
Danux
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-05-2018, 02:12 PM   #6
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
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.

--

wahts the output of
lsblk
df

have you checked /etc on how swap is configured?

Last edited by _roman_; 05-05-2018 at 02:15 PM.
 
1 members found this post helpful.
Old 05-05-2018, 02:26 PM   #7
Danux
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you for the information.
 
Old 05-05-2018, 05:46 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,539

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
A swap file instead of a swap partition is default for the Ubuntus since 17.04.

https://www.omgubuntu.co.uk/2016/12/...ons-swap-files

The Ubuntu page below under Other base system changes since 16.04 LTS.

https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes
 
2 members found this post helpful.
Old 05-05-2018, 07:41 PM   #9
Danux
LQ Newbie
 
Registered: Mar 2013
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks. I hadn't realized this. The last version I had installed prior to 18.04 was 16.04.
 
  


Reply

Tags
bash history, ntfs, partition, swapfile, xubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Showing "bash-4.1$" prompt instead of "[userX@hostname ~]" tonmoy Linux - Server 2 07-04-2013 08:15 AM
"free" shows 0 swap adityavpratap Slackware 7 07-18-2008 01:33 PM
Strangely, bash reports "no such file", but it shows with ls. ramchip Slackware 2 02-25-2008 12:03 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration