Swap might be too small. it's there but I cannot find it in Gparted

Ubuntu Support Template

Ubuntu Version:
Ubuntu 24.04.3 LTS

Desktop Environment (if applicable):don’t know.

Problem Description:
My system is running very slowly and I frequently get “PROCESS X” is stalled (?) Force Quit or Wait errors
I suspect my Swap partition might be too small.
I have 8Gbs of Ram but my Swap partition is only showing as 1.3Gb
~$ swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 1.3G 0B -2

But when I boot from a USB to the Trial version and run Gparted I do not see any partitions labelled SWAP nor of that size, 1..3Gb

what am I missing?

Screenshots or Error Messages:

What I’ve Tried:
List the solutions or workarounds you’ve already attempted.

Before Posting:
:mag: Please check if similar issues have already been reported and resolved.

That’s not a swap partition, it’s a swap file. They are usually preferred these days over swap partitions because they are more flexible. If you search the web for “linux change swap size” you’ll find many step by step explanations like for example https://www.baeldung.com/linux/increase-swap-space .

Edit: I see that file is basically not being used (fourth column, 0 Bytes). So unless this is a screenshot made just after booting with the system not having been under any serious load yet, I think the size of the swap file might not be the problem.

1 Like

thank you
that was screenshoted just after rebooting
it is now showing 350mb used

NAME TYPE SIZE USED PRIO
/swapfile file 1.3G 350M -2

Although it’s possible, the problem probably is unrelated to your swap size. Next time your system runs slowly, enter these two commands.

swapon --show
inxi --memory

You can post the results here. They’ll show how stressed your swap and RAM are.

By the way, your swap file is stated in the result: /swapfile.

1 Like

FWIW, I’ve never managed to get a swap file working properly. A swap partition (RAM size +20%) works every time.

Lubuntu 20.04 LTS and 24.04 LTS.

That’s quite curious. What problems did you have with it?

Note that Ubuntu defaults to using a swapfile since 22.04, swap partitions do not really make sense anymore (their big advantage was/is only on rotary discs where you can position it in a place between two partitions that are regularly in use in your system, so that the HDD head can actually swap while moving between them, this could speed up swap access significantly. In times where most of us use NVME or other non-mechanical harddisks using a swapfile and leaving the access management to the controller/OS is way more effective)

4 Likes

thank you.
its running SLLLLLOOOOWWWLY right now.

peter@peter-OptiPlex-990:~$ swapon --show
NAME TYPE SIZE USED PRIO
/swapfile file 1.3G 1G -2
peter@peter-OptiPlex-990:~$ inxi --memory
Memory:
System RAM: total: 8 GiB available: 7.64 GiB used: 4.99 GiB (65.4%)
Array-1: capacity: 16 GiB slots: 4 modules: 2 EC: None
Device-1: ChannelA-DIMM0 type: no module installed
Device-2: ChannelA-DIMM1 type: DDR3 size: 4 GiB speed: 1333 MT/s
Device-3: ChannelB-DIMM0 type: no module installed
Device-4: ChannelB-DIMM1 type: DDR3 size: 4 GiB speed: 1333 MT/s

Well, the question is what processes are using up all that memory?

Check in the terminal by running top or better still htop.

For a quick look at the top processes using up memory show us the output of this command:

ps aux --sort=-%mem | head

1 Like

that PS Aux command spat out a LOT of information.
should I just paste it all here?

and how can I show you what htop shows?
it seems to be dynamic, changing all the time.

peter@peter-OptiPlex-990:~$ ps aux --sort=-%mem | head
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
peter 67272 3.2 8.2 21129216 660828 ? Sl Feb11 45:18 /snap/firefox/7766/usr/lib/firefox/firefox ``https://www.ebay.ca/ulk/messages/reply?M2MContact&item=297924490573&requested=siwe-498&qid=6033707506019&redirect=0&self=ensemblecycling&mkevt=1&mkpid=0&emsid=e11050.m44.l1139&mkcid=7&ch=osgood&euid=5bd723ce413341eebf64f968b2593b1a&bu=45863574253&osub=-1~1&crd=20260211100242&segname=11050
peter 128188 10.3 6.8 15912732 550844 ? Sl 11:25 2:33 /snap/firefox/7766/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44446 -prefMapHandle 1:278102 -jsInitHandle 2:223968 -parentBuildID 20260204004611 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {eb81379f-53e5-43c2-8801-5eecdbbb32c2} -parentPid 67272 -crashReporter 5 -crashHelper 6 -greomni /snap/firefox/7766/usr/lib/firefox/omni.ja -appomni /snap/firefox/7766/usr/lib/firefox/browser/omni.ja -appDir /snap/firefox/7766/usr/lib/firefox/browser 225 tab
peter 5145 3.2 5.1 3829536 413352 ? Sl Feb10 86:08 /usr/lib/thunderbird/thunderbird
peter 2153 2.7 3.9 5643596 312704 ? Ssl Feb10 73:17 /usr/bin/gnome-shell
peter 129875 3.0 3.7 2975808 302312 ? Sl 11:40 0:17 /snap/firefox/7766/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44445 -prefMapHandle 1:278102 -jsInitHandle 2:223968 -parentBuildID 20260204004611 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {a8d6c853-a6c5-4f94-b913-e0f91131f913} -parentPid 67272 -crashReporter 5 -crashHelper 6 -greomni /snap/firefox/7766/usr/lib/firefox/omni.ja -appomni /snap/firefox/7766/usr/lib/firefox/browser/omni.ja -appDir /snap/firefox/7766/usr/lib/firefox/browser 240 tab
peter 129541 2.5 3.5 2950640 280260 ? Sl 11:40 0:15 /snap/firefox/7766/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44445 -prefMapHandle 1:278102 -jsInitHandle 2:223968 -parentBuildID 20260204004611 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {4f379665-afa6-4e6b-8911-c4704869c53e} -parentPid 67272 -crashReporter 5 -crashHelper 6 -greomni /snap/firefox/7766/usr/lib/firefox/omni.ja -appomni /snap/firefox/7766/usr/lib/firefox/browser/omni.ja -appDir /snap/firefox/7766/usr/lib/firefox/browser 233 tab
peter 125780 1.3 3.4 7094880 277124 ? Sl 11:20 0:24 /snap/firefox/7766/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44446 -prefMapHandle 1:278102 -jsInitHandle 2:223968 -parentBuildID 20260204004611 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {4d7f9829-54e6-4cdc-86b6-43a63a707213} -parentPid 67272 -crashReporter 5 -crashHelper 6 -greomni /snap/firefox/7766/usr/lib/firefox/omni.ja -appomni /snap/firefox/7766/usr/lib/firefox/browser/omni.ja -appDir /snap/firefox/7766/usr/lib/firefox/browser 171 tab
peter 129816 1.0 3.0 2784784 246172 ? Sl 11:40 0:05 /snap/firefox/7766/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44445 -prefMapHandle 1:278102 -jsInitHandle 2:223968 -parentBuildID 20260204004611 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {0d4d8856-40e4-45cb-9cf0-0dba5052a437} -parentPid 67272 -crashReporter 5 -crashHelper 6 -greomni /snap/firefox/7766/usr/lib/firefox/omni.ja -appomni /snap/firefox/7766/usr/lib/firefox/browser/omni.ja -appDir /snap/firefox/7766/usr/lib/firefox/browser 238 tab
peter 128467 0.6 2.9 2815712 236200 ? Sl 11:25 0:09 /snap/firefox/7766/usr/lib/firefox/firefox -contentproc -isForBrowser -prefsHandle 0:44446 -prefMapHandle 1:278102 -jsInitHandle 2:223968 -parentBuildID 20260204004611 -sandboxReporter 3 -ipcHandle 4 -initialChannelId {231726cd-b672-4de9-b478-78d4c41b8822} -parentPid 67272 -crashReporter 5 -crashHelper 6 -greomni /snap/firefox/7766/usr/lib/firefox/omni.ja -appomni /snap/firefox/7766/usr/lib/firefox/browser/omni.ja -appDir /snap/firefox/7766/usr/lib/firefox/browser 230 tab

does this screenshot show anything interesting?

To me, it seems Firefox might be the main culprit for high memory usage.

Do you work with a lot of tabs open, tabs that run audio/video?

Are there any browser extensions that might be pushing the memory up?

1 Like

I agree with @rubi1200 , adding up the percentages of used memory in your screenshot shows firefox using more than 51 % of the used memory. https://support.mozilla.org/en-US/kb/firefox-uses-too-much-memory-or-cpu-resources has some tips on how to find the things that use too much memory (might be extensions, might be themes, might be a high number of tabs, … ). It also tells you to use an adblocker (Adblock Plus and uBlock Origin are explicitly mentioned) and possibly NoScript (I do use it, but you have to be able to live with a rather high annoyance factor; most sites you visit for the first time will not render correctly until you permit the scripts on that page to run).

1 Like

I don’t think I leave an unusual number of tabs open.
i currently have….18 open in Firefox.
and I don’t usually use anything that keeps playing audio or video.

but Chromium also bogs down.

However I will try working without using Firefox and see if things improve.

thank you all for your insights.

Given that you’re using a modern browser, your memory use seems reasonable for what you’re doing.

Looking at your hard disk, it seems that you have a spinning disk, not an SSD. Is that correct?

Ubuntu is targeted at modern machines, and with just 8GB RAM on a spinning disk, it can be slow.

For your system, I would have recommended a lighter distribution such as Xubuntu or Lubuntu. They are both official flavours of Ubuntu and therefor fully supported, so it might be worth considering this.

You can install Xubuntu or Lubuntu on your machine without having to reinstall from scratch. If you issue this command, it will give you the option of using the Xubuntu desktop whenever you log in:

sudo apt install xubuntu-desktop

Likewise, this command for the Lubuntu desktop:

sudo apt install lubuntu-desktop

Have a look at the Xubuntu and Lubuntu websites to see if either of them looks good to you.

Caveat: Although these commands are usually very reliable, they can on rare occasions cause a problem. If you decide to go ahead, please run all updates first, do a full backup, restart your computer, install whichever desktop you want to use, and restart again.

1 Like

Firefox somewhat of a of a memory hog.

I changed to Brave, which is much kinder to the machine. I keep Firefox in the apps list as a backup for certain web-shops that don’t recognize Brave.

This topic was automatically closed after 30 days. New replies are no longer allowed.