# High memory usage issue?

**URL:** <https://forum.endeavouros.com/t/high-memory-usage-issue/33882>\
**Category:** Applications\
**Created:** [November 14, 2022, 12:14am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882 "2022-11-14T00:14:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steve120](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@Steve120](https://forum.endeavouros.com/u/Steve120)\
**Post date:** [November 14, 2022, 12:14am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/1 "2022-11-14T00:14:58Z")

</div>

I am confused why my computer keeps hanging after a few hours. Typically, I have these open

- Firefox, with around 10 tabs total
- Discord in the background
- Slack
- Maybe a terminal and/or Dolphin file explorer

Usually, with these one it’s typically at 80-90% already. It would be nearing 95% more often if I have Discord actually open. Also, when I would have VSCode running, it would almost always get to a 100% and make my computer hang.

What makes me really confused is that when I run these same programs on Windows 10, it never hangs and reaches 100%. (Like I thought Windows is supposed to be slower). What should I do to reduce memory usage?

I have 8GB RAM, and currently no swap (just haven’t gotten around to it yet since I wasn’t given the option to make a swap partition on installing EndeavourOS for some reason).

---

<div class="post-metadata">

**Author:** ![Zircon34](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/zircon34/32/135623_2.png) [@Zircon34](https://forum.endeavouros.com/u/Zircon34)\
**Post date:** [November 14, 2022, 12:32am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/2 "2022-11-14T00:32:49Z")

</div>

You could run htop and check what actually takes up most RAM. Else it’s mostly guess work. I don’t use slack or discord, but never reach 8 Gb on Firefox…

---

<div class="post-metadata">

**Author:** ![Steve120](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@Steve120](https://forum.endeavouros.com/u/Steve120)\
**Post date:** [November 14, 2022, 1:44am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/3 "2022-11-14T01:44:38Z")

</div>

Here’s a screenshot of my htop:

![image](https://forum.endeavouros.com/uploads/default/original/3X/3/c/3c268476430889e2b38a4fc440a61343bef66b25.png)

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [November 14, 2022, 1:45am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/4 "2022-11-14T01:45:20Z")

</div>

What desktop environment are you using? Bear in mind that desktop environments use a lot more ram compared to something like a window manager. For example, even a lightweight DE like xfce uses twice as much RAM at boot up compared to something like `i3`.

After a quick web search, I found that Discord’s ram usage is generally around 50 to 600 MB whereas Slack’s can reach as high as 1 GB.

> [@Steve120](#):
>
> What makes me really confused is that when I run these same programs on Windows 10, it never hangs and reaches 100%. (Like I thought Windows is supposed to be slower). What should I do to reduce memory usage?

Windows 10 is a memory hog. I know this because Windows 10 was the last OS i used before switching to Linux. And in terms of resources efficiency, Windows is nowhere _near_ as efficient as Linux.

If you’re noticing high ram usage on Linux compared to Windows, then the culprit must be one of the applications you’re running—there could be memory leaks introduced by one of the applications you were using. If you’re using a lot of plugins on Firefox, I recommend disabling them and then check the ram usage again.

Also, please bear in mind that there has been reports by Discord users on Linux that Discord was leaking memory.

[https://support.discord.com/hc/en-us/community/posts/4410300374167-When-is-the-RAM-usage-fix-coming-for-linux-](https://support.discord.com/hc/en-us/community/posts/4410300374167-When-is-the-RAM-usage-fix-coming-for-linux-)

[https://www.reddit.com/r/discordapp/comments/je1hvc/memory\_leak\_on\_linux/](https://www.reddit.com/r/discordapp/comments/je1hvc/memory_leak_on_linux/)

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [November 14, 2022, 1:47am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/5 "2022-11-14T01:47:56Z")

</div>

Can you also show this part as well?

![2022-11-14-094719_964x222_scrot](https://forum.endeavouros.com/uploads/default/original/3X/8/2/82bd1ba78ff599c528bc210a4b5e214159a2e7c0.png)

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [November 14, 2022, 1:50am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/6 "2022-11-14T01:50:33Z")

</div>

Also, please sort the list by memory usage?

---

<div class="post-metadata">

**Author:** ![Steve120](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@Steve120](https://forum.endeavouros.com/u/Steve120)\
**Post date:** [November 14, 2022, 4:46am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/7 "2022-11-14T04:46:18Z")

</div>

Here’s the top part  
 ![image](https://forum.endeavouros.com/uploads/default/original/3X/0/d/0de35e9dfb0d7f2b9c92011aa47ad9d21f497233.jpeg)

I changed up my htop to make it into a tree view so it doesn’t show duplicate processes, but can’t sort it automatically by memory. The largest ones were these ones by manual inspection:  
 ![image](https://forum.endeavouros.com/uploads/default/original/3X/4/0/403086f61d28ad108ece6a3a23839b0d4e794680.jpeg)  
Everything else was about 2% big at most.

As for the desktop environment, I’m using KDE, which would be the most RAM-consuming one of them. But yeah, as I pointed out, my Windows just does fine however, so I do agree it’s most likely an application. But I don’t see how Discord, Slack, and Firefox could contribute so much when htop only shows like around 60% total at most (Slack and Discord total around 20%). Is it possible that htop could be not actually showing the true amount of memory usage for each application?

Also, I have 8 Firefox extensions, disabling all of them only decreased RAM usage by around 5-10%, I still don’t know where all the other RAM usage comes from.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 14, 2022, 5:53am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/8 "2022-11-14T05:53:51Z")

</div>

> [@Steve120](#):
>
> I still don’t know where all the other RAM usage comes from.

Run ps\_mem:

`sudo pacman -Syu ps_mem`

`sudo ps_mem`

Also:

` free -h`

And perhaps have a read here:

[https://www.linuxatemyram.com/](https://www.linuxatemyram.com/)

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [November 14, 2022, 5:57am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/10 "2022-11-14T05:57:35Z")

</div>

> [@pebcak](#):
>
> And perhaps have a read here:

The OP mentioned that his computer hangs, though. So it could really be a sign of memory exhaustion?

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 14, 2022, 5:58am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/11 "2022-11-14T05:58:59Z")

</div>

Yes.  
Still an informative read to get an idea what

> [@anthony93](#):
>
> total\_mem - free\_mem - buffered\_mem - cached\_mem - reclaimable

actually mean and how memory is getting used.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [November 14, 2022, 7:11pm UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/12 "2022-11-14T19:11:38Z")

</div>

Running 10 browser tabs is going to use memory. 😉

---

<div class="post-metadata">

**Author:** ![KDen](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@KDen](https://forum.endeavouros.com/u/KDen)\
**Post date:** [November 14, 2022, 7:37pm UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/13 "2022-11-14T19:37:21Z")

</div>

That usage looks pretty normal to me? Firefox and with tabs and extensions is going to eat quite a bit. I’m running about 4G Mem usage on my machine right now as well. As far as your system hanging when your Mem gets full; It doesn’t look like you have any swap space? I don’t know if you’re using a partition or a swapfile but make sure it’s mounted. Finally, you might like bpytop for montoring too.

---

<div class="post-metadata">

**Author:** ![Steve120](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@Steve120](https://forum.endeavouros.com/u/Steve120)\
**Post date:** [November 15, 2022, 7:25am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/14 "2022-11-15T07:25:15Z")

</div>

Thank you all for your patience 😃

Normally, I base my RAM usage on this widget in my taskbar:  
 ![image](https://forum.endeavouros.com/uploads/default/original/3X/3/0/308a9065555791b1e92ec35ef5c3f79235971d42.png)  
CPU usage on the left and RAM usage on the right. It always hangs whenever the right one reaches 99% (with the CPU usage also getting to 99%). However, the number shown here doesn’t usually correspond to what `htop` shows. At this screenshot^, `htop` says 4.10/7.57 ~ 54%.

`free -h` output:

```auto
               total used free shared buff/cache available
Mem: 7.6Gi 4.0Gi 155Mi 1.4Gi 3.4Gi 1.9Gi
Swap: 0B 0B 0B

```

It looks like the available space does correctly correspond to the taskbar status widget, but not with `htop`.

---

<div class="post-metadata">

**Author:** ![Steve120](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/s/bbe5ce/32.png) [@Steve120](https://forum.endeavouros.com/u/Steve120)\
**Post date:** [November 15, 2022, 7:31am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/15 "2022-11-15T07:31:28Z")

</div>

`sudo ps_mem` output:

```auto
 58.3 MiB + 5.3 MiB = 63.6 MiB kwin_x11 [updated]
 58.8 MiB + 13.2 MiB = 72.0 MiB Xorg
 86.2 MiB + 9.6 MiB = 95.8 MiB latte-dock
146.1 MiB + 10.5 MiB = 156.6 MiB plasmashell [updated]
251.5 MiB + 45.9 MiB = 297.4 MiB slack (7)
592.8 MiB + 98.0 MiB = 690.8 MiB Discord (8)
  2.7 GiB + 117.7 MiB = 2.8 GiB firefox (23)

```

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 15, 2022, 8:15am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/16 "2022-11-15T08:15:40Z")

</div>

> [@Steve120](#):
>
> It always hangs whenever the right one reaches 99%

> [@Steve120](#):
>
> with the CPU usage also getting to 99%

I would keep an “steady” eye on htop while using the system normally.  
See what process is causing the high CPU and RAM usage.  
Could it be some file indexing, like baloo? Something else? Perhaps you’ll capture the culprit.

Also having a swap device might help avoiding Out of Memory situations. Worth considering.

---

<div class="post-metadata">

**Author:** ![KDen](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@KDen](https://forum.endeavouros.com/u/KDen)\
**Post date:** [November 15, 2022, 3:33pm UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/18 "2022-11-15T15:33:19Z")

</div>

Have you tried enabling your swap?  
[https://wiki.archlinux.org/title/swap](https://wiki.archlinux.org/title/swap)

---

<div class="post-metadata">

**Author:** ![dreadnought](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/d/8edcca/32.png) [@dreadnought](https://forum.endeavouros.com/u/dreadnought)\
**Post date:** [November 15, 2022, 4:26pm UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/19 "2022-11-15T16:26:29Z")

</div>

I mean, all you need to know is in the _free -h_ output: no free memory and no swap.  
Enable swap and you will be fine. Problem solved.

---

<div class="post-metadata">

**Author:** ![anon11595408](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f1d935/32.png) [@anon11595408](https://forum.endeavouros.com/u/anon11595408)\
**Post date:** [November 15, 2022, 10:36pm UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/20 "2022-11-15T22:36:19Z")

</div>

There are other, less resource-hungry DEs or WMs out there. Just saying. 8Gb of RAM isn’t much for what you’re attempting to do. I doubt, that enabling swap will solve the issue for good. Some websites, such as youtube really eat up a lot of memory and cpu-power as well, due to their heavy usage of JS and 3rd party resources. That goes for discord, too.

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [November 16, 2022, 6:08pm UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/21 "2022-11-16T18:08:31Z")

</div>

I agree 100% too many tabs, running discord and slack? This is something i wouldn’t ever do especially with only 8 Gb memory. I have 32GB and i still wouldn’t do it. I have never in all the years using a computer used on a regular basis multiple tabs except maybe on occasion i might have opened a couple.

---

<div class="post-metadata">

**Author:** ![anthony93](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/anthony93/32/92169_2.png) [@anthony93](https://forum.endeavouros.com/u/anthony93)\
**Post date:** [November 17, 2022, 6:28am UTC](https://forum.endeavouros.com/t/high-memory-usage-issue/33882/22 "2022-11-17T06:28:58Z")

</div>

@ricklinux Agreed. The OP could switch to something like `i3` for more efficient memory use if he intends to put that much load on his system without adding the amount of physical ram installed.

However, the OP did mention something that seems kind of strange to me. He said:

> [@Steve120](#):
>
> What makes me really confused is that when I run these same programs on Windows 10, it never hangs and reaches 100%

This doesn’t seem to fit with my own experience as a former user of Windows 7, 8.1, and 10. Even “resource hungry” distros like Ubuntu doesn’t use as much memory as Windows 10 does (nearly 2.0GB on boot up and up to 4 GB with only two browser tabs running).

[Next page](https://forum.endeavouros.com/t/high-memory-usage-issue/33882.md?page=2)
