Re: GSoC: Add SMT/HT awareness to DragonFlyBSD scheduler

Mihai Carabas <[email protected]>
Newsgroups gmane.os.dragonfly-bsd.kernel
Message-ID <CANg1yUtKfhWdY0zB4xPLywS2hmu0mQDU0PeL5MjyoD9W+786RQ@mail.gmail.com>
Hello,

Here are some results from a AMD FX(tm)-8150 Eight-Core Processor(thanks
profkmax):

############ enable smt ########
kern.usched_bsd4.smt_enable: 0 -> 1
tps = 32987.010952 (including connections establishing)
tps = 33072.952733 (including connections establishing)
tps = 32693.574568 (including connections establishing)
tps = 33084.277648 (including connections establishing)
tps = 33481.054536 (including connections establishing)
tps = 33013.296931 (including connections establishing)
tps = 32711.982849 (including connections establishing)
tps = 32686.120901 (including connections establishing)
tps = 32792.744933 (including connections establishing)
tps = 33367.284545 (including connections establishing)

############ disable smt ########
kern.usched_bsd4.smt_enable: 1 -> 0
tps = 31364.873850 (including connections establishing)
tps = 31340.974524 (including connections establishing)
tps = 31648.286265 (including connections establishing)
tps = 30913.788400 (including connections establishing)
tps = 31338.052583 (including connections establishing)
tps = 31360.521337 (including connections establishing)
tps = 31545.915474 (including connections establishing)
tps = 31489.008958 (including connections establishing)
tps = 30657.108291 (including connections establishing)
tps = 31294.472379 (including connections establishing)

The difference is > 1500tps (5%).

Here is an interesting CPU topology from a dual-socket XEON:
hw.cpu_topology.tree:
\-PACKAGE MEMBERS: cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7 cpu8 cpu9 cpu10
cpu11 cpu12 cpu13 cpu14 cpu15 cpu16 cpu17 cpu18 cpu19 cpu20 cpu21 cpu22
cpu23
  |-CHIP ID 0: cpu1 cpu3 cpu5 cpu7 cpu9 cpu11 cpu13 cpu15 cpu17 cpu19 cpu21
cpu23
  | |-CORE ID 0: cpu1 cpu13
  | | |-THREAD ID 0: cpu1
  | | \-THREAD ID 1: cpu13
  | |-CORE ID 1: cpu3 cpu15
  | | |-THREAD ID 0: cpu3
  | | \-THREAD ID 1: cpu15
  | |-CORE ID 2: cpu5 cpu17
  | | |-THREAD ID 0: cpu5
  | | \-THREAD ID 1: cpu17
  | |-CORE ID 8: cpu7 cpu19
  | | |-THREAD ID 0: cpu7
  | | \-THREAD ID 1: cpu19
  | |-CORE ID 9: cpu9 cpu21
  | | |-THREAD ID 0: cpu9
  | | \-THREAD ID 1: cpu21
  | \-CORE ID 10: cpu11 cpu23
  |   |-THREAD ID 0: cpu11
  |   \-THREAD ID 1: cpu23
  \-CHIP ID 1: cpu0 cpu2 cpu4 cpu6 cpu8 cpu10 cpu12 cpu14 cpu16 cpu18 cpu20
cpu22
    |-CORE ID 0: cpu0 cpu12
    | |-THREAD ID 0: cpu0
    | \-THREAD ID 1: cpu12
    |-CORE ID 1: cpu2 cpu14
    | |-THREAD ID 0: cpu2
    | \-THREAD ID 1: cpu14
    |-CORE ID 2: cpu4 cpu16
    | |-THREAD ID 0: cpu4
    | \-THREAD ID 1: cpu16
    |-CORE ID 8: cpu6 cpu18
    | |-THREAD ID 0: cpu6
    | \-THREAD ID 1: cpu18
    |-CORE ID 9: cpu8 cpu20
    | |-THREAD ID 0: cpu8
    | \-THREAD ID 1: cpu20
    \-CORE ID 10: cpu10 cpu22
      |-THREAD ID 0: cpu10
      \-THREAD ID 1: cpu22

And here are some tests. The differences are < 5% (but not so much):
############ enable smt ########
kern.usched_bsd4.smt_enable: 0 -> 1
tps = 53019.868091 (including connections establishing)
tps = 52814.820895 (including connections establishing)
tps = 53251.869806 (including connections establishing)
tps = 53914.301869 (including connections establishing)
tps = 53278.858660 (including connections establishing)
tps = 53044.933921 (including connections establishing)
tps = 53758.093953 (including connections establishing)
tps = 53965.776254 (including connections establishing)
tps = 53093.809461 (including connections establishing)
tps = 53322.645105 (including connections establishing)

############ disable smt ########
kern.usched_bsd4.smt_enable: 1 -> 0
tps = 51379.980647 (including connections establishing)
tps = 50960.834688 (including connections establishing)
tps = 51336.041880 (including connections establishing)
tps = 51311.336021 (including connections establishing)
tps = 51227.944502 (including connections establishing)
tps = 50828.181685 (including connections establishing)
tps = 51342.268742 (including connections establishing)
tps = 50887.898412 (including connections establishing)
tps = 50667.897897 (including connections establishing)
tps = 50960.282830 (including connections establishing)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.