You are not logged in.
Pages: 1
Hello!
I noticed that my available memory (the one shown in free) decreased over time. And hence, my used memory grows.
I don't think my concern is the usual misunderstanding about memory in Linux as I am aware that free memory is spoiled memory and that caching increases performance.
My concern is that my system begins to be unusable after a while (less than a day on a heavy usage of my computer) because it has no available memory anymore to launch new processes.
I have this issue since I reinstalled Arch about 6 months ago. The reason of my installation was to encrypt my disk (a HDD).
I basically followed the "LVM on LUKS" section of the wiki.
This is the main difference between my last setup and this one. Thus, it leads me to think that the issue comes from there, without being sure.
As an example, I plotted the available value of the free command over time since my last boot (less than 7 hours ago). https://imgur.com/a/VhVCj7D
The two upward peaks come from the fact that I closed heavy applications (like GIMP). At the moment, I only have Firefox and some terminal applications open. Even if I close them, the used memory will still be high.
Here is another plot from a session where I had to reboot because of lack of usability. https://imgur.com/a/Z5kL63M
The flat sections are due to the fact that my system was suspended. The last plot represents the available memory in my system after having closed all the applications (mainly Firefox).
Here is the output of free at this instant : https://pastebin.com/9NNtyLiR
Even though the cache is relatively high at the moment, it decreases if needed. The used value seems unusually high.
I disabled my swap partition because of this current issue. Otherwise, freezes occurs more frequently as the memory fills up and the processes are swapped out.
I regularly update my system and the problem persists from a kernel version to another.
I tried to use Chromium instead of Firefox to be sure that it doesn't come from the latter as I use it all the time but nevertheless, the problem was still present.
Here are some relevant output :
/proc/meminfo https://pastebin.com/EudDsqGG
ps aux --sort -rss https://pastebin.com/axegVM6p
journalctl -b 0 https://pastebin.com/9iPH0262
journalctl -b 0 -p 0..3 https://pastebin.com/6fXNSN1g
dmesg https://pastebin.com/HFbEAqkq
/etc/default/grub https://pastebin.com/ARdTG2en
Please tell me if more data is needed. As I have no clue where the problem can come from, I tried to output information as general as possible.
Thanks in advance !
EDIT : also, if I close my X server and log out from all my TTY then reconnect, the used memory is not cleared.
Last edited by mattiasg (2018-12-31 00:06:14)
Offline
Hello,
While this may or may not answer your question. Just wanted to share my experience with OOM conditions, that I ran into quite often on 8GB of memory. In my experience this was largely due to Web Browsers. I use both Firefox and Chromium simultaneously and depending on the sites you visit, such as Twitter or Youtube, the usage will balloon to 1.5-2GB alone despite what other websites you might have open. My workarounds were putting web browsers in Cgroups and enabling systemd-swap (enables ZSwap).
EDIT : also, if I close my X server and log out from all my TTY then reconnect, the used memory is not cleared.
Source: https://wiki.archlinux.org/index.php/Sy … _on_logout
Arch Linux builds the systemd package with --without-kill-user-processes, setting KillUserProcesses to no by default. This setting causes user processes not to be killed when the user completely logs out. To change this behavior in order to have all user processes killed on the user's logout, set KillUserProcesses=yes in /etc/systemd/logind.conf.
Offline
Online
Thank you very much, your answer was spot-on. I indeed use the rtl8723be driver.
For those running into the same problem, this is due to a memory leak in the kernel.
You'll need to patch your kernel or wait until the release of linux 4.20.0. Please read the mentioned thread.
Also thanks to bugsmanagement, your message was insightful, I was not aware that Cgroups existed.
I'll mark my thread as solved.
EDIT: linux 4.20 is in the repo, silly me
Last edited by mattiasg (2018-12-31 00:11:33)
Offline
Pages: 1