Re: ULE and current.

From: Andy Farkas (andyf_at_speednet.com.au)
Date: 12/11/03

  • Next message: Anthony Ginepro: "Re: ACPI + Power off feature br00ken?"
    Date: Thu, 11 Dec 2003 17:38:30 +1000 (EST)
    To: Jeff Roberson <jroberson@chesapeake.net>
    
    

    Jeff Roberson wrote:

    > Andy Farkas wrote:
    >
    > > The scheduling of nice processes seems to be broken:
    >
    > This is actually a problem in the load balancer. It's not taking nice
    > into consideration when attempting to balance the load.
    >
    > > team2# nice -7 sh -c "while :; do echo -n;done" &
    > > team2# nice -7 sh -c "while :; do echo -n;done" &
    > > team2# sleep 120; top -S
    > >
    > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
    > > 675 root 133 -7 1576K 952K CPU1 1 1:52 75.78% 75.78% sh
    > > 676 root 133 -7 1576K 952K RUN 1 1:39 73.44% 73.44% sh
    > > 12 root -16 0 0K 12K RUN 0 18:46 55.47% 55.47% idle: cpu0
    > > 11 root -16 0 0K 12K RUN 1 7:00 0.00% 0.00% idle: cpu1

    Just to make it clear, I was expecting the above to be something like:

     sh on CPU0 using 100% cpu,
     sh on CPU1 using 100% cpu,
     idle: cpu0 to be 0%, and
     idle: cpu1 to be 0%.

    > >
    > > Adding a third nice process eliminates the idle time, but cpu% is still bad:
    > >
    > > team2# nice -7 sh -c "while :; do echo -n;done" &
    > > team2# sleep 120; top -S
    > >
    > > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND
    > > 705 root 133 -7 1576K 952K CPU0 0 1:53 100.78% 100.78% sh
    > > 675 root 133 -7 1576K 952K RUN 1 12:12 51.56% 51.56% sh
    > > 676 root 133 -7 1576K 952K RUN 1 11:30 49.22% 49.22% sh
    > > 729 root 76 0 2148K 1184K CPU1 1 0:00 0.78% 0.78% top
    > > 12 root -16 0 0K 12K RUN 0 24:00 0.00% 0.00% idle: cpu0
    > > 11 root -16 0 0K 12K RUN 1 7:00 0.00% 0.00% idle: cpu1

    And at this point I would expect something like:

     sh #0 using 66.3%,
     sh #1 using 66.3%,
     sh #2 using 66.3%,
     idle: cpu0 to be 0%,
     idle: cpu1 to be 0%.

    > I agree that 100.78% is wrong. Also, the long term balancer should be
    > kicking one sh process off of the doubly loaded cpu every so often. I'll
    > look into this, thanks.

    Could it be that the scheduler/balancer is confused by different idle
    processes? Why does 'systat -p' show 3 idle procs?? :

                        /0 /10 /20 /30 /40 /50 /60 /70 /80 /90 /100
    root idle: cpu0 XXXXXXXXXXXXXXXX
    root idle: cpu1 XXXXXXXXXXXXXXXX
                 <idle> XXXXXXXXXXXXXXXX

    So, where *I* get confused is that top(1) thinks that the system can be up
    to 200% idle, whereas systat(1) thinks there are 3 threads each consuming
    a third of 100% idleness... who is right?

    >
    > Cheers,
    > Jeff
    >

    --
     :{ andyf@speednet.com.au
            Andy Farkas
        System Administrator
       Speednet Communications
     http://www.speednet.com.au/
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Anthony Ginepro: "Re: ACPI + Power off feature br00ken?"

    Relevant Pages

    • Re: ULE and current.
      ... > topis showing odd idle times: ... > PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND ...
      (freebsd-current)
    • Re: Top not showing cpu usage even remotely accurately
      ... 6.x with SMP kernel. ... It never shows more than about 90% idle, ... picture, however, load average is still useless as far as performance ... PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND ...
      (freebsd-questions)
    • On 5.1, what is the process named "idle"?
      ... I've installed 5.1 and a variety of apps on a machine, in preparation ... PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND ... What is idle? ... there is no apparent equivalent process on my 4.9 machine. ...
      (freebsd-questions)
    • Re: Core Duo - only one cpu being used
      ... Eric Anderson wrote: ... It cannot be that CPU1 uses 99% for the idle process and 34% for the compiler. ... also handling any interrupts that come to it, ...
      (freebsd-hackers)
    • Re: Core Duo - only one cpu being used
      ... Eric Anderson wrote: ... It cannot be that CPU1 uses 99% for the idle process and 34% for the compiler. ... also handling any interrupts that come to it, ...
      (freebsd-hackers)