[SOLVED] Help me find who eats my cpu?

D

Deleted member 143446

Guest
Nowadays, I am facing with very annoying situation; somethings hangs up/freeze/locks my pc since it eats my cpu, even I had 5 times small(5-10 seconds periods) freezes while writing this message. I can see it from the CPU monitor but I could not find who is it exaclty? Any help is appreciated ! It startts again... Like a bottleneck, it come and goes...
 


Nowadays, I am facing with very annoying situation; somethings hangs up/freeze/locks my pc since it eats my cpu, even I had 5 times small(5-10 seconds periods) freezes while writing this message. I can see it from the CPU monitor but I could not find who is it exaclty? Any help is appreciated ! It startts again... Like a bottleneck, it come and goes...
Try to find the process which is consuming more cpu, memory.
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head

if the issue is intermediate, try to create a script to capture the resource utilization for few hours and redirect the output to a file.
You can go through the output file.

I hope that may give you some hints on this issue.
 
Try to find the process which is consuming more cpu, memory.
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head
ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head

if the issue is intermediate, try to create a script to capture the resource utilization for few hours and redirect the output to a file.
You can go through the output file.

I hope that may give you some hints on this issue.
I am looking it..
 
Nowadays, I am facing with very annoying situation; somethings hangs up/freeze/locks my pc since it eats my cpu, even I had 5 times small(5-10 seconds periods) freezes while writing this message. I can see it from the CPU monitor but I could not find who is it exaclty? Any help is appreciated ! It startts again... Like a bottleneck, it come and goes...
What distro is this; Ubuntu, Fedora, Arch, Other? What desktop; KDE, Gnome, XFCE, other? What file system; ext4, BTRFS, Other? It'd be helpful if you post that info as well as your PC specs; RAM, CPU and storage. Some distros ship with irqbalance.service enabled by default, i.e. OpenSUSE, and that eats a bit of a chunk of system's resources. Desktops like Gnome use tracker for file indexing, and that can be a process offender, too. BTRFS is a good FS, but it has a couple of processes that might be quite aggressive at times; btrfs-transacti and btrfs-cleaner, they'll run once every now and then, and when they do, you might experience some slow-downs. So, as you can see, in order to narrow down what your "very annoying situation" might be, you need to provide more info than just "I'm facing a very annoying situation", because that could be a number of different things.
 
you need to provide more info than just "I'm facing a very annoying situation"
Sorry, @Tolkem I am using Debain 11 Bullseye, LXDE desktop, ext4 is my file system. I am using PCManFM as file manager.

I run ps command and found that it is mostly Firefox that cause it. Others are :
PID PPID %CPU %MEM COMMAND
9203 9202 4.7 20.4 /firefox92/firefox/firefox --private-window
11512 9203 2.1 10.4 /firefox92/firefox/firefox-bin -contentproc -childID 20 -isForBrowser -prefsLen 5632 -prefMapSize 254001 -jsInitLen 279424 -parentBuildID 20220313140707 -appDir /firefox92/firefox/browser 9203 true tab
1417 1375 1.7 2.8 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
2722 1744 0.6 1.5 lxtask
9468 9203 0.2 4.9 /firefox92/firefox/firefox-bin -contentproc -childID 3 -isForBrowser -prefsLen 5514 -prefMapSize 254001 -jsInitLen 279424 -parentBuildID 20220313140707 -appDir /firefox92/firefox/browser 9203 true tab
1701 1 0.1 0.5 /usr/bin/ibus-daemon --daemonize --xim
1749 1611 0.1 1.8 lxpanel --profile LXDE
1778 1 0.1 5.0 pcmanfm-qt --desktop --profile=lxqt
Therefore, I am focusing on Firefox...
 
9203 9202 4.7 20.4 /firefox92/firefox/firefox --private-window
11512 9203 2.1 10.4 /firefox92/firefox/firefox-bin -contentproc -childID 20 -isForBrowser -prefsLen 5632 -prefMapSize 254001 -jsInitLen 279424

I don't know what kind of CPU you have, or how much RAM. But from my point of view...
4.7% and 2.1% aren't that bad. Less than 7% of your total CPU.

Your memory (RAM) might be slightly more of an issue.
20.4% and 10.4% are over 30% of your RAM. But still nothing to worry about really.
 
I don't know what kind of CPU you have, or how much RAM. But from my point of view...
4.7% and 2.1% aren't that bad. Less than 7% of your total CPU.

Your memory (RAM) might be slightly more of an issue.
20.4% and 10.4% are over 30% of your RAM. But still nothing to worry about really.
I have 2GB Ram and total usage is never less than 40% of total ram. So I am using swap :) and now it is more than 50% of ram used... sometimes ram is full and I just fastly close Firefox pages...
I remembered that, I opened a post here due to read-error in my swap partition. Although I did not see such error, I disabled swap device(usb) and unplug it. Then re-plugged it to another port and reenabled swap. Looks like a bit normal now ... No freeze writing these lines at least!!! Maybe that was the problematic part of my PC.

I can say that my problem is solved. Because there is no abnormal freezer upto now :)
 
Sorry, @Tolkem I am using Debain 11 Bullseye, LXDE desktop, ext4 is my file system. I am using PCManFM as file manager.
Is this a laptop or desktop? CPU and RAM specs might be good to know, too. I kind of remember LXDE ships (or used to) with a tool called "system profiler and benchmark", check if it is installed, start it and find that info, then post it in your reply.
 
Is this a laptop or desktop? CPU and RAM specs might be good to know, too. I kind of remember LXDE ships (or used to) with a tool called "system profiler and benchmark", check if it is installed, start it and find that info, then post it in your reply.
Desktop, CPU : (lscpu)
Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
RAM 2GB (lsmem)

Do you mean "sysprof 3.38.1-1" system profiler?
Sysprof is a sampling CPU profiler that uses a ptrace in Linux kernel to
profile the entire system, not just a single application. Sysprof handles
shared libraries and applications do not need to be recompiled. In fact they
don't even have to be restarted.
I found that one in synaptic pack.man. If it was that you mentioned, I will install it and look for results. But I may need extra help to use it, since I do not know what it does :)
 
I found that one in synaptic pack.man. If it was that you mentioned, I will install it and look for results. But I may need extra help to use it, since I do not know what it does :)
It's a tool that collects and displays systems' info. It looks something like this:
1658949861399.png

RAM 2GB (lsmem)
This might be the reason you're experiencing some of the problems you described. 2 GiB for modern browsing is quite not enough, Firefox alone uses around 400 to 500 MiB, and that's just with one tab, more than that, well you get the picture, don't you? So, depending on how many processes are running at the same time, the system might run OOM (out of memory) Does your system have a swap partition/file?
 
Yes I have a separete/dedicated 8 GB USB swap device.
I installed system profiler but mine looks like this :
I think I understood the problem you mentioned, I have read a OOM killers in one internet page while I am reading about "swap" topic. When the memory runs out, they start to kill programs... I think they are the same OOMs they freeze my system... :mad:

I loved the program I installed ! It is a fantastic ! It records all processes cpu and memory usages and shows me on a timeline! Thanks @Tolkem, that program help me to solve my lots of problems !
After this post, I can open a new post(if it had not opened already) about a ligther&safer&more-old-pc-friendly browser alternatives, if they exists.:D
systemprofiler.png
 
I installed system profiler but mine looks like this :
Hmmm ... that's not the same tool, yes, it is a great tool, but the one I was referring to is this: https://manpages.ubuntu.com/manpages/focal/man1/hardinfo.1.html
Is a system profiler and benchmark for Linux systems, that gathers information about the hardware and operating system, performs benchmarks, and generates reports. The information gathered is presented on an simple and intuitive GUI. Information is grouped in four main groups: Computer, Devices, Network, and Benchmarks.
While sysprof:
is a sampling CPU profiler for Linux that uses ftrace to profile the entire system, not just a single application. Sysprof handles shared libraries and applications do not need to be recompiled. In fact they don't even have to be restarted.

Yes I have a separete/dedicated 8 GB USB swap device.
USB 2.0 or 3.0? Or better? I suppose you know USB devices tend to be slower that internal disk, right? If you didn't, now you do. Why don't you create a swap partition in the internal HDD? It's faster. A swap running from USB means the system has to work more, and this might actually be the root of all your problems.
 
Last edited:
OP can also make a swapfile (on their internal storage) which is easier than making a whole partition and just as effective. That'd be my suggestion to add to the rest.


I think this may have been recommended in one of OP's previous threads.
 
OP,
Your problem is Ram and the lack of it...add another 2GB of Ram which is the most your Motherboard might be able to run...problem solved until you get a new computer.
happy0035.gif

Your computer is from 2007 and maybe 32bit and socket 775...so is really old and would be cheaper at this time to get another 2GB stick of Ram of the same speed too.
happy0027.gif

https://www.techpowerup.com/cpu-specs/core-2-duo-e6750.c459
 
OP can also make a swapfile (on their internal storage) which is easier than making a whole partition and just as effective. That'd be my suggestion to add to the rest.


I think this may have been recommended in one of OP's previous threads.
Yes KGIII, I have posted before about how can I check swap partition disk. But, I dit not know that problem cause that much of trouble to me. I have already read the link you send whenever it posted, however, I had a one ready dedicated partition, you know, so I did not change it.

I can confirm that the root cause of cpu eating problem was my swap partition device. In future, I am thinking to buy an SSD and install my OS, swap etc. to it. Thanks for all for your help, I have found my hunt
 
Today Ram is very important and you should always have more than you need because you never know when you'll need it.
happy0035.gif


The more Ram you have the more you can multi-task...it doesn't matter how fast your CPU is or adding an SSD as you'll have the same problem. I have a quad core CPU running at 3.6 GHz but if I had only 2GB of Ram I'd be screwed.
sad0007.gif

Here's an example....

The above shows the amount of Ram used just running the System Monitor out of 16GB installed.


The above shows...the System Monitor...Firefox running and my win 7 VM running all at once...notice the difference in the amount of Ram being used from the first picture and notice there's very little CPU usage in both because it's all about Ram...hope this helps.
happy0034.gif
 
I have already read the link you send whenever it posted, however, I had a one ready dedicated partition, you know, so I did not change it.

The great thing about a swapfile is that you don't have to mess around with making partitions. Thus the link...
 
The great thing about a swapfile is that you don't have to mess around with making partitions. Thus the link...
In my experience, swapfiles are slower than a proper swap partition, but I guess it could depend on many other factors such as whether it's an HDD or a SSD, CPU, RAM, etc. In my moderate setup (dual core CPU, HDD and 4 GiB of RAM), a swap partition delivers better results.
 
In my experience, swapfiles are slower than a proper swap partition, but I guess it could depend on many other factors such as whether it's an HDD or a SSD, CPU, RAM, etc.

I have not experienced that and, either way, it'll be faster (and absolutely should be fast enough) than having their swap on a thumb drive.
 

Staff online

Members online


Top