LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CPU 100% using resources (https://www.linuxquestions.org/questions/linux-newbie-8/cpu-100-using-resources-816976/)

EAI 06-29-2010 08:00 AM

CPU 100% using resources
 
Hi

I am using Ubuntu 10.04, using the TOP command in terminal shows all resources being used, the one that is drawing the most usage is a function called "phy0".

It will appear for a couple of seconds then stop the reappear.

With all of this going on it is messing up the machine, slowing it down and using 100% cpu.

I normally have five to six packages opened all at once with no problems at all and the hard drive light very rarely comes on with this "phy0" function it is causing the hard drive light to come on continuously.


Thanks EAI

business_kid 06-29-2010 09:42 AM

iirc phy0 is some sort of virtual device in the network stack. Stop your network. Does the 100% cpu still appear?

EAI 06-30-2010 02:54 AM

Hi

Stopping the network it still appears.

Thanks EAI




Quote:

Originally Posted by business_kid (Post 4018289)
iirc phy0 is some sort of virtual device in the network stack. Stop your network. Does the 100% cpu still appear?


fruttenboel 06-30-2010 03:15 AM

Quote:

Originally Posted by EAI (Post 4018168)
Hi

I am using Ubuntu 10.04, using the TOP command in terminal shows all resources being used, the one that is drawing the most usage is a function called "phy0".

It will appear for a couple of seconds then stop the reappear.

With all of this going on it is messing up the machine, slowing it down and using 100% cpu.

I normally have five to six packages opened all at once with no problems at all and the hard drive light very rarely comes on with this "phy0" function it is causing the hard drive light to come on continuously.


Thanks EAI

A 'phy' used to be a physical network interface. In most cases, the Ethernet transformers were called "phy's". But, 'phytech' used to be a german comany selling micro processor systems. So the name is ot very unique. Probably a network component. These can be very busy in bursts.

what's more important: which 6 applications have you running for standard?

Ubuntu is to Linux what an SUV is to cars. It tries to please so very much by all the things that have made The Other System so popular, that the zillions of ncessities that provide colour, sound and smells to the user eat up all the resources.

Try running a live distro like www.slax.org and see if that also eats up all your GHz's and CPU cores. The problem is not an application that's gone berzerk. The problem is Ubuntu. The Linux that cannot please all but will do anything to still have this done. Thereby causing your system behavior.

What's the CPU of your system? AM size? Disk size? KDE, xfce or Gnome? How much eye candy do you have enabled? Which background processes? Your geographic location?

EAI 06-30-2010 03:36 AM

Hi

Stopping the network it still appears.

Thanks EAI




Quote:

Originally Posted by business_kid (Post 4018289)
iirc phy0 is some sort of virtual device in the network stack. Stop your network. Does the 100% cpu still appear?


EAI 06-30-2010 03:47 AM

100% cpu pgy0
 
Hi

Copy of the terminal read out.

I am using a single cpu 2.8ghz intel

The earlier Linux op 9.0 and above, I have had no problems, even using the same packages, since I loaded the last op 10.04, all sorts of problems, but phy being the worst.

I am using gnome.

Thanks EAI



sgu@sgu-desktop:~$ top

top - 16:38:58 up 53 min, 2 users, load average: 0.48, 0.63, 0.67
Tasks: 152 total, 1 running, 151 sleeping, 0 stopped, 0 zombie
Cpu(s): 3.3%us, 1.3%sy, 0.0%ni, 95.3%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2061448k total, 627288k used, 1434160k free, 53216k buffers
Swap: 3226616k total, 0k used, 3226616k free, 296768k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
992 root 20 0 38628 20m 8640 S 1.7 1.0 1:47.29 Xorg
2258 sgu 20 0 42996 13m 10m S 1.3 0.7 0:00.65 gnome-terminal
1538 sgu 20 0 318m 77m 27m S 1.0 3.9 2:35.03 firefox-bin
1178 sgu 20 0 63600 23m 7824 S 0.3 1.2 0:20.46 compiz
1 root 20 0 2796 1636 1192 S 0.0 0.1 0:00.43 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.16 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
6 root 20 0 0 0 0 S 0.0 0.0 0:00.06 events/0
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuset
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 sync_supers
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 bdi-default

























Quote:

Originally Posted by fruttenboel (Post 4019064)
A 'phy' used to be a physical network interface. In most cases, the Ethernet transformers were called "phy's". But, 'phytech' used to be a german comany selling micro processor systems. So the name is ot very unique. Probably a network component. These can be very busy in bursts.

what's more important: which 6 applications have you running for standard?

Ubuntu is to Linux what an SUV is to cars. It tries to please so very much by all the things that have made The Other System so popular, that the zillions of ncessities that provide colour, sound and smells to the user eat up all the resources.

Try running a live distro like www.slax.org and see if that also eats up all your GHz's and CPU cores. The problem is not an application that's gone berzerk. The problem is Ubuntu. The Linux that cannot please all but will do anything to still have this done. Thereby causing your system behavior.

What's the CPU of your system? AM size? Disk size? KDE, xfce or Gnome? How much eye candy do you have enabled? Which background processes? Your geographic location?


fruttenboel 07-01-2010 04:11 AM

Quote:

Originally Posted by EAI (Post 4019091)
Hi

Copy of the terminal read out.

I am using a single cpu 2.8ghz intel

That should be no problem.

Code:

top - 16:38:58 up 53 min,  2 users,  load average: 0.48, 0.63, 0.67
Tasks: 152 total,  1 running, 151 sleeping,  0 stopped,  0 zombie
Cpu(s):  3.3%us,  1.3%sy,  0.0%ni, 95.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  2061448k total,  627288k used,  1434160k free,    53216k buffers
Swap:  3226616k total,        0k used,  3226616k free,  296768k cached

Your CPU load is 3%, not 100%. It is 95% idle. You have 2 GB of RAM and 3 GB of swap. This i all pretty normal. Your system should not feel sluggish.

Here's my 'top':
Code:

top - 11:06:08 up 13 min,  5 users,  load average: 0.00, 0.04, 0.05
Tasks: 108 total,  3 running, 105 sleeping,  0 stopped,  0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    963348k total,  361120k used,  602228k free,    19632k buffers
Swap:  1461872k total,        0k used,  1461872k free,  200584k cached

I just started multiple movies and here is 'top' again:
Code:

top - 11:09:25 up 17 min,  5 users,  load average: 1.35, 0.55, 0.23
Tasks: 108 total,  4 running, 104 sleeping,  0 stopped,  0 zombie
Cpu(s): 88.7%us,  3.7%sy,  0.0%ni,  0.0%id,  4.3%wa,  0.0%hi,  3.3%si,  0.0%st
Mem:    963348k total,  550988k used,  412360k free,    20356k buffers
Swap:  1461872k total,        0k used,  1461872k free,  255000k cached

This is a super sluggish system....

cantab 07-01-2010 10:22 AM

Quote:

Originally Posted by EAI (Post 4019091)
sgu@sgu-desktop:~$ top

top - 16:38:58 up 53 min, 2 users, load average: 0.48, 0.63, 0.67

Your load average is the important thing. Load average is, loosely speaking, how many programs are trying to run. The numbers are over the last one, five, and 15 minutes.

If the load average is below the number of processors/cores you have, the system has power to spare. If the load average is higher, the system is overloaded. In your case, you have one processor with one core, and the numbers are below one, so everything is fine.

This is a simple view - there are some fine details.

EAI 07-02-2010 02:38 AM

100% cpu pgy0
 
Hi

Even when the pc is idle phyo appears and still causes the cpu to run at 100%, I will try and copy next time it dose this.

It only occurs sometimes for a few minutes or hours.

Could it be a virus?


Thanks EAI








Quote:

Originally Posted by cantab (Post 4020642)
Your load average is the important thing. Load average is, loosely speaking, how many programs are trying to run. The numbers are over the last one, five, and 15 minutes.

If the load average is below the number of processors/cores you have, the system has power to spare. If the load average is higher, the system is overloaded. In your case, you have one processor with one core, and the numbers are below one, so everything is fine.

This is a simple view - there are some fine details.


fruttenboel 07-02-2010 02:29 PM

Quote:

Originally Posted by EAI (Post 4021405)
Hi

Could it be a virus?

Thanks EAI

Not very likely. It might be your expectations are too high....

EAI 07-02-2010 11:19 PM

100% cpu pgy0
 
How dose one capture TOP in terminal or freeze the results, because the data is changing all the time.

The earlier versions of ubuntu 10.04 do not have this problem has I have loaded these onto other machines.

It is the later 10.04 that is showing "phy0" and using 100%cpu, even on the dual core pc that I am using, the only reason that it it dose not effect that pc because it has dual core, but that is running at 100% cpu when there is no programs running.

Thanks EAI






Quote:

Originally Posted by fruttenboel (Post 4022056)
Not very likely. It might be your expectations are too high....


syg00 07-02-2010 11:32 PM

Sounds like a driver problem - stopping the network won't normally unload a driver.
I'd be keeping an eye on /proc/interrupts and the context switches (cs in vmstat for example). If either/both keep increasing quickly might indicate a driver problem. Won't hep fix it though, you'll need a specific resolution for that; google for that.

As for your "top" question, run it in batch mode with an iteration count of one - redirect it to a file
Code:

top -b -n 1 > saveit.top

EAI 07-03-2010 01:06 AM

100% cpu pgy0
 
Hi

This time I was able to freeze terminal and it is showing "phy0" using 99% cpu resources, all I have running in the back ground as a quiet state is evolution and firefox.

Thanks EAI



top - 14:01:49 up 1:50, 2 users, load average: 1.40, 0.93, 0.63
Tasks: 148 total, 2 running, 146 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.0%us, 99.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2061444k total, 564228k used, 1497216k free, 51288k buffers
Swap: 3226616k total, 0k used, 3226616k free, 263176k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
946 root 20 0 0 0 0 R 98.4 0.0 8:15.59 phy0
1755 sgu 20 0 2544 1196 904 R 0.6 0.1 0:00.14 top
231 root 20 0 0 0 0 S 0.3 0.0 0:04.09 scsi_eh_6
1185 sgu 20 0 62996 23m 7812 S 0.3 1.2 0:08.37 compiz
1531 sgu 20 0 301m 63m 27m S 0.3 3.2 1:11.22 firefox-bin
1 root 20 0 2796 1636 1192 S 0.0 0.1 0:00.43 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.48 ksoftirqd/0
5 root RT 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
6 root 20 0 0 0 0 S 0.0 0.0 0:00.08 events/0
7 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuset
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 khelper
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 netns
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 async/mgr
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pm
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 sync_supers












Quote:

Originally Posted by syg00 (Post 4022372)
Sounds like a driver problem - stopping the network won't normally unload a driver.
I'd be keeping an eye on /proc/interrupts and the context switches (cs in vmstat for example). If either/both keep increasing quickly might indicate a driver problem. Won't hep fix it though, you'll need a specific resolution for that; google for that.

As for your "top" question, run it in batch mode with an iteration count of one - redirect it to a file
Code:

top -b -n 1 > saveit.top


business_kid 07-03-2010 02:59 AM

stop yopur network, (& network manager) remove modules, etc and see if phy0 still shows top. Then tell us about your network setup

EAI 07-04-2010 01:25 AM

1oo%cpu
 
Hi

I went back to ubuntu 9.10, problem solved.

Interesting to note that before I loaded the updates for 9.10 phy0 was using the cpu to about 90%, since the updates no longer see phy0 occuring.

In 10.01 it was just causing to many interupts.

Thanks EAI


All times are GMT -5. The time now is 09:26 PM.