You are not logged in.

#1 2023-06-29 00:33:19

HiperDoo
Member
Registered: 2022-10-08
Posts: 5

CPU spikes and high RAM usage

Hi, I recently noticed that both my laptop and desktop have the same new behavior, CPU spikes and increased RAM consumption.

At first I thought it was a coincidence (some of my dubious packages that I had on both computers), and between my unsuccessful searches for a solution I decided to reformat my desktop (since I already planned to change the SSD and create a new environment). cleaner work, it was not a problem).

I have to highlight that the laptop is old and I used it to customize what would be my new Arch with my desired work environment, I ended up finishing it, and although it is an old computer, the CPU usage was around 0% - 1% at idle consuming ~250MB of RAM.

After doing a clean install with the minimal packages and copying my new .config, I noticed that the CPU spikes and high RAM consumption were still there. These peaks that are around between 25% and 40% of my CPU, and a RAM usage of ~440MB, something that makes me think that this is a problem with some configuration of mine, so I reformatted again and when I finished installing the essential packages (to at least be able to remove the installer USB), I still see EXACTLY the same behavior.

I strongly suspect that this problem is caused by an essential package or something bigger (since I managed to replicate this behavior on my laptop, which didn't present it, until after having updated all the packages; now I have two computers with the same failure, computers with VERY different computing power).

Although I've been using Arch Linux for a few months now, I really don't know how to handle this kind of situation, let alone fix it (I've searched some forums for solutions to similar behaviors, but the solutions don't or won't fit my problem).

I imagine that you could help me by asking me for the outputs of certain commands that you consider to be a priority to find out the root of this problem.

In advance, thank you for your time!

P.S.: These are the only packages that are installed on my computer.
```
pacstrap /mnt linux linux-headers linux-firmware base base-devel grub efibootmgr nano git intel-ucode networkmanager neofetch dosfstools mtools ntfs-3g exfat-utils os-prober sudo gcc gdb cmake make
```

Offline

#2 2023-06-29 07:11:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,171

Re: CPU spikes and high RAM usage

CPU spikes and high RAM consumption

In what process? How do you measure that given

the only packages that are installed

And please don't say "neofetch" - at least checl top.

Online

#3 2023-06-29 22:30:51

HiperDoo
Member
Registered: 2022-10-08
Posts: 5

Re: CPU spikes and high RAM usage

Thanks for answering

That is a problem, I don't know which process generates these spikes... I thought it would be visible with `top`, but the CPU usage is as expected (0% - 1%), but the RAM consumption problem is brand (although you can't see which process consumes this RAM either).

Use a simple script to check these consumptions:

while :
do
   cpu_u=$(top -bn1 | awk '/Cpu/ { print $2 }')
   ram_u=$(free -m | awk '/Mem/ { print $3 }')

   echo "CPU: $cpu_u%"
   echo "RAM: $ram_u MB"

   sleep 1
done

After having made the first post, I decided to continue with the installation (adding and configuring first the NVIDIA drivers and my work area), the spikes and RAM consumption continue to persist.

You may not like the mention of neofetch, but it for some reason still shows the RAM consumption as it was before these problems, while `top` shows something higher.

Offline

#4 2023-06-30 05:37:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,171

Re: CPU spikes and high RAM usage

but the CPU usage is as expected (0% - 1%), but the RAM consumption problem is brand (although you can't see which process consumes this RAM either)

What is your metric for the CPU load then?
And of course top also displays some form of RAM allocation (it's not very precise but possibly a good indicator) - Shift+m sorts by memory, Shift+p by cpu load.

This isn't about "liking" a tool, but a high level abstraction can be meaningless to misleading and in order to address the problem you need to isolate it first ("what's causing the load") and the answer could be "neofetch" (heisenbug)

Online

#5 2023-06-30 20:43:02

HiperDoo
Member
Registered: 2022-10-08
Posts: 5

Re: CPU spikes and high RAM usage

I think I'm going to stop looking for a solution to this problem, I mean, I've finished installing all those apps I needed and with their work environment, and although I still see that the top metrics (which I can also see from the polybar) show CPU spikes and increased RAM consumption, this does not affect the performance of any of the apps at all.

I also took this conversation to other discord forums and some also noticed this same behavior...

Maybe it's a kernel bug? top? We do not know. We only know that these errors appear to be purely visual (since I also don't get any performance drops on the old laptop, seeing those CPU spikes).

So I'm going to ignore it and wait for the next updates to fix just a bug that came out of nowhere.

Offline

Board footer

Powered by FluxBB