Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar

performing at 100%...


While it's not the default behaviour, if you run powerd(8) then
yes, the CPU will run slower when it's less utilized.

that's extra,and very useful option.

anyway even without that modern processor gets MUCH less power just when 
being halted by hlt instruction. there is still some power used for clock 
network within chip, and gate oxide leakage, but 
almost no other gate switching.


just using hlt takes down power usage to 1/3-1/5 of full power.

reducing clock with turn it down even more.

i'm not sure but turning modern processors on lower speed this way 
(powerd) change voltage down too a bit which even reduces leakage.


anyway powerd didn't work well on my laptop last time i tried, but it was 
with FreeBSD 6, maybe something changed - i will try this. maybe it will 
add some 10-20 minutes more battery life.


anyway lots of power is used by my UMTS modem, and i can't disconnect it 
as i usually do need the net while using laptop.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar


Do you actually read back what you write: you're saying here that when a CPU 
has only 10% utilization, it'll run slower than when performing at 100%...


i said it perform 10 times less work than when 100% utilized. exactly - 
read back again.



I'm giving up ;-)

looks like you just want to prove that i'm wrong, nothing else. so give 
up.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar

you are funny.




Don't ever send me private messages like that.

You are a troll who gives harmful and misleading advice.

exactly because of sentences like that i think you are funny.

sorry - but you moved this to public
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Bruce Cran
On Mon, 25 May 2009 21:42:40 +0200
Peter Boosten  wrote:

> 
> On 25 mei 2009, at 21:37, Wojciech Puchar wrote:
> 
> >> The CPU = "Central Processing Unit" will perform it's
> >> calculations at so many megahertz while at 10% utilization or at
> >> 100% utilization. The entire machine
> >
> > no. it will not. all today x86 CPUs reacts on HLT command and  
> > doesn't do anything except waiting for interrupt (and saving lots
> > of power).
> >
> 
> Do you actually read back what you write: you're saying here that
> when a CPU has only 10% utilization, it'll run slower than when
> performing at 100%...

While it's not the default behaviour, if you run powerd(8) then
yes, the CPU will run slower when it's less utilized. 
My laptop will run at between 150MHz and 2500MHz depending on the
current workload.

-- 
Bruce Cran
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Chris Rees
2009/5/25 Wojciech Puchar :
> you are funny.
>
>

Don't ever send me private messages like that.

You are a troll who gives harmful and misleading advice.

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Peter Boosten


On 25 mei 2009, at 21:37, Wojciech Puchar wrote:

The CPU = "Central Processing Unit" will perform it's calculations  
at so many megahertz while at 10% utilization or at 100%  
utilization. The entire machine


no. it will not. all today x86 CPUs reacts on HLT command and  
doesn't do anything except waiting for interrupt (and saving lots of  
power).




Do you actually read back what you write: you're saying here that when  
a CPU has only 10% utilization, it'll run slower than when performing  
at 100%...


I'm giving up ;-)

Peter

--
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar
The CPU = "Central Processing Unit" will perform it's calculations at so many 
megahertz while at 10% utilization or at 100% utilization. The entire machine


no. it will not. all today x86 CPUs reacts on HLT command and doesn't do 
anything except waiting for interrupt (and saving lots of power).



is only performing at 10% of its capacity, in your statement above.


no - CPU is performing at 10% of it's capacity. entire machine (disks, 
network etc.) is another thing.






Actually, it's a combination of both running and waiting processes.


yes that's true. i missed this - all waiting for machine resource to be 
available+those which are presently calculating something.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar

Not true.  top(1) can fully utilize the CPU.  Doing so does not put
the system under full load.


top uses small percentage of CPU power. if it would use all - it WOULD 
mean full CPU load.




load average is how much processes (by average) is not doing calculations
because something is not yet available and depends of computer resources(*)
- like CPU time, disk I/O results etc..

(*) - for example waiting on tty read is not calculated to load average as
it's depends on human not computer.


What?

exactly what i wrote. reread if you don't understand.

anyway i'm quitting this discussion as it's obvious for most people that 
can read what i mean and what CPU load/utilization mean.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Peter Boosten


On 25 mei 2009, at 21:24, Wojciech Puchar wrote:



The CPU will perform the same, whether at 10% utilization, or at  
100% utilization, the system however won't.

That's the difference between load and utilization.


still don't understand you.

CPU will not perform the same at 10% utilization, it will perform 10  
times less than at 100% utilization.


*sigh*

The CPU = "Central Processing Unit" will perform it's calculations at  
so many megahertz while at 10% utilization or at 100% utilization. The  
entire machine is only performing at 10% of its capacity, in your  
statement above.


Load = burden. Under heavy _load_ the _machine_ will become sluggish,  
but the CPU will still be performing at the same megahertz speed. You  
cannot put the CPU under load (=burden), since it was designed to  
perform at 100% (actually it can be, if the queue length gets too  
large, and then it's called load, but that's not being done in top).  
The fact that the CPU has to wait for some I/O will not influence the  
performance of the CPU, but to the entire machine.





CPU load == CPU utilization == how big percentage of time CPU (or  
CPUs by average) are doing anything except being in idle loop or hlt/ 
waiting for interrupt.

it's exactly the same words in that context.


load average is how much processes (by average) is not doing  
calculations because something is not yet available and depends of  
computer resources(*) - like CPU time, disk I/O results etc..




Actually, it's a combination of both running and waiting processes.

(*) - for example waiting on tty read is not calculated to load  
average as it's depends on human not computer.


Peter
--
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Glen Barber
On Mon, May 25, 2009 at 3:24 PM, Wojciech Puchar
 wrote:
>>
>> The CPU will perform the same, whether at 10% utilization, or at 100%
>> utilization, the system however won't.
>> That's the difference between load and utilization.
>
> still don't understand you.
>
> CPU will not perform the same at 10% utilization, it will perform 10 times
> less than at 100% utilization.
>

You are assuming this based on what?

> CPU load == CPU utilization == how big percentage of time CPU (or CPUs by
> average) are doing anything except being in idle loop or hlt/waiting for
> interrupt.
> it's exactly the same words in that context.
>

Not true.  top(1) can fully utilize the CPU.  Doing so does not put
the system under full load.

>
> load average is how much processes (by average) is not doing calculations
> because something is not yet available and depends of computer resources(*)
> - like CPU time, disk I/O results etc..
>
> (*) - for example waiting on tty read is not calculated to load average as
> it's depends on human not computer.

What?

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar


The CPU will perform the same, whether at 10% utilization, or at 100% 
utilization, the system however won't.

That's the difference between load and utilization.


still don't understand you.

CPU will not perform the same at 10% utilization, it will perform 10 times 
less than at 100% utilization.


CPU load == CPU utilization == how big percentage of time CPU (or CPUs by 
average) are doing anything except being in idle loop or hlt/waiting for 
interrupt.

it's exactly the same words in that context.


load average is how much processes (by average) is not doing calculations 
because something is not yet available and depends of computer 
resources(*) - like CPU time, disk I/O results etc..


(*) - for example waiting on tty read is not calculated to load average as 
it's depends on human not computer.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Peter Boosten


On 25 mei 2009, at 21:08, Wojciech Puchar wrote:



Regardless from what you said: you _wrote_ CPU  _load_, not cpu

what's a difference for you between "CPU load" and "CPU utilization"?
i mean CPU load not system load.


The CPU will perform the same, whether at 10% utilization, or at 100%  
utilization, the system however won't.

That's the difference between load and utilization.

Peter

--
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar


Regardless from what you said: you _wrote_ CPU  _load_, not cpu 

what's a difference for you between "CPU load" and "CPU utilization"?
i mean CPU load not system load.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Peter Boosten


On 25 mei 2009, at 19:12, Wojciech Puchar wrote:


I think Wojciech means '...which is NOT measure of CPU _utilization_'


exactly what i said.



Regardless from what you said: you _wrote_ CPU  _load_, not cpu  
_utilization_, which are two completely different thingemies. The load  
averages in top describe the state the entire machine is in, not just  
the CPU.




In that case he's correct: whenever the CPU has to wait a lot for I/ 
O,

like network and disk, then the _load_ will go up, while the CPU
_utilization_ stays low.


and that's inconsistent with explanation that load average is  
measure of CPU load.



it's not.


I never claimed load average = CPU load!

Peter
--
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar

I think Wojciech means '...which is NOT measure of CPU _utilization_'


exactly what i said.



In that case he's correct: whenever the CPU has to wait a lot for I/O,
like network and disk, then the _load_ will go up, while the CPU
_utilization_ stays low.


and that's inconsistent with explanation that load average is measure of 
CPU load.


it's not.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar


Do you ever think before you type? You regularly fill this mailing
list with crap

please don't name things "crap" just because you don't understand
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Chris Rees
2009/5/25 Peter Boosten :
> Chris Rees wrote:
>> 2009/5/25 Wojciech Puchar :
> first - says that it's measure of CPU load
> then - "or waiting for short-term events such as disk I/O" - which is NOT
> measure of CPU load.
>
 Er, what? Of course it is!

>>> amount of disk I/O is a measure of CPU load? seems you are true expert ;)
>>>
>>
>> Do you ever think before you type? You regularly fill this mailing
>> list with crap, incorrect advice, and correcting experts on topics
>> that you haven't got a clue on.
>>
>> Just google load average and see for yourself.
>>
>> Remember checking things before making oneself look a fool? Perhaps
>> you used to do that at one time, most other people do.
>>
>> Chris
>>
>
> I think Wojciech means '...which is NOT measure of CPU _utilization_'
>
> In that case he's correct: whenever the CPU has to wait a lot for I/O,
> like network and disk, then the _load_ will go up, while the CPU
> _utilization_ stays low.
>
> Peter
>
>

I appreciate that while English may not be people's first language,
and most have excellent skills (including Wojciech, don't get me
wrong) there is still a responsibility to make sure you can be
understood. He has been trying to mock me in my understanding of what
he wrote:

>>> amount of disk I/O is a measure of CPU load? seems you are true expert ;)

If you're going to do this, you should make sure that what you WROTE,
not mean, is correct. Otherwise, misinformation spreads and is saved
in these archives for someone to stumble upon.

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Peter Boosten
Chris Rees wrote:
> 2009/5/25 Wojciech Puchar :
 first - says that it's measure of CPU load
 then - "or waiting for short-term events such as disk I/O" - which is NOT
 measure of CPU load.

>>> Er, what? Of course it is!
>>>
>> amount of disk I/O is a measure of CPU load? seems you are true expert ;)
>>
> 
> Do you ever think before you type? You regularly fill this mailing
> list with crap, incorrect advice, and correcting experts on topics
> that you haven't got a clue on.
> 
> Just google load average and see for yourself.
> 
> Remember checking things before making oneself look a fool? Perhaps
> you used to do that at one time, most other people do.
> 
> Chris
> 

I think Wojciech means '...which is NOT measure of CPU _utilization_'

In that case he's correct: whenever the CPU has to wait a lot for I/O,
like network and disk, then the _load_ will go up, while the CPU
_utilization_ stays low.

Peter


-- 
http://www.boosten.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Chris Rees
2009/5/25 Wojciech Puchar :
>>> first - says that it's measure of CPU load
>>> then - "or waiting for short-term events such as disk I/O" - which is NOT
>>> measure of CPU load.
>>>
>>
>> Er, what? Of course it is!
>>
> amount of disk I/O is a measure of CPU load? seems you are true expert ;)
>

Do you ever think before you type? You regularly fill this mailing
list with crap, incorrect advice, and correcting experts on topics
that you haven't got a clue on.

Just google load average and see for yourself.

Remember checking things before making oneself look a fool? Perhaps
you used to do that at one time, most other people do.

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar

first - says that it's measure of CPU load
then - "or waiting for short-term events such as disk I/O" - which is NOT
measure of CPU load.



Er, what? Of course it is!


amount of disk I/O is a measure of CPU load? seems you are true expert ;)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Wojciech Puchar

first - says that it's measure of CPU load
then - "or waiting for short-term events such as disk I/O" - which is NOT
measure of CPU load.


You are mistaken.  I think what you are referring to is the percentage of


no i'm not. doing lots of I/O and little CPU load produces high "load 
average".


the explanation from the book is wrong.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Chris Rees
2009/5/24 Wojciech Puchar :
>>    From the glossary (p. 630) of _The_Design_and_Implementation_of_the
>> _FreeBSD_Operating_System_ by McKusick and Neville-Neil:
>>
>>        load average  A measure of CPU load on the system.  The load
>> average
>>                in FreeBSD is an average of the number of processes ready
>> to
>>                run or waiting for short-term events such as disk I/O to
>>                complete, as sampled once per second over the previous one-
>>                minute interval of system operation.
>>
> so this glossary should be fixed because it's nonsense.
>
> first - says that it's measure of CPU load
> then - "or waiting for short-term events such as disk I/O" - which is NOT
> measure of CPU load.
>

Er, what? Of course it is!

Chris

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Ivan Voras
Yuri wrote:
> Look below: load over 7 and no processes take much CPU.
> 
> Yuri
> 
> 7.2-PRERELEASE, 32-bit on i7-920.
> 
> 
> last pid: 93192;  load averages:  7.68,  6.27, 
> 4.61  
>  
> up 2+03:11:29  20:25:24
> 204 processes: 9 running, 193 sleeping, 1 stopped, 1 zombie
> CPU:  5.3% user,  0.0% nice,  0.0% system,  0.0% interrupt, 94.7% idle
> Mem: 867M Active, 1684M Inact, 279M Wired, 65M Cache, 112M Buf, 92M Free
> Swap: 16G Total, 142M Used, 16G Free

Couple of possible reasons:

1) You have many short lived processes that are spawned, do some work
and die (some kind of web server?). You can't see them because they live
too shortly. See if the "last pid" is rapidly increasing. Also, hit "H"
to display individual threads.
2) You have kernel processes that are doing some intermittent work. Hit
"S" to see them.

In any case, see the line where it says "9 running" processes? This is
where the load average comes from. The CPU utilization is not directly
related to the load average.

Load average is not scaled to NCPU - a count of "7" (or in your case,
aymptotically 9) means there are 7 (or 9) processes wanting to run.

The "global" CPU utilization (the "CPU:" line) *is* scaled to NCPU -
100% here means all CPUs are busy all the time.

Individual processes' CPU utilization *isn't* scaled to NCPU. A process
taking 100% CPU on its own means it only requires / runs on 1 CPU. A
multithreading process can have, for example, 400% CPU utilization and
the global CPU utilization can be <= 100%.




signature.asc
Description: OpenPGP digital signature


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-25 Thread Scott Bennett
 On Sun, 24 May 2009 20:22:37 +0200 (CEST) Wojciech Puchar
 wrote, *again* without attribution:
>> From the glossary (p. 630) of _The_Design_and_Implementation_of_the
>> _FreeBSD_Operating_System_ by McKusick and Neville-Neil:
>>
>>  load average  A measure of CPU load on the system.  The load average
>>  in FreeBSD is an average of the number of processes ready to
>>  run or waiting for short-term events such as disk I/O to
>>  complete, as sampled once per second over the previous one-
>>  minute interval of system operation.
>>
>so this glossary should be fixed because it's nonsense.
>
>first - says that it's measure of CPU load
>then - "or waiting for short-term events such as disk I/O" - which is NOT 
>measure of CPU load.

 You are mistaken.  I think what you are referring to is the percentage of
CPU usage, not CPU load.  Note that CPU usage can never exceed 100% per CPU,
laying aside confusion over application of this term to hyperthreading chips,
whereas CPU load obviously can be much higher.  It might help you to think of
"CPU load" as "CPU commitment".
 If you wish to design an operating system and then write its
documentation, you will, of course, be free to define terms relating to your
system in whatever manner you like.  However, the authors of the book are not
only among the architects of FreeBSD, but also 4.?BSD UNIX and possibly earlier
versions of BSD UNIX.  They have been good enough to document what they have
done and to define what they mean by terms used in that documentation and
throughout the system, which most of the non-self-righteously arrogant members
of the community appreciate.  Treat the information in this book as having come
from the horses' mouths, excepting only those parts that have been added/
changed/deleted since FreeBSD 5.2.
 FWIW, the concept of load average in UNIX is quite old.  I don't know
exactly how old it is, but it may date back to 7th Ed. UNIX from AT&T or even
earlier.  BSD UNIX branched off about that time or possibly 6th Ed.
 The definition of load average cited above is essentially the average
length of the queue of runnable processes (including those that are currently
running) plus the processes expected to be runnable in the immediate future,
e.g., much sooner than a hypothetical process that has been swapped out could
be made runnable.


  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Glen Barber
On Sun, May 24, 2009 at 3:02 PM, Michael David Crawford  wrote:
> This guy advises buying an old G4 Mac laptop to use as a netbook:
>
>   http://lowendmac.com/ed/herlihy/09ph/ibook-netbook.html
>
> While Apple might be planning to stop supporting PowerPC, one could run
> FreeBSD on it.
>
> Mac-Pro has good prices on used Mac laptops.  A G4 PowerBook is $500 to $650
> depending on what kind of burner is installed.
>
>   http://www.mac-pro.com/s.nl/sc.2/category.66/.f
>
> I was just now looking into ARM netbooks.  I think there's only one actual
> shipping model so far, but ARM shows great promise because ARM CPUs use very
> little power.  I expect there will be lots of them by the end of the year.
>
> Is there a FreeBSD ARM port? There's not one for 7.2.
>

How did this topic get switched to netbooks?

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Wojciech Puchar



Is there a FreeBSD ARM port? There's not one for 7.2.


I'm not aware of one, but I think NetBSD has it. But
finally, NetBSD isn't FreeBSD. :-)
quite a big difference. was enough for me to switch to FreeBSD some time 
ago.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Wojciech Puchar
I was just now looking into ARM netbooks.  I think there's only one actual 
shipping model so far, but ARM shows great promise because ARM CPUs use very 
little power.  I expect there will be lots of them by the end of the year.


Is there a FreeBSD ARM port? There's not one for 7.2.


there are for some ARM CPUs in source tree.



Mike
--
Michael David Crawford
m...@prgmr.com

  prgmr.com - We Don't Assume You Are Stupid.

 Xen-Powered Virtual Private Servers: http://prgmr.com/xen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Polytropon
On Sun, 24 May 2009 12:02:41 -0700, Michael David Crawford  
wrote:
> Mac-Pro has good prices on used Mac laptops.  A G4 PowerBook is $500 to 
> $650 depending on what kind of burner is installed.
> 
> http://www.mac-pro.com/s.nl/sc.2/category.66/.f

Hmmm... I still think about reviving my iBook G4, maybe
it gives a good Netbook-lookalike. :-)


> I was just now looking into ARM netbooks.  I think there's only one 
> actual shipping model so far, but ARM shows great promise because ARM 
> CPUs use very little power.  I expect there will be lots of them by the 
> end of the year.

Thre has been an interesting article on OSNews lately:


http://www.osnews.com/story/21530/The_Loongson-2_MIPS_Lemote_Yeeloong_Netbook

Maybe this is interesting, too.



> Is there a FreeBSD ARM port? There's not one for 7.2.

I'm not aware of one, but I think NetBSD has it. But
finally, NetBSD isn't FreeBSD. :-)



-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Michael David Crawford

This guy advises buying an old G4 Mac laptop to use as a netbook:

   http://lowendmac.com/ed/herlihy/09ph/ibook-netbook.html

While Apple might be planning to stop supporting PowerPC, one could run 
FreeBSD on it.


Mac-Pro has good prices on used Mac laptops.  A G4 PowerBook is $500 to 
$650 depending on what kind of burner is installed.


   http://www.mac-pro.com/s.nl/sc.2/category.66/.f

I was just now looking into ARM netbooks.  I think there's only one 
actual shipping model so far, but ARM shows great promise because ARM 
CPUs use very little power.  I expect there will be lots of them by the 
end of the year.


Is there a FreeBSD ARM port? There's not one for 7.2.

Mike
--
Michael David Crawford
m...@prgmr.com

   prgmr.com - We Don't Assume You Are Stupid.

  Xen-Powered Virtual Private Servers: http://prgmr.com/xen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Wojciech Puchar

From the glossary (p. 630) of _The_Design_and_Implementation_of_the
_FreeBSD_Operating_System_ by McKusick and Neville-Neil:

load average  A measure of CPU load on the system.  The load average
in FreeBSD is an average of the number of processes ready to
run or waiting for short-term events such as disk I/O to
complete, as sampled once per second over the previous one-
minute interval of system operation.


so this glossary should be fixed because it's nonsense.

first - says that it's measure of CPU load
then - "or waiting for short-term events such as disk I/O" - which is NOT 
measure of CPU load.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Scott Bennett
 On Sun, 24 May 2009 11:57:08 +0200 (CEST) Wojciech Puchar
 wrote without proper attribution:
>> Look below: load over 7 and no processes take much CPU.
>
>load average is NOT sum of CPU loads.
>
>for example program reading constantly from HDD and using no CPU will add 
>1 to load average.
>
>other things like net I/O etc. are calculated too. i can't explain you 
>exactly how because i don't know precisely.
>
>but load average is total load not just CPU load
>
 From the glossary (p. 630) of _The_Design_and_Implementation_of_the
_FreeBSD_Operating_System_ by McKusick and Neville-Neil:

load average  A measure of CPU load on the system.  The load average
in FreeBSD is an average of the number of processes ready to
run or waiting for short-term events such as disk I/O to
complete, as sampled once per second over the previous one-
minute interval of system operation.

In the same volume in the discussion of "Calculations of Thread Priority" by
the 4.4 BSD scheduler (p. 101), it says,

"... the *load* is a sampled average of the sum of the lengths of the
run queue and of the short-term sleep queue over the previous 1-minute
interval of system operation."

Seems pretty straightforward to me.

  Scott Bennett, Comm. ASMELG, CFIAG
**
* Internet:   bennett at cs.niu.edu  *
**
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."   *
*-- Gov. John Hancock, New York Journal, 28 January 1790 *
**
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Wojciech Puchar



Look below: load over 7 and no processes take much CPU.


load average is NOT sum of CPU loads.

for example program reading constantly from HDD and using no CPU will add 
1 to load average.


other things like net I/O etc. are calculated too. i can't explain you 
exactly how because i don't know precisely.


but load average is total load not just CPU load




Yuri

7.2-PRERELEASE, 32-bit on i7-920.




last pid: 93192;  load averages:  7.68,  6.27,  4.61 
up 2+03:11:29  20:25:24

204 processes: 9 running, 193 sleeping, 1 stopped, 1 zombie
CPU:  5.3% user,  0.0% nice,  0.0% system,  0.0% interrupt, 94.7% idle
Mem: 867M Active, 1684M Inact, 279M Wired, 65M Cache, 112M Buf, 92M Free
Swap: 16G Total, 142M Used, 16G Free

PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
60032 yuri  1  460   285M   183M select 0  41:15  0.59% Xorg
60400 yuri  1   40 12576K  9144K kqread 4  29:44  0.00% 
wineserver

92982 yuri  1  440 53012K 16800K CPU3   3  18:50  0.00% kdeinit4
92986 yuri  1  440 53012K 16800K CPU7   7  18:48  0.00% kdeinit4
92988 yuri  1 1070 53012K 16840K CPU6   6  17:22  0.00% kdeinit4
60104 yuri  1  440   132M 45860K select 0  16:58  0.00% kwin
92984 yuri  1 1170 53012K 16800K RUN5  14:56  0.00% kdeinit4
60096 yuri  1  440 89732K 30040K select 4  10:10  0.00% kded4
93141 yuri  1  530 53012K 16800K CPU5   5   3:52  0.00% kdeinit4
93139 yuri  1  440 53012K 16800K CPU1   1   3:30  0.00% kdeinit4
60174 yuri  1  440  3168K  1400K select 0   1:28  0.00% 
ksysguardd

450 root  1   40  3128K   800K select 4   0:44  0.00% dhclient
1131 messagebus1   40  3344K  1384K select 4   0:40  0.00% 
dbus-daemon


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Glen Barber
On Sun, May 24, 2009 at 5:07 AM, Matthew Seaman wrote:
>>
>> I thought, if it was a dual-core for example, a load average of 1.00
>> would indicate 50% CPU utilization overall (1 process using only 1
>> core)[1].  2.00 on a dual-core would be 100%, 3.00 on a dual-core
>> would be 100% utilization, and always 1 process in the wait queue, and
>> so on.
>
> It seems both ways have been used in different OSes, which is confusing.
> A quick test of a single threaded process that will spin one CPU on a
> multi-core FreeBSD box shows the value is /not/ scaled by the number of
> cores.
>

Meaning a load average of 1.00 on a single-core versus dual-core means
the same thing?  I can't tell if you said what I said (or meant) with
different wording, or if you said the opposite.  :-)

> Which means that the LA the OP was talking about is actually a lot less
> alarming
> than it originally appears.  It's clear from the top output that his machine
> has at least 8 cores, so a LA of 7 is really not very heavily loaded.
>

So in this situation, he has 1 core idle all of the time, correct?

>>
>> Does this affect the load average though?  My understanding was that
>> if the CPU cannot immediately process data, the data gets put into the
>> wait queue until L2 Cache (then RAM, etc, etc) returns the data to be
>> processed.
>
> Yes it does: when a process is on the CPU and blocked waiting for IO
> it does not necessarily yield the CPU to another process.  It depends on
> timescales -- obviously if the CPU will have to wait milliseconds for data
> it makes no sense to block other processes.  Waiting a few microseconds is
> a different matter though: it might take that long to load up L2/L3 cache
> with that processes' working data, so yielding the CPU for that sort of
> delay
> would mean the process never got run, which is counter productive...  It
> helps if the working set is already in the L3 cache -- so having the correct
> amount[*] of cache RAM available is an important design criterion.

Makes sense.

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Matthew Seaman

Glen Barber wrote:

Hi, Matthew

On Sun, May 24, 2009 at 3:46 AM, Matthew Seaman
 wrote:

Yuri wrote:


[snip]


Sure. This is not an uncommon occurrence really.  The load average is
the number of processes in the queue for a CPU time slice averaged over
5, 10 or 15 minutes.  For multi-core systems the LA is scaled by the number
of cores so a LA of 1.0 means all cores have active processes pretty much
continually.



I thought, if it was a dual-core for example, a load average of 1.00
would indicate 50% CPU utilization overall (1 process using only 1
core)[1].  2.00 on a dual-core would be 100%, 3.00 on a dual-core
would be 100% utilization, and always 1 process in the wait queue, and
so on.


It seems both ways have been used in different OSes, which is confusing.
A quick test of a single threaded process that will spin one CPU on a
multi-core FreeBSD box shows the value is /not/ scaled by the number of cores.

Which means that the LA the OP was talking about is actually a lot less alarming
than it originally appears.  It's clear from the top output that his machine
has at least 8 cores, so a LA of 7 is really not very heavily loaded.


Now, you might think that an active process will take the CPU utilisation
to 100%, but that is not necessarily so.  Some numerical applications can
do that, but purely CPU bound processes are relatively uncommon in everyday
usage.  In actuality what happens is that the processor will need to
retrieve
data from somewhere to operate on.  There's a hierarchy of data stores of
various speeds (latency, rather than bandwidth):

 L1 Cache > L2 Cache > L3 Cache > Main RAM > Disk > Network



Does this affect the load average though?  My understanding was that
if the CPU cannot immediately process data, the data gets put into the
wait queue until L2 Cache (then RAM, etc, etc) returns the data to be
processed.


Yes it does: when a process is on the CPU and blocked waiting for IO
it does not necessarily yield the CPU to another process.  It depends on
timescales -- obviously if the CPU will have to wait milliseconds for data
it makes no sense to block other processes.  Waiting a few microseconds is
a different matter though: it might take that long to load up L2/L3 cache
with that processes' working data, so yielding the CPU for that sort of delay
would mean the process never got run, which is counter productive...  It
helps if the working set is already in the L3 cache -- so having the correct
amount[*] of cache RAM available is an important design criterion.  It's 
something
that Intel was shown to have got wrong with some of the Pentium series chips
when a low powered Pentium M designed for mobile use smoked a much higher
clock speed Pentium chip designed for all-out server use simply because it had
about 4x as much cache.

Cheers,

Matthew

[*] ie. as much as possible.

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Glen Barber
Hi, Matthew

On Sun, May 24, 2009 at 3:46 AM, Matthew Seaman
 wrote:
> Yuri wrote:

[snip]

>
> Sure. This is not an uncommon occurrence really.  The load average is
> the number of processes in the queue for a CPU time slice averaged over
> 5, 10 or 15 minutes.  For multi-core systems the LA is scaled by the number
> of cores so a LA of 1.0 means all cores have active processes pretty much
> continually.
>

I thought, if it was a dual-core for example, a load average of 1.00
would indicate 50% CPU utilization overall (1 process using only 1
core)[1].  2.00 on a dual-core would be 100%, 3.00 on a dual-core
would be 100% utilization, and always 1 process in the wait queue, and
so on.

> Now, you might think that an active process will take the CPU utilisation
> to 100%, but that is not necessarily so.  Some numerical applications can
> do that, but purely CPU bound processes are relatively uncommon in everyday
> usage.  In actuality what happens is that the processor will need to
> retrieve
> data from somewhere to operate on.  There's a hierarchy of data stores of
> various speeds (latency, rather than bandwidth):
>
>  L1 Cache > L2 Cache > L3 Cache > Main RAM > Disk > Network
>

Does this affect the load average though?  My understanding was that
if the CPU cannot immediately process data, the data gets put into the
wait queue until L2 Cache (then RAM, etc, etc) returns the data to be
processed.


[1] - http://www.teamquest.com/resources/gunther/display/5/ (not
necessarily a reputable source I suppose, but explains it well...)

-- 
Glen Barber
570.328.0318
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-24 Thread Matthew Seaman

Yuri wrote:

Look below: load over 7 and no processes take much CPU.

Yuri

7.2-PRERELEASE, 32-bit on i7-920.




last pid: 93192;  load averages:  7.68,  6.27,  
4.61
up 2+03:11:29  20:25:24

204 processes: 9 running, 193 sleeping, 1 stopped, 1 zombie
CPU:  5.3% user,  0.0% nice,  0.0% system,  0.0% interrupt, 94.7% idle
Mem: 867M Active, 1684M Inact, 279M Wired, 65M Cache, 112M Buf, 92M Free
Swap: 16G Total, 142M Used, 16G Free

 PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
60032 yuri  1  460   285M   183M select 0  41:15  0.59% Xorg
60400 yuri  1   40 12576K  9144K kqread 4  29:44  0.00% 
wineserver
92982 yuri  1  440 53012K 16800K CPU3   3  18:50  0.00% 
kdeinit4
92986 yuri  1  440 53012K 16800K CPU7   7  18:48  0.00% 
kdeinit4
92988 yuri  1 1070 53012K 16840K CPU6   6  17:22  0.00% 
kdeinit4

60104 yuri  1  440   132M 45860K select 0  16:58  0.00% kwin
92984 yuri  1 1170 53012K 16800K RUN5  14:56  0.00% 
kdeinit4

60096 yuri  1  440 89732K 30040K select 4  10:10  0.00% kded4
93141 yuri  1  530 53012K 16800K CPU5   5   3:52  0.00% 
kdeinit4
93139 yuri  1  440 53012K 16800K CPU1   1   3:30  0.00% 
kdeinit4
60174 yuri  1  440  3168K  1400K select 0   1:28  0.00% 
ksysguardd

 450 root  1   40  3128K   800K select 4   0:44  0.00% dhclient
1131 messagebus1   40  3344K  1384K select 4   0:40  0.00% 
dbus-daemon


Sure. This is not an uncommon occurrence really.  The load average is
the number of processes in the queue for a CPU time slice averaged over
5, 10 or 15 minutes.  For multi-core systems the LA is scaled by the number
of cores so a LA of 1.0 means all cores have active processes pretty much
continually.

Now, you might think that an active process will take the CPU utilisation
to 100%, but that is not necessarily so.  Some numerical applications can
do that, but purely CPU bound processes are relatively uncommon in everyday
usage.  In actuality what happens is that the processor will need to retrieve
data from somewhere to operate on.  There's a hierarchy of data stores of
various speeds (latency, rather than bandwidth):

  L1 Cache > L2 Cache > L3 Cache > Main RAM > Disk > Network

Where the L1 Cache is accessible in a few clock ticks (nanoseconds), Main 
RAM can take microseconds to access, disk can take milliseconds to access,

and Network can take 10 -- 1000s of milliseconds.

Or in other words, about 9 orders of magnitude difference.  So when the data
you need to process is too big to fit in the fastest caches, or when it comes
from a particularly slow location or when you have a lot of active processes
causing context switches, then the CPU core will be making frequent IO requests
and spending time waiting for them to be fulfilled.  


Now, for sources like disks and network where the retrieval is much slower than
the typical timescale of events on the CPU the process will yield the CPU to
something else and only get a new timeslice once the IO request has been
fulfilled.  For an access to main RAM however that form of yielding is less
likely.  Consequently the CPU can end up waiting for 100s of clock cycles until
it gets some bytes to process.  In the mean time, other processes are also 
sitting
in the queue wanting CPU time slices -- hence the high LA with low CPU 
utilization.

Scheduling CPU timeslices to make maximum use of available resources is the
difference between a really performant OS and a disaster.  A good scheduler
is the critical central piece of code around which the rest of an OS can be 
constructed.  Combine that with the complexity of having multiple cores, and
that threads of execution sometimes have to be moved to different cores, and
on other occasions sometimes need to stick to the same core in order to make
best use of resources and you will start to appreciate quite how hard it is to
write a good scheduler.  Unsurprisingly, the design of such things is a matter
of fairly impassioned debate amongst the rarified circle of people capable of
writing them.  That sort of argument was the genesis of the FreeBSD / 
DragonflyBSD
fork a few years back.  You can rest assured though that FreeBSD certainly does
have one of the very best schedulers currently available and it is specifically
targeted at getting the best out of the sort of multicore CPUs available 
nowadays.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


How can this 'top' command output make sense? Load over 7 and total CPU use ~5%

2009-05-23 Thread Yuri

Look below: load over 7 and no processes take much CPU.

Yuri

7.2-PRERELEASE, 32-bit on i7-920.




last pid: 93192;  load averages:  7.68,  6.27,  
4.61
up 2+03:11:29  20:25:24

204 processes: 9 running, 193 sleeping, 1 stopped, 1 zombie
CPU:  5.3% user,  0.0% nice,  0.0% system,  0.0% interrupt, 94.7% idle
Mem: 867M Active, 1684M Inact, 279M Wired, 65M Cache, 112M Buf, 92M Free
Swap: 16G Total, 142M Used, 16G Free

 PID USERNAMETHR PRI NICE   SIZERES STATE  C   TIME   WCPU COMMAND
60032 yuri  1  460   285M   183M select 0  41:15  0.59% Xorg
60400 yuri  1   40 12576K  9144K kqread 4  29:44  0.00% 
wineserver

92982 yuri  1  440 53012K 16800K CPU3   3  18:50  0.00% kdeinit4
92986 yuri  1  440 53012K 16800K CPU7   7  18:48  0.00% kdeinit4
92988 yuri  1 1070 53012K 16840K CPU6   6  17:22  0.00% kdeinit4
60104 yuri  1  440   132M 45860K select 0  16:58  0.00% kwin
92984 yuri  1 1170 53012K 16800K RUN5  14:56  0.00% kdeinit4
60096 yuri  1  440 89732K 30040K select 4  10:10  0.00% kded4
93141 yuri  1  530 53012K 16800K CPU5   5   3:52  0.00% kdeinit4
93139 yuri  1  440 53012K 16800K CPU1   1   3:30  0.00% kdeinit4
60174 yuri  1  440  3168K  1400K select 0   1:28  0.00% 
ksysguardd

 450 root  1   40  3128K   800K select 4   0:44  0.00% dhclient
1131 messagebus1   40  3344K  1384K select 4   0:40  0.00% 
dbus-daemon


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"