Re: Oddly high load average
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
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
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 :-)
Oddly high load average
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. As I understand it, load average is supposed to be roughly based on the number of processes in the run queue. But I don't actually have any processes running, or blocking. I shut down almost every non-essential service, and I'm still seeing a load average consistantly above 0.5: - # ps auxw USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 1 0.0 0.0 408 360 ?? Is 2:19AM0:00.01 /sbin/init root 11766 0.0 0.1 552 740 ?? Is 2:19AM0:00.00 syslogd: [priv] (syslogd) _syslogd 22554 0.0 0.1 584 796 ?? I 2:19AM0:00.17 syslogd -a /var/empty/dev/log root 12786 0.0 0.1 400 768 ?? Ss 2:20AM0:00.76 /usr/sbin/apmd -C root 5282 0.0 0.1 560 900 ?? Ss 2:20AM0:00.03 cron root 28457 0.0 0.1 380 772 ?? Ss11:34AM0:00.01 wsmoused root 6904 0.0 0.1 548 532 C0 Ss 2:20AM0:00.03 -ksh (ksh) root 6962 0.0 0.0 348 312 C0 R+/0 11:35AM0:00.00 ps -auxw root 13089 0.0 0.1 244 888 C1 Is+2:20AM0:00.00 /usr/libexec/getty std.9600 ttyC1 root 18525 0.0 0.1 380 888 C2 Is+2:20AM0:00.00 /usr/libexec/getty std.9600 ttyC2 root 24949 0.0 0.1 340 888 C3 Is+2:20AM0:00.00 /usr/libexec/getty std.9600 ttyC3 root 19012 0.0 0.1 380 892 C5 Is+2:20AM0:00.00 /usr/libexec/getty std.9600 ttyC5 # uptime ; vmstat 10 6 ; uptime 11:36AM up 9:16, 1 user, load averages: 0.71, 0.72, 0.67 procsmemory pagedisk traps cpu r b wavm fre flt re pi po fr sr sd0 int sys cs us sy id 0 0 0 3460 768044 86 0 0 0 0 0 1 30 352 78 0 0 99 0 0 0 3460 7680446 0 0 0 0 0 0 2213 38 0 0 100 0 0 0 3460 7680444 0 0 0 0 0 0 23 5 38 0 0 100 0 0 0 3460 7680444 0 0 0 0 0 0 23 5 39 0 0 100 0 0 0 3460 7680444 0 0 0 0 0 0 24 5 38 0 0 100 0 0 0 3460 7680444 0 0 0 0 0 0 23 5 39 0 0 100 11:36AM up 9:17, 1 user, load averages: 0.63, 0.70, 0.67 # uptime ; iostat 10 6 ; uptime 11:37AM up 9:18, 1 user, load averages: 0.65, 0.69, 0.67 ttysd0 cpu tin tout KB/t t/s MB/s us ni sy in id 0 16 16.15 1 0.01 0 0 0 0 99 00 2.00 0 0.00 0 0 0 0100 00 16.00 0 0.00 0 0 0 0100 00 0.00 0 0.00 0 0 0 0100 00 2.67 0 0.00 0 0 0 0100 00 16.00 0 0.00 0 0 0 0100 11:38AM up 9:19, 1 user, load averages: 0.70, 0.69, 0.67 # - 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 are all showing cool-running temperatures, and I'm still getting at least seven hours of battery life, even with a wireless connection. I just have this oddly high load average, for seemingly no reason at all. Here's the dmesg. Please ignore the stuff around em0; that's me trying to figure out the phy for the Montevino chipset: - OpenBSD 4.4-current (GENERIC.MP) #11: Fri Nov 7 02:18:56 EST 2008 [EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 999145472 (952MB) avail mem = 969613312 (924MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (62 entries) bios0: vendor LENOVO version 6DET30WW (1.07 ) date 09/10/2008 bios0: LENOVO 7454CTO acpi0 at bios0: rev 2 acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA DMAR SSDT SSDT SSDT acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USB4(S3) USB5(S3) EHC0(S3) EHC1(S3) HDEF(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 2394.34 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG cpu0: 3MB 64b/line 8-way L2 cache cpu0: apic clock running at 266MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz, 2394.00 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,VMX,SMX,EST,TM2,CX16,xTPR,NXE,LONG cpu1: 3MB 64b/line 8-way L2 cache ioapic0 at mainbus0 apid 1 pa 0xfec0, version 20, 24 pins ioapic0: misconfigured as apic 2, remapped to apid 1 acpihpet0 at acpi0: 14318179 Hz acpiprt0 at acpi0
Re: Oddly high load average
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.