-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NUMA node information: $ numactl --hardware available: 2 nodes (0-1) node 0 cpus: 0 1 2 3 4 5 6 7 ... [...] node 1 cpus: 20 21 22 23 24 25 ... [...] node distances: node 0 1 0: 10 21 1: 21 10 bpftrace script code net_action.bt: kprobe:net_tx_action, kprobe:net_rx_action { @[numaid, comm] = count(); } Example1: ------------------------------------------------------------ iperf3 server: $ taskset -c 1 iperf3 -s [...] [ 5] 0.00-1.00 sec 6.04 GBytes 51.9 Gbits/sec [...] iperf3 client: $ taskset -c 2 iperf3 -c 0 [...] [ 5] 0.00-1.00 sec 6.04 GBytes 51.9 Gbits/sec 0 1.19 MBytes [...] net_action.bt output: @[0, iperf3]: 2430857 Because both cpu1 and cpu2 are on the numa node 0. Example2: ------------------------------------------------------------ iperf3 server: $ taskset -c 1 iperf3 -s [...] [ 5] 0.00-1.00 sec 2.79 GBytes 24.0 Gbits/sec [...] iperf3 client: $ taskset -c 21 iperf3 -c 0 [...] [ 5] 0.00-1.00 sec 2.79 GBytes 24.0 Gbits/sec 0 1023 KBytes [...] net_action.bt output: @[0, iperf3]: 456193 @[1, iperf3]: 684853 Because cpu1 on numa node0, cpu21 on numa node1, Processes that need to communicate running on different nodes cause poor performance, It is very easy to get numa with `numaid`.
- Loading branch information
Showing
9 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "common.h" | ||
|
||
namespace bpftrace { | ||
namespace test { | ||
namespace codegen { | ||
|
||
TEST(codegen, builtin_node) | ||
{ | ||
test("kprobe:f { @x = node }", | ||
|
||
NAME); | ||
} | ||
|
||
} // namespace codegen | ||
} // namespace test | ||
} // namespace bpftrace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters