On 26/12/2017 11:18, Eugene Grosbein wrote:
> On 26.12.2017 16:10, Eugene Grosbein wrote:
> 
>> Is idprio(1) broken in stable/11?
>>
>> As root, start one bzip2 instance with idprio and one additional bzip2 
>> intance per CPU core:
>>
>> # idprio 5 bzip2 -9 </dev/zero >/dev/null &
>> # n=$(sysctl -n kern.smp.cpus)
>> # i=1; while [ $i -le $n ]; do bzip2 -9 </dev/zero >/dev/null & i=$(($i+1)); 
>> done
>> # top
>>
>> For dual core system, I see that idprio'd bzip2 takes all cycles of first 
>> core
>> and two "normal" bzip2's share cycles of second core each taking ~50% of CPU 
>> time.
>>
>> It is expected that idprio'd bzip2 get no CPU time at all and each of 
>> "normal" bzip2's
>> get ~100% of single CPU core for such setup.
> 
> This works as expected for stable/10.

Seems to work as expected on head as well.
Tested on a 6-core physical system and a 2-core bhyve VM.

# ps axwwl | fgrep bzip2
   0 943  935   0 129  5 10564  2196 -        RN    1  0:00.00 idprio 5 bzip2 -9
   0 945  935   0 108  5 18332  9676 -        RN    1  1:16.15 bzip2 -9
   0 946  935   0 108  5 18332  9676 -        RN    1  1:16.34 bzip2 -9

idprio isn't even able to exec bzip2.

# ps axwwl | fgrep bzip2
    0 28986 86816   0 129  5   18348    2324 -        RN   17       0:00.02 
bzip2 -9
    0 28988 86816   0 106  5   18348    9680 -        RN   17       1:27.25 
bzip2 -9
    0 28989 86816   0 106  5   18348    9680 -        RN   17       1:27.86 
bzip2 -9
    0 28990 86816   0 108  5   18348    9680 -        RN   17       1:35.50 
bzip2 -9
    0 28991 86816   0 106  5   18348    9680 -        RN   17       1:27.00 
bzip2 -9
    0 28992 86816   0 106  5   18348    9680 -        RN   17       1:25.83 
bzip2 -9
    0 28993 86816   0 106  5   18348    9680 -        RN   17       1:26.76 
bzip2 -9

-- 
Andriy Gapon
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to