LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New Machine, New Fedora 25 Install - High CPU Usage (https://www.linuxquestions.org/questions/linux-newbie-8/new-machine-new-fedora-25-install-high-cpu-usage-4175609374/)

NobleOne 07-07-2017 07:27 AM

New Machine, New Fedora 25 Install - High CPU Usage
 
Brand new desktop. Installed Fedora 25 Server. Getting 98% CPU usage. System monitor shows gnome-shell as the only process getting any CPU.

Ideas?

rtmistler 07-07-2017 07:49 AM

How is the system operationally? Is it slow? Is it seeming to perform OK?

Are you using the program top(1) to make this determination? Or how are you determining CPU usage by the gnome-shell?

It may be a bug in one of the software applications running. Such as some applications if written poorly can take 100% of the CPU, "by measurement", in other words, when they're not working at things they are supposed to yield the CPU time for other processes. Some applications can be written to yield, but then also take all remaining free time, still doing absolutely nothing. And as a result, they measure high CPU usages. It is a bad thing still even if it has no immediate system impact.

Are you familiar with console logins? They are accessible when you type any of CTRL-ALT-F1, or F2, F3, F4, .. up to F6 and then CTRL-ALT-F8 will get you back to your desktop. From these logins you can do things like kill your X server session, or kill just the offending application, however also verify that it stays stopped because there may be a daemon monitoring it and restarting it, for gnome-shell it likely would restart. However you can check to see if this frees up CPU time or not, albeit temporarily.

Another command to use would be w(1) to show the CPU loading. And as follow up there it also would be helpful to know how many CPU cores your system has by looking at the output of /proc/cpuinfo.

These are just some thoughts on things to check, unsure exactly why this is occurring on your system.

NobleOne 07-07-2017 08:00 AM

First, let me thank you for your reply. Wasted quite a few hours and getting frustrated!
Yes, top returns the same info "gnome-shell" using sometimes in excess of %100 CPU. There are no applications running other than the graphical UI. I can boot the machine repeatedly and immediately see the problem.

/proc/cpuinfo returns "Permission denied", even though I am logged in as root. The cpu is supposed to be a 4-core processor.

syg00 07-07-2017 08:02 AM

Quote:

Originally Posted by NobleOne (Post 5731858)
System monitor shows gnome-shell as the only process getting any CPU.

How much CPU ? - 1%, 98% ... ?.
We need real data. Not that I consider the GUI monitor a reference.

Back in the day you could restart the shell easily. Wayland put an end to that.

NobleOne 07-07-2017 08:05 AM

syq00: CPU is always showing over 95%, but from second to second the number will fluctuate wildly, up to over 700%. So, this is real data, but not stable data. As I said, nothing is running other than the GUI. New machine, nothing to backup. Considering reinstalling the OS.

syg00 07-07-2017 08:06 AM

Our posts crossed - you need "cat /proc/cpuinfo" (no quotes).
Run this so we can see some data
Code:

top -b -n 3 | grep -E -A15  "^top"
Let it run to completion then post the output - the first data is misleading, hence the extra data.

NobleOne 07-07-2017 08:52 AM

I can't even do that. I ran top and piped to grep and got the output - no problem there. Something is soooo messed up that I can't even type in the Firefox browser address bar so that I can post the output here. Keystrokes repeat 10 to 20 times. Example: trying to type "google" I get 10 g's, even if I backspace, I get one backspace, then another 10, so the address bar is wiped out. Thought that maybe it was the keyboard, so I swapped for another keyboard - same behavior.
Had to bring this over to another machine via thumb drive.

top - 09:36:08 up 38 min, 1 user, load average: 3.99, 1.48, 0.84
Tasks: 271 total, 1 running, 270 sleeping, 0 stopped, 0 zombie
%Cpu(s): 11.0 us, 0.1 sy, 0.0 ni, 88.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 32880660 total, 31373864 free, 877816 used, 628980 buff/cache
KiB Swap: 16506876 total, 16506876 free, 0 used. 31539332 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1661 root 20 0 1760792 264716 84864 S 800.0 0.8 32:03.88 gnome-shell
2385 root 20 0 156836 4320 3628 R 6.7 0.0 0:00.01 top
1 root 20 0 215632 11300 7612 S 0.0 0.0 0:01.77 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
4 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
6 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 mm_percpu_+
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.12 rcu_sched
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
10 root 20 0 0 0 0 S 0.0 0.0 0:00.03 rcuos/0
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
12 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
13 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
16 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
17 root rt 0 0 0 0 S 0.0 0.0 0:00.11 migration/1
--
top - 09:36:11 up 38 min, 1 user, load average: 4.31, 1.59, 0.88
Tasks: 271 total, 1 running, 270 sleeping, 0 stopped, 0 zombie
%Cpu(s): 53.3 us, 0.2 sy, 0.0 ni, 46.3 id, 0.0 wa, 0.2 hi, 0.0 si, 0.0 st
KiB Mem : 32880660 total, 31374928 free, 878276 used, 627456 buff/cache
KiB Swap: 16506876 total, 16506876 free, 0 used. 31540396 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1661 root 20 0 1760792 264716 84864 S 425.4 0.8 32:16.77 gnome-shell
158 root 20 0 0 0 0 S 0.7 0.0 0:01.62 kworker/u1+
2385 root 20 0 156836 4320 3628 R 0.7 0.0 0:00.03 top
1 root 20 0 215632 11300 7612 S 0.0 0.0 0:01.77 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
4 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
6 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 mm_percpu_+
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.12 rcu_sched
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
10 root 20 0 0 0 0 S 0.0 0.0 0:00.03 rcuos/0
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
12 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
13 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
16 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
17 root rt 0 0 0 0 S 0.0 0.0 0:00.11 migration/1
--
top - 09:36:14 up 38 min, 1 user, load average: 4.31, 1.59, 0.88
Tasks: 271 total, 1 running, 270 sleeping, 0 stopped, 0 zombie
%Cpu(s): 44.1 us, 0.2 sy, 0.0 ni, 55.4 id, 0.0 wa, 0.2 hi, 0.0 si, 0.0 st
KiB Mem : 32880660 total, 31374680 free, 878360 used, 627620 buff/cache
KiB Swap: 16506876 total, 16506876 free, 0 used. 31540268 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1661 root 20 0 1760792 264716 84864 S 353.3 0.8 32:27.44 gnome-shell
158 root 20 0 0 0 0 S 1.0 0.0 0:01.65 kworker/u1+
2385 root 20 0 156836 4320 3628 R 1.0 0.0 0:00.06 top
1 root 20 0 215632 11300 7612 S 0.0 0.0 0:01.77 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
4 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:+
6 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 mm_percpu_+
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.12 rcu_sched
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
10 root 20 0 0 0 0 S 0.0 0.0 0:00.03 rcuos/0
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
12 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
13 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
16 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
17 root rt 0 0 0 0 S 0.0 0.0 0:00.11 migration/1

NobleOne 07-07-2017 08:54 AM

Sorry, I didn't realize that cpuinfo was a flat file, not a program. It does indeed show four cores.

rtmistler 07-07-2017 08:59 AM

It does not appear to be using too much memory.

The load averages depend on the number of CPU cores, however the numbers really should be below 1.0.

I know you've mentioned re-install, however have you done any customizations yet? I think you said it was a fresh new install.

I'm assuming you have no GUI desktop, correct? If so, then why is gnome-shell even running? Since that is part of a UI desktop.

NobleOne 07-07-2017 09:04 AM

Scroll back to the 9:05 AM post. I AM running a GUI. I installed a GUI via the command:
sudo dnf groupinstall "Development and Creative Workstation" gnome LibreOffice
As was suggested under a post on the ask.fedoraproject.org site. I knew it would be installing a few tools I didn't necessarily need, but did not expect this result. Other than formatting and mounting a second (3 TB) hard drive, that is all that I have done to customize.

rtmistler 07-07-2017 09:41 AM

Sorry I missed that you did install a UI.

My suggestion is to not use a server based distribution with a desktop UI for starters.

If you are using this system as a desktop, then suggest you install Fedora for desktops.

NobleOne 07-07-2017 09:46 AM

No, this is definitely a server, but wanted a GUI. I have Fedora 17 on another server, and appreciated the GUI, even though I am familiar with most command line tools. I found configuring the firewall easier, and I don't even know how (or if) I can run a web browser when running the character UI. So, are you suggesting that I need to remain in character mode to properly/effectively run the server version, or that I simply need to run a different GUI? If it is the latter, would you please suggest how I should get an appropriate GUI? To be clear, development is done on PC-based clients, not on the server, so I don't need developer tools in the GUI.

rtmistler 07-07-2017 10:01 AM

I would recommend trying it without the GUI first to see if you have a loading problem, and then consider your options, be they debugging the GUI you're using (noting that it also should be minus Libreoffice), and if you cannot debug with this UI, I'd recommend you search for alternative UI's which you can run on Fedora 25.

NobleOne 07-07-2017 10:03 AM

rtmistler: Thanks, but I don't know how to switch back to running without the GUI. If you could assist with that, I'd appreciate it.

rtmistler 07-07-2017 10:18 AM

No specific ideas, the general ones I'd try would be to try to disable that GUI as the machine is constituted now, or instead since you cited earlier that it is a new machine and you are considering a reinstall, doing that, documenting all the steps you take when you do this, not installing the GUI and seeing how it performs, and then installing the GUI if you feel you want that, and seeing if it once again causes this problem.

A check of the Fedora support site might be advisable to see if anyone else has complained. So suggest that.

My only other thoughts are that if you properly document or remember all you've done up to "before the GUI", all is fine, then properly remember all you do to install the GUI, you should be able to reverse that an un-install the GUI. I haven't perused the instructions you followed, but you can review those and see if it seems obvious how to un-install, or if there's any links or references on there to contact to ask about un-installing if you decided you didn't want that GUI after all.


All times are GMT -5. The time now is 03:47 PM.