Re: Oddly high load average

2008-11-08 Thread William Boshuck
On Fri, Nov 07, 2008 at 10:09:08PM -0700, Theo de Raadt wrote:
  You're right Theo, but isn't better an answer like: RTFC ? Just 4 char.
 
 There is no point in telling people who can't read the code, to go
 read the code.  It won't change a thing.  They really will keep coming
 back to misc showing their false expectations.

If he reads _learn_ the code as stare blankly at the code for
fifteen minutes and then ask another question, then I've done
the list a disservice.  But I don't think it's ridiculous to
emphasize that OpenBSD is a rational and well documented system
that can be learned gradually by someone who is willing to take
the time.  Maybe you're right that it won't sink in, though.



Re: Oddly high load average

2008-11-08 Thread raven

Theo de Raadt ha scritto:

You're right Theo, but isn't better an answer like: RTFC ? Just 4 char.



There is no point in telling people who can't read the code, to go
read the code.  It won't change a thing.  They really will keep coming
back to misc showing their false expectations.

  
I think that if the code is written well is self explanatory. And AFAIK 
OpenBSD code is so.
If he understand or not isnt our business...Maybe, he can ask why it's 
different but...who cares about it.



I think the mailing lists would be better if it wasn't always full of
people asking stupid questions, and then being answered by people with
ridiculous or uneducated answers.

Not that I want to be here providing the correct answers.  Why bother?
They won't be understood, and it isn't worth our time to explain things
properly.

But it also isn't worth anyone's time to see stupid questions answered
with stupid answers, is it.
  

There are no stupid questions, only stupid people! (south park cit.)
I agree with you Theo sometimes misc@ is a dumb cove, just because 
people dont search enough and just ask to others...




Re: Oddly high load average

2008-11-08 Thread Christoph Leser
 I think the mailing lists would be better if it wasn't always full of
 people asking stupid questions, and then being answered by people with
 ridiculous or uneducated answers.

 Not that I want to be here providing the correct answers.  Why bother?
 They won't be understood, and it isn't worth our time to explain things
 properly.

 But it also isn't worth anyone's time to see stupid questions answered
 with stupid answers, is it.

I confess that I have asked stupid questions here too. Nevertheless the
replies I got sometimes helped me out. So I even dared to answer to a few
messages, although I may well be considered uneducated or even ridiculous.

Sorry for this. I promise to keep my mouth shut in the future :-)



Re: Oddly high load average

2008-11-07 Thread Theo de Raadt
 The load average on my machine is inexplicably high; when idle, it sits up
 between 0.6 and 0.7.

Oh my god, the horror. Nothing is wrong with your machine at all.
However, I have a diff which will probably keep you happy.

Index: uvm_meter.c
===
RCS file: /cvs/src/sys/uvm/uvm_meter.c,v
retrieving revision 1.24
diff -u -r1.24 uvm_meter.c
--- uvm_meter.c 15 Dec 2007 03:42:57 -  1.24
+++ uvm_meter.c 7 Nov 2008 17:11:45 -
@@ -138,6 +138,7 @@
int rv, t;
struct _ps_strings _ps = { PS_STRINGS };
extern int uvm_km_pages_free;
+   struct loadavg gerow_averunnable;
 
switch (name[0]) {
case VM_SWAPENCRYPT:
@@ -156,8 +157,9 @@
 
switch (name[0]) {
case VM_LOADAVG:
-   return (sysctl_rdstruct(oldp, oldlenp, newp, averunnable,
-   sizeof(averunnable)));
+   bzero(gerow_averunnable, sizeof gerow_averunnable);
+   return (sysctl_rdstruct(oldp, oldlenp, newp, gerow_averunnable,
+   sizeof(gerow_averunnable)));
 
case VM_METER:
uvm_total(vmtotals);



Re: Oddly high load average

2008-11-07 Thread Mark Zimmerman
On Fri, Nov 07, 2008 at 11:51:51AM -0500, Damian Gerow wrote:
 The load average on my machine is inexplicably high; when idle, it sits up
 between 0.6 and 0.7.  Though I'm running a snapshot from last night, I've
 seen the same behaviour since I first installed a 4.4 snapshot from about
 three weeks ago.  This is on a Lenovo X200.
 
snip
 
 So, what exactly is my machine doing?  Note that this doesn't really seem to
 be causing me any grief: apmd is properly dropping my cpuspeed, hw.sensors
snip

I bet you could get your load average to drop if you forced your cpu
to run full speed even when doing nothing. I am guessing that this is
not really what you want.

-- Mark



Re: Oddly high load average

2008-11-07 Thread Damian Gerow
Mark Zimmerman wrote:
: I bet you could get your load average to drop if you forced your cpu
: to run full speed even when doing nothing. I am guessing that this is
: not really what you want.

Not only would that not fix it, it doesn't make any sense, either.  If my
machine has no workload, increasing the available power to process said
nonexistant workload isn't going to change anything.

And let's not forget that I'm curious to find out why the load average is up
there when there's no apparent workload; dropping the load average is not
really the goal of the question.



Re: Oddly high load average

2008-11-07 Thread Theo de Raadt
 Not only would that not fix it, it doesn't make any sense, either.  If my
 machine has no workload, increasing the available power to process said
 nonexistant workload isn't going to change anything.
 
 And let's not forget that I'm curious to find out why the load average is up
 there when there's no apparent workload; dropping the load average is not
 really the goal of the question.

Looks like you don't know the algorithms used to calculate the number.
But it is clearly beyond your skills to go read the source.  Such a
shame that we make source code available for people who can't learn,
and only know how to complain.

It does not work how you think it does.  We are not going to explain
it in detail to you because you would not understand.



Re: Oddly high load average

2008-11-07 Thread Damian Gerow
Theo de Raadt wrote:
:  The load average on my machine is inexplicably high; when idle, it sits up
:  between 0.6 and 0.7.
: 
: Oh my god, the horror. Nothing is wrong with your machine at all.
: However, I have a diff which will probably keep you happy.

Not sure if you caught my last paragraph, but I did say that nothing was
wrong with the system at all, I'm just curious as to why the average is
high.



Re: Oddly high load average

2008-11-07 Thread Damian Gerow
Theo de Raadt wrote:
: Looks like you don't know the algorithms used to calculate the number.
: But it is clearly beyond your skills to go read the source.

I would assume you're referring to uvm_loadav in uvm_meter.c?  That's where
I'm looking.  I was hoping for a little English to help me with my
understanding, but maybe I'm just not clever enough.



Re: Oddly high load average

2008-11-07 Thread Duncan Patton a Campbell
On Fri, 7 Nov 2008 13:16:38 -0500
Damian Gerow [EMAIL PROTECTED] wrote:

 Theo de Raadt wrote:
 :  The load average on my machine is inexplicably high; when idle, it sits up
 :  between 0.6 and 0.7.
 : 
 : Oh my god, the horror. Nothing is wrong with your machine at all.
 : However, I have a diff which will probably keep you happy.
 
 Not sure if you caught my last paragraph, but I did say that nothing was
 wrong with the system at all, I'm just curious as to why the average is
 high.
 
 

The simple explanation is found in Mark Zimmerman's reply:

I bet you could get your load average to drop if you forced your cpu
to run full speed even when doing nothing. I am guessing that this is
not really what you want.


I guess you are assuming the load average is calculated against some
a-priori max available cpu-cycles when, from Theo's posts, it looks 
like it is being calculated against current available cycles.
When your cpu is in a power-save mode it has less cycles available,
so the minimal load you place on it still consumes a higher fraction
of what is available.

Dhu



Re: Oddly high load average

2008-11-07 Thread Theo de Raadt
 On Fri, 7 Nov 2008 13:16:38 -0500
 Damian Gerow [EMAIL PROTECTED] wrote:
 
  Theo de Raadt wrote:
  :  The load average on my machine is inexplicably high; when idle, it sits 
  up
  :  between 0.6 and 0.7.
  : 
  : Oh my god, the horror. Nothing is wrong with your machine at all.
  : However, I have a diff which will probably keep you happy.
  
  Not sure if you caught my last paragraph, but I did say that nothing was
  wrong with the system at all, I'm just curious as to why the average is
  high.
  
  
 
 The simple explanation is found in Mark Zimmerman's reply:
 
 I bet you could get your load average to drop if you forced your cpu
 to run full speed even when doing nothing. I am guessing that this is
 not really what you want.
 

Wrong.

 I guess you are assuming the load average is calculated against some
 a-priori max available cpu-cycles when, from Theo's posts, it looks 
 like it is being calculated against current available cycles.

Wrong.

 When your cpu is in a power-save mode it has less cycles available,
 so the minimal load you place on it still consumes a higher fraction
 of what is available.

Wrong.



Re: Oddly high load average

2008-11-07 Thread disintx
I won't pretend to understand how OpenBSD calculates its load averages, but
keep in mind that not every OS calculates them the same.

For instance, my OpenBSD box:
$ uptime
11:46AM  up 3 days, 18:29, 1 user, load averages: 0.08, 0.08, 0.08
I have a .08 load average and there are no services other than sshd and pf
running.

If your performance isn't taking a hit, don't worry about it.



Re: Oddly high load average

2008-11-07 Thread Duncan Patton a Campbell
On Fri, 07 Nov 2008 12:30:21 -0700
Theo de Raadt [EMAIL PROTECTED] wrote:

  On Fri, 7 Nov 2008 13:16:38 -0500
  Damian Gerow [EMAIL PROTECTED] wrote:
  
   Theo de Raadt wrote:
   :  The load average on my machine is inexplicably high; when idle, it 
   sits up
   :  between 0.6 and 0.7.
   : 
   : Oh my god, the horror. Nothing is wrong with your machine at all.
   : However, I have a diff which will probably keep you happy.
   
   Not sure if you caught my last paragraph, but I did say that nothing was
   wrong with the system at all, I'm just curious as to why the average is
   high.
   
   
  
  The simple explanation is found in Mark Zimmerman's reply:
  
  I bet you could get your load average to drop if you forced your cpu
  to run full speed even when doing nothing. I am guessing that this is
  not really what you want.
  
 
 Wrong.
 
  I guess you are assuming the load average is calculated against some
  a-priori max available cpu-cycles when, from Theo's posts, it looks 
  like it is being calculated against current available cycles.
 

Ok.  So considering the speed with which this patch appeared I'm going 
to assume there's more here than meets the eye.  Just the same it looked
like a sampling (when/where) issue to me.

 Wrong.
 
  When your cpu is in a power-save mode it has less cycles available,
  so the minimal load you place on it still consumes a higher fraction
  of what is available.
 
 Wrong.



Re: Oddly high load average

2008-11-07 Thread Theo de Raadt
 I won't pretend to understand how OpenBSD calculates its load averages, but
 keep in mind that not every OS calculates them the same.
 
 For instance, my OpenBSD box:
 $ uptime
 11:46AM  up 3 days, 18:29, 1 user, load averages: 0.08, 0.08, 0.08
 I have a .08 load average and there are no services other than sshd and pf
 running.
 
 If your performance isn't taking a hit, don't worry about it.

And if you really are worried, use the patch I mailed out earlier,
and the load will always be zero.  Then there are no more worries!



Re: Oddly high load average

2008-11-07 Thread J Sisson
On Fri, Nov 7, 2008 at 1:49 PM, Duncan Patton a Campbell 
[EMAIL PROTECTED] wrote:

 Ok.  So considering the speed with which this patch appeared I'm going
 to assume there's more here than meets the eye.  Just the same it looked
 like a sampling (when/where) issue to me.


 Take note of the OP's name, then read the patch.  The patch was pure
sarcasm.  Theo's point (if I'm not mistaken) is that the code is operating
as intended.



Re: Oddly high load average

2008-11-07 Thread new_guy
deraadt wrote:
 
 And if you really are worried, use the patch I mailed out earlier,
 and the load will always be zero.  Then there are no more worries!
 

That's both cruel and funny at the same time.

-- 
View this message in context: 
http://www.nabble.com/Oddly-high-load-average-tp20384695p20388358.html
Sent from the openbsd user - misc mailing list archive at Nabble.com.



Re: Oddly high load average

2008-11-07 Thread William Boshuck
On Fri, Nov 07, 2008 at 02:05:19PM -0500, Damian Gerow wrote:
 
 I would assume you're referring to uvm_loadav in uvm_meter.c?  That's where
 I'm looking.  I was hoping for a little English to help me with my
 understanding, but maybe I'm just not clever enough.

Likely this is not the real problem.

If you don't know the algorithms used to calculate load averages,
then you don't have a good reason to expect them to be different
from what you see. (It was different on Linux is not a good reason;
when you performed the installation you must have noticed that you
were not installing Linux. Some vague expectations about how you
think load averages are, or ought to be, calculated do not add up
to a good reason either.)

If this is something that you really want to understand then the
thing to do is learn the code that calculates the load averages.
Since there is nothing wrong with your system, then there is no
rush, and you have the time to do that carefully (even if it takes
months or longer - you can learn it a little at a time).  The only
thing stopping you is impatience; another side of the real problem.

cheers,
-wb



Re: Oddly high load average

2008-11-07 Thread Theo de Raadt
  I would assume you're referring to uvm_loadav in uvm_meter.c?  That's where
  I'm looking.  I was hoping for a little English to help me with my
  understanding, but maybe I'm just not clever enough.
 
 Likely this is not the real problem.
 
 If you don't know the algorithms used to calculate load averages,
 then you don't have a good reason to expect them to be different
 from what you see. (It was different on Linux is not a good reason;
 when you performed the installation you must have noticed that you
 were not installing Linux. Some vague expectations about how you
 think load averages are, or ought to be, calculated do not add up
 to a good reason either.)
 
 If this is something that you really want to understand then the
 thing to do is learn the code that calculates the load averages.
 Since there is nothing wrong with your system, then there is no
 rush, and you have the time to do that carefully (even if it takes
 months or longer - you can learn it a little at a time).  The only
 thing stopping you is impatience; another side of the real problem.

I think that is way too many words to give to someone who is simply
being led by their expectations.

They simply expect everything to be the same; kind of like imagine if
the rest of the developed world had to pay for health care because
Americans have to. 

Just an example, but it shows the mindset.

And your advice about Linux is correct.  If he really wants Linux
load average values, he should go run Linux.



Re: Oddly high load average

2008-11-07 Thread raven

Theo de Raadt ha scritto:

I would assume you're referring to uvm_loadav in uvm_meter.c?  That's where
I'm looking.  I was hoping for a little English to help me with my
understanding, but maybe I'm just not clever enough.
  

Likely this is not the real problem.


[snip]

I think that is way too many words to give to someone who is simply
being led by their expectations.

They simply expect everything to be the same; kind of like imagine if
the rest of the developed world had to pay for health care because
Americans have to. 


Just an example, but it shows the mindset.

And your advice about Linux is correct.  If he really wants Linux
load average values, he should go run Linux.
  

You're right Theo, but isn't better an answer like: RTFC ? Just 4 char.
If he understand or not isnt our business...Maybe, he can ask why it's 
different but...who cares about it.

And dont send this kind of patch someone here in misc@ can use it ahahahah
Maybe someone can write the algorithm in latex  or in pseudo code syntax 
but, later someone ask what mean...


Nights



Re: Oddly high load average

2008-11-07 Thread Theo de Raadt
 You're right Theo, but isn't better an answer like: RTFC ? Just 4 char.

There is no point in telling people who can't read the code, to go
read the code.  It won't change a thing.  They really will keep coming
back to misc showing their false expectations.

 If he understand or not isnt our business...Maybe, he can ask why it's 
 different but...who cares about it.

I think the mailing lists would be better if it wasn't always full of
people asking stupid questions, and then being answered by people with
ridiculous or uneducated answers.

Not that I want to be here providing the correct answers.  Why bother?
They won't be understood, and it isn't worth our time to explain things
properly.

But it also isn't worth anyone's time to see stupid questions answered
with stupid answers, is it.