Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 May 2021 16:45:16 +0300
From:      =?UTF-8?B?0JDQvdC00YDQtdC5INCT0LXRgNCw0YHQuNC80L7Qsg==?= <orca@tira.com.ua>
To:        freebsd-questions@freebsd.org
Subject:   FreeBSD 13, Iflib, 2 CPU problem
Message-ID:  <CALBL1YvXv7oNABQiOePJWEYetc5ND8BdrNA5NJHbzuENuVXjUw@mail.gmail.com>

Next in thread | Raw E-Mail | Index | Archive | Help
Recently I have updated to FreeBSD 13, but it had begun since iflib was
added to FreeBSD12.
Behavior is the same on different servers.
CPU 2 x CPU E5-2670
NIC driver is ix. It is standard.
As I understand, when the system is starting it creates threads for every
core of the processor.

procstat -at | grep if_io
    0 100019 kernel              if_io_tqg_0          -1   24 sleep   -
    0 100020 kernel              if_io_tqg_1          -1   24 sleep   -
    0 100021 kernel              if_io_tqg_2          -1   24 sleep   -
    0 100022 kernel              if_io_tqg_3          -1   24 sleep   -
    0 100023 kernel              if_io_tqg_4          -1   24 sleep   -
    0 100024 kernel              if_io_tqg_5          -1   24 sleep   -
    0 100025 kernel              if_io_tqg_6          -1   24 sleep   -
    0 100026 kernel              if_io_tqg_7          -1   24 sleep   -
    0 100027 kernel              if_io_tqg_8          -1   24 sleep   -
    0 100028 kernel              if_io_tqg_9          -1   24 sleep   -
    0 100029 kernel              if_io_tqg_10         -1   24 sleep   -
    0 100030 kernel              if_io_tqg_11         -1   24 sleep   -
    0 100031 kernel              if_io_tqg_12         -1   24 sleep   -
    0 100032 kernel              if_io_tqg_13         -1   24 sleep   -
    0 100033 kernel              if_io_tqg_14         -1   24 sleep   -
    0 100034 kernel              if_io_tqg_15         -1   24 sleep   -


When the network is loaded as I see in "top" only the first 8 threads are
working which are binded to the first processor. So the second processor is
not used at all.
I've been trying a different combination of sysctl tuning and couldn't load
the second processor. The only thing that helped was installing ix driver
from ports collection which does not use iflib. And only after this i see 8
threads per NIC port that can be binded  to different CPU cores.
But when a server has more than 16 cores then it does not use excess ones,
and if server has less than 16 cores, then few threads go to each core.

I thought that it would be changed with FreeBSD13 but it wasn't



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CALBL1YvXv7oNABQiOePJWEYetc5ND8BdrNA5NJHbzuENuVXjUw>