DPDK for general purpose workload - linux
I have deployed OpenStack and configured OVS-DPDK on compute nodes for high-performance networking. My workload is a general-purpose workload like running haproxy, mysql, apache, and XMPP etc.
When I did load-testing, I found performance is average and after 200kpps packet rate I noticed packet drops. I heard and read DPDK can handle millions of packets but in my case, it's not true. In guest, I am using virtio-net which processes packets in the kernel so I believe my bottleneck is my guest VM.
I don't have any guest-based DPDK application like testpmd etc. Does that mean OVS+DPDK isn't useful for my cloud? How do I take advantage of OVS+DPDK with a general-purpose workload?
Updates
We have our own loadtesting tool which generate Audio RTP traffic which is pure UDP based 150bytes packets and noticed after 200kpps audio quality go down and choppy. In short DPDK host hit high PMD cpu usage and loadtest showing bad audio quality. when i do same test with SRIOV based VM then performance is really really good.
$ ovs-vswitchd -V
ovs-vswitchd (Open vSwitch) 2.13.3
DPDK 19.11.7
Intel NIC X550T
# ethtool -i ext0
driver: ixgbe
version: 5.1.0-k
firmware-version: 0x80000d63, 18.8.9
expansion-rom-version:
bus-info: 0000:3b:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
In the following output what does these queue-id:0 to 8 and why only
the first queue is in use but not others, they are always zero. What
does this mean?
ovs-appctl dpif-netdev/pmd-rxq-show
pmd thread numa_id 0 core_id 2:
isolated : false
port: vhu1c3bf17a-01 queue-id: 0 (enabled) pmd usage: 0 %
port: vhu1c3bf17a-01 queue-id: 1 (enabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 2 (disabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 3 (disabled) pmd usage: 0 %
pmd thread numa_id 1 core_id 3:
isolated : false
pmd thread numa_id 0 core_id 22:
isolated : false
port: vhu1c3bf17a-01 queue-id: 3 (enabled) pmd usage: 0 %
port: vhu1c3bf17a-01 queue-id: 6 (enabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 0 (enabled) pmd usage: 54 %
port: vhu6b7daba9-1a queue-id: 5 (disabled) pmd usage: 0 %
pmd thread numa_id 1 core_id 23:
isolated : false
port: dpdk1 queue-id: 0 (enabled) pmd usage: 3 %
pmd thread numa_id 0 core_id 26:
isolated : false
port: vhu1c3bf17a-01 queue-id: 2 (enabled) pmd usage: 0 %
port: vhu1c3bf17a-01 queue-id: 7 (enabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 1 (disabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 4 (disabled) pmd usage: 0 %
pmd thread numa_id 1 core_id 27:
isolated : false
pmd thread numa_id 0 core_id 46:
isolated : false
port: dpdk0 queue-id: 0 (enabled) pmd usage: 27 %
port: vhu1c3bf17a-01 queue-id: 4 (enabled) pmd usage: 0 %
port: vhu1c3bf17a-01 queue-id: 5 (enabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 6 (disabled) pmd usage: 0 %
port: vhu6b7daba9-1a queue-id: 7 (disabled) pmd usage: 0 %
pmd thread numa_id 1 core_id 47:
isolated : false
$ ovs-appctl dpif-netdev/pmd-stats-clear && sleep 10 && ovs-appctl
dpif-netdev/pmd-stats-show | grep "processing cycles:"
processing cycles: 1697952 (0.01%)
processing cycles: 12726856558 (74.96%)
processing cycles: 4259431602 (19.40%)
processing cycles: 512666 (0.00%)
processing cycles: 6324848608 (37.81%)
Does processing cycles mean my PMD is under stress? but i am only
hitting 200kpps rate?
This is my dpdk0 and dpdk1 port statistics
sudo ovs-vsctl get Interface dpdk0 statistics
{flow_director_filter_add_errors=153605,
flow_director_filter_remove_errors=30829, mac_local_errors=0,
mac_remote_errors=0, ovs_rx_qos_drops=0, ovs_tx_failure_drops=0,
ovs_tx_invalid_hwol_drops=0, ovs_tx_mtu_exceeded_drops=0,
ovs_tx_qos_drops=0, rx_128_to_255_packets=64338613,
rx_1_to_64_packets=367, rx_256_to_511_packets=116298,
rx_512_to_1023_packets=31264, rx_65_to_127_packets=6990079,
rx_broadcast_packets=0, rx_bytes=12124930385, rx_crc_errors=0,
rx_dropped=0, rx_errors=12, rx_fcoe_crc_errors=0, rx_fcoe_dropped=12,
rx_fcoe_mbuf_allocation_errors=0, rx_fragment_errors=367,
rx_illegal_byte_errors=0, rx_jabber_errors=0, rx_length_errors=0,
rx_mac_short_packet_dropped=128, rx_management_dropped=35741,
rx_management_packets=31264, rx_mbuf_allocation_errors=0,
rx_missed_errors=0, rx_oversize_errors=0, rx_packets=71512362,
rx_priority0_dropped=0, rx_priority0_mbuf_allocation_errors=1096,
rx_priority1_dropped=0, rx_priority1_mbuf_allocation_errors=0,
rx_priority2_dropped=0, rx_priority2_mbuf_allocation_errors=0,
rx_priority3_dropped=0, rx_priority3_mbuf_allocation_errors=0,
rx_priority4_dropped=0, rx_priority4_mbuf_allocation_errors=0,
rx_priority5_dropped=0, rx_priority5_mbuf_allocation_errors=0,
rx_priority6_dropped=0, rx_priority6_mbuf_allocation_errors=0,
rx_priority7_dropped=0, rx_priority7_mbuf_allocation_errors=0,
rx_undersize_errors=6990079, tx_128_to_255_packets=64273778,
tx_1_to_64_packets=128, tx_256_to_511_packets=43670294,
tx_512_to_1023_packets=153605, tx_65_to_127_packets=881272,
tx_broadcast_packets=10, tx_bytes=25935295292, tx_dropped=0,
tx_errors=0, tx_management_packets=0, tx_multicast_packets=153,
tx_packets=109009906}
stats
sudo ovs-vsctl get Interface dpdk1 statistics
{flow_director_filter_add_errors=126793,
flow_director_filter_remove_errors=37969, mac_local_errors=0,
mac_remote_errors=0, ovs_rx_qos_drops=0, ovs_tx_failure_drops=0,
ovs_tx_invalid_hwol_drops=0, ovs_tx_mtu_exceeded_drops=0,
ovs_tx_qos_drops=0, rx_128_to_255_packets=64435459,
rx_1_to_64_packets=107843, rx_256_to_511_packets=230,
rx_512_to_1023_packets=13, rx_65_to_127_packets=7049788,
rx_broadcast_packets=199058, rx_bytes=12024342488, rx_crc_errors=0,
rx_dropped=0, rx_errors=11, rx_fcoe_crc_errors=0, rx_fcoe_dropped=11,
rx_fcoe_mbuf_allocation_errors=0, rx_fragment_errors=107843,
rx_illegal_byte_errors=0, rx_jabber_errors=0, rx_length_errors=0,
rx_mac_short_packet_dropped=1906, rx_management_dropped=0,
rx_management_packets=13, rx_mbuf_allocation_errors=0,
rx_missed_errors=0, rx_oversize_errors=0, rx_packets=71593333,
rx_priority0_dropped=0, rx_priority0_mbuf_allocation_errors=1131,
rx_priority1_dropped=0, rx_priority1_mbuf_allocation_errors=0,
rx_priority2_dropped=0, rx_priority2_mbuf_allocation_errors=0,
rx_priority3_dropped=0, rx_priority3_mbuf_allocation_errors=0,
rx_priority4_dropped=0, rx_priority4_mbuf_allocation_errors=0,
rx_priority5_dropped=0, rx_priority5_mbuf_allocation_errors=0,
rx_priority6_dropped=0, rx_priority6_mbuf_allocation_errors=0,
rx_priority7_dropped=0, rx_priority7_mbuf_allocation_errors=0,
rx_undersize_errors=7049788, tx_128_to_255_packets=102664472,
tx_1_to_64_packets=1906, tx_256_to_511_packets=68008814,
tx_512_to_1023_packets=126793, tx_65_to_127_packets=1412435,
tx_broadcast_packets=1464, tx_bytes=40693963125, tx_dropped=0,
tx_errors=0, tx_management_packets=199058, tx_multicast_packets=146,
tx_packets=172252389}
Update - 2
dpdk interface
# dpdk-devbind.py -s
Network devices using DPDK-compatible driver
============================================
0000:3b:00.1 'Ethernet Controller 10G X550T 1563' drv=vfio-pci unused=ixgbe
0000:af:00.1 'Ethernet Controller 10G X550T 1563' drv=vfio-pci unused=ixgbe
Network devices using kernel driver
===================================
0000:04:00.0 'NetXtreme BCM5720 2-port Gigabit Ethernet PCIe 165f' if=eno1 drv=tg3 unused=vfio-pci
0000:04:00.1 'NetXtreme BCM5720 2-port Gigabit Ethernet PCIe 165f' if=eno2 drv=tg3 unused=vfio-pci
0000:3b:00.0 'Ethernet Controller 10G X550T 1563' if=int0 drv=ixgbe unused=vfio-pci
0000:af:00.0 'Ethernet Controller 10G X550T 1563' if=int1 drv=ixgbe unused=vfio-pci
OVS
# ovs-vsctl show
595103ef-55a1-4f71-b299-a14942965e75
Manager "ptcp:6640:127.0.0.1"
is_connected: true
Bridge br-tun
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port br-tun
Interface br-tun
type: internal
Port patch-int
Interface patch-int
type: patch
options: {peer=patch-tun}
Port vxlan-0a48042b
Interface vxlan-0a48042b
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow, local_ip="10.72.4.44", out_key=flow, remote_ip="10.72.4.43"}
Port vxlan-0a480429
Interface vxlan-0a480429
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow, local_ip="10.72.4.44", out_key=flow, remote_ip="10.72.4.41"}
Port vxlan-0a48041f
Interface vxlan-0a48041f
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow, local_ip="10.72.4.44", out_key=flow, remote_ip="10.72.4.31"}
Port vxlan-0a48042a
Interface vxlan-0a48042a
type: vxlan
options: {df_default="true", egress_pkt_mark="0", in_key=flow, local_ip="10.72.4.44", out_key=flow, remote_ip="10.72.4.42"}
Bridge br-vlan
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port br-vlan
Interface br-vlan
type: internal
Port dpdkbond
Interface dpdk1
type: dpdk
options: {dpdk-devargs="0000:af:00.1", n_txq_desc="2048"}
Interface dpdk0
type: dpdk
options: {dpdk-devargs="0000:3b:00.1", n_txq_desc="2048"}
Port phy-br-vlan
Interface phy-br-vlan
type: patch
options: {peer=int-br-vlan}
Bridge br-int
Controller "tcp:127.0.0.1:6633"
is_connected: true
fail_mode: secure
datapath_type: netdev
Port vhu87cf49d2-5b
tag: 7
Interface vhu87cf49d2-5b
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_socket/vhu87cf49d2-5b"}
Port vhub607c1fa-ec
tag: 7
Interface vhub607c1fa-ec
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_socket/vhub607c1fa-ec"}
Port vhu9a035444-83
tag: 8
Interface vhu9a035444-83
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_socket/vhu9a035444-83"}
Port br-int
Interface br-int
type: internal
Port int-br-vlan
Interface int-br-vlan
type: patch
options: {peer=phy-br-vlan}
Port vhue00471df-d8
tag: 8
Interface vhue00471df-d8
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_socket/vhue00471df-d8"}
Port vhu683fdd35-91
tag: 7
Interface vhu683fdd35-91
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_socket/vhu683fdd35-91"}
Port vhuf04fb2ec-ec
tag: 8
Interface vhuf04fb2ec-ec
type: dpdkvhostuserclient
options: {vhost-server-path="/var/lib/vhost_socket/vhuf04fb2ec-ec"}
Port patch-tun
Interface patch-tun
type: patch
options: {peer=patch-int}
ovs_version: "2.13.3"
I have created guest vms using openstack and they can see them they are connected using vhost socket (Ex: /var/lib/vhost_socket/vhuf04fb2ec-ec)
When I did load-testing, I found performance is average and after 200kpps packet rate I noticed packet drops. In short DPDK host hit high PMD cpu usage and loadtest showing bad audio quality. when i do same test with SRI
[Answer] this observation is not true based on the live debug done so far. The reason as stated below
qemu launched were not pinned to specific cores.
comparison done against PCIe pass-through (VF) against vhost-client is not apples to apples comparison.
with OpenStack approach, there are at least 3 bridges before the packets to flow through before reaching VM.
OVS threads were not pinned which led to all the PMD threads running on the same core (causing latency and drops) in each bridge stage.
To have a fair comparison against SRIOV approach, the following changes have been made with respect to similar question
External Port <==> DPDK Port0 (L2fwd) DPDK net_vhost <--> QEMU (virtio-pci)
Numbers achieved with iperf3 (bidirectional) is around 10Gbps.
Note: requested to run trex, pktgen to try out Mpps. Expectation is to reach minimum 8 MPPS with the current setup.
Hence this is not DPDK, virtio-client, qemu-kvm or SRIOV related issue, instead a configuration or platform setup issue.
Related
SMP threads not showing in GDB
Trying to debug multi CPU SoC (Amlogic A113X) and faced a problem. So I have this debug configuration: A113X(JTAG) -> Segger J-Link V11 -> OpenOCD -> gdb-multiarch Everything is connected and seems okay, but GDB shows just 1 thread (should be 4 - one for each CPU): (gdb) info threads Id Target Id Frame * 1 Remote target 0xffffff8009853364 in arch_spin_lock (lock=<optimized out>) at ./arch/arm64/include/asm/spinlock.h:89 Meanwhile there are 4 debug targets according to telenet 'targets' command: > targets TargetName Type Endian TapName State -- ------------------ ---------- ------ ------------------ ------------ 0* A113X.a53.0 aarch64 little A113X.cpu halted 1 A113X.a53.1 aarch64 little A113X.cpu halted 2 A113X.a53.2 aarch64 little A113X.cpu unknown 3 A113X.a53.3 aarch64 little A113X.cpu halted Core 2 is shut down in this particular case. When I halt CPUs then get this output in GDB: (gdb) continue Continuing. ^CA113X.a53.1 halted in AArch64 state due to debug-request, current mode: EL1H cpsr: 0x800001c5 pc: 0xffffff8009853364 MMU: enabled, D-Cache: enabled, I-Cache: enabled A113X.a53.3 halted in AArch64 state due to debug-request, current mode: EL1H cpsr: 0x800000c5 pc: 0xffffff80098532b4 MMU: enabled, D-Cache: enabled, I-Cache: enabled Program received signal SIGINT, Interrupt. 0xffffff8009853364 in arch_spin_lock (lock=<optimized out>) at ./arch/arm64/include/asm/spinlock.h:89 89 asm volatile( (gdb) where #0 0xffffff8009853364 in arch_spin_lock (lock=<optimized out>) at ./arch/arm64/include/asm/spinlock.h:89 #1 do_raw_spin_lock (lock=<optimized out>) at ./include/linux/spinlock.h:148 #2 __raw_spin_lock (lock=<optimized out>) at ./include/linux/spinlock_api_smp.h:145 #3 _raw_spin_lock (lock=0xffffffc01fb86a00) at kernel/locking/spinlock.c:151 #4 0xffffff80090c2114 in try_to_wake_up (p=0xffffffc01963a880, state=<optimized out>, wake_flags=0) at kernel/sched/core.c:2110 #5 0xffffff80090c239c in wake_up_process (p=<optimized out>) at kernel/sched/core.c:2203 #6 0xffffff80090b1b7c in wake_up_worker (pool=<optimized out>) at kernel/workqueue.c:837 #7 insert_work (pwq=<optimized out>, work=<optimized out>, head=<optimized out>, extra_flags=<optimized out>) at kernel/workqueue.c:1310 #8 0xffffff80090b1d10 in __queue_work (cpu=0, wq=0xdf2, work=0x8df2) at kernel/workqueue.c:1460 #9 0xffffff80090b1fc8 in queue_work_on (cpu=8, wq=0xffffffc01dbb5c00, work=0xffffffc01ccb82a0) at kernel/workqueue.c:1485 #10 0xffffff800191d068 in ?? () #11 0xffffffc0138664e8 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) Is something wrong with my OpenOCD configuration? SMP config looks fine because it halts all 4 cores. What can be wrong here? Thanks beforehand. Here is openocd config: telnet_port 4444 gdb_port 3333 source [find interface/jlink.cfg] transport select jtag adapter speed 1000 scan_chain set _CHIPNAME A113X set _DAPNAME $_CHIPNAME.dap jtag newtap $_CHIPNAME cpu -irlen 4 -expected-id 0x5ba00477 dap create $_DAPNAME -chain-position $_CHIPNAME.cpu echo "$_CHIPNAME.cpu" set CA53_DBGBASE {0x80410000 0x80510000 0x80610000 0x80710000} set CA53_CTIBASE {0x80420000 0x80520000 0x80620000 0x80720000} set _num_ca53 4 set _ap_num 0 set smp_targets "" proc setup_a5x {core_name dbgbase ctibase num boot} { for { set _core 0 } { $_core < $num } { incr _core } { set _TARGETNAME $::_CHIPNAME.$core_name.$_core set _CTINAME $_TARGETNAME.cti cti create $_CTINAME -dap $::_DAPNAME -ap-num $::_ap_num \ -baseaddr [lindex $ctibase $_core] target create $_TARGETNAME aarch64 -dap $::_DAPNAME -cti $_CTINAME -coreid $_core set ::smp_targets "$::smp_targets $_TARGETNAME" } } setup_a5x a53 $CA53_DBGBASE $CA53_CTIBASE $_num_ca53 1 echo "SMP targets:$smp_targets" eval "target smp $smp_targets" targets $_CHIPNAME.a53.0 And output of OpenOCD: Open On-Chip Debugger 0.11.0+dev-00640-ge83eeb44a (2022-04-21-10:10) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html A113X.cpu SMP targets: A113X.a53.0 A113X.a53.1 A113X.a53.2 A113X.a53.3 Info : Listening on port 6666 for tcl connections Info : Listening on port 4444 for telnet connections Info : J-Link V11 compiled Mar 3 2022 10:16:14 Info : Hardware version: 11.00 Info : VTarget = 3.309 V Info : clock speed 1000 kHz Info : JTAG tap: A113X.cpu tap/device found: 0x5ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x5) Info : A113X.a53.0: hardware has 6 breakpoints, 4 watchpoints Info : A113X.a53.1: hardware has 6 breakpoints, 4 watchpoints Error: JTAG-DP STICKY ERROR Warn : target A113X.a53.2 examination failed Info : A113X.a53.3: hardware has 6 breakpoints, 4 watchpoints Info : A113X.a53.0 cluster 0 core 0 multi core Info : A113X.a53.1 cluster 0 core 1 multi core Info : A113X.a53.3 cluster 0 core 3 multi core Info : starting gdb server for A113X.a53.0 on 3333 Info : Listening on port 3333 for gdb connections Info : accepting 'gdb' connection on tcp/3333 Info : New GDB Connection: 1, Target A113X.a53.0, state: halted Warn : Prefer GDB command "target extended-remote :3333" instead of "target remote :3333" A113X.a53.1 halted in AArch64 state due to debug-request, current mode: EL1H cpsr: 0x800001c5 pc: 0xffffff8009853364 MMU: enabled, D-Cache: enabled, I-Cache: enabled A113X.a53.3 halted in AArch64 state due to debug-request, current mode: EL1H cpsr: 0x800000c5 pc: 0xffffff80098532b4 MMU: enabled, D-Cache: enabled, I-Cache: enabled
I tried to combine hwthread and targete smp to achieve multi-cores. Add "-rtos hwthread" for each core, like target create ...... -rtos hwthread In my opinion, a core is regarded as a hwthread by OpenOCD, so set hwthread for each core. Following is the response of info threads. (gdb) i threads Id Target Id Frame * 1 Thread 1 (Name: riscv.cpu0.0, state: debug-request) 0x8000000a in _mstart () 2 Thread 2 (Name: riscv.cpu0.1, state: debug-request) 0x82000000 in ?? () 3 Thread 3 (Name: riscv.cpu0.2, state: debug-request) 0x82000000 in ?? () 4 Thread 4 (Name: riscv.cpu0.3, state: debug-request) 0x82000000 in ?? ()
DPDK with AF_XDP: Failed to create xsk socket
I am trying to run AF_XDP poll mode driver. Kernel Version is 5.4(CONFIG_XDP_SOCKETS=y). When i run the samples provided by DPDK website, an error was happened. root#n211-203-164:~# dpdk-testpmd --vdev=net_af_xdp0,iface=eth3 -- -i --total-num-mbufs=10240 EAL: Detected 96 lcore(s) EAL: Detected 2 NUMA nodes EAL: Detected static linkage of DPDK EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: No available 1048576 kB hugepages reported EAL: VFIO support initialized EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:5e:00.0 (socket 0) mlx5_net: Default miss action is not supported. EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:5e:00.1 (socket 0) mlx5_net: Default miss action is not supported. EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:86:00.0 (socket 1) mlx5_net: Default miss action is not supported. EAL: Probe PCI driver: mlx5_pci (15b3:1017) device: 0000:86:00.1 (socket 1) mlx5_net: Default miss action is not supported. Interactive-mode selected testpmd: create a new mbuf pool <mb_pool_0>: n=10240, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc testpmd: create a new mbuf pool <mb_pool_1>: n=10240, size=2176, socket=1 testpmd: preferred mempool ops selected: ring_mp_mc Warning! port-topology=paired and odd forward ports number, the last port will pair with itself. Configuring Port 0 (socket 0) Port 0: B8:CE:F6:35:DB:3A Configuring Port 1 (socket 0) Port 1: B8:CE:F6:35:DB:3B Configuring Port 2 (socket 1) Port 2: B8:CE:F6:3B:31:4A Configuring Port 3 (socket 1) Port 3: B8:CE:F6:3B:31:4B Configuring Port 4 (socket 0) xsk_configure(): Failed to create xsk socket. eth_rx_queue_setup(): Failed to configure xdp socket Fail to configure port 4 rx queues EAL: Error - exiting with code: 1 Cause: Start ports failed it seems that XSK socket call bind() failed and eth_rx_queue_setup() failed as a result. How to correctly configure EAL parameters to run dpdk-testpmd with vdev=af_net_xdp0? Any help is greatly appreciated.
It is an issue about rlimit. I wrote a simple test programer. #include <bpf.h> #include <xsk.h> #include <stdio.h> //#include <sys/resource.h> //static struct rlimit r = {RLIM_INFINITY, RLIM_INFINITY}; int main() { //setrlimit(RLIMIT_MEMLOCK, & r); int fd = bpf_create_map_name(BPF_MAP_TYPE_XSKMAP, "xsks_map", sizeof(int), sizeof(int), 1, 0); printf("fd:%d\n", fd); return 0; } Execute cmd strace -e bpf ./test-prog and the result could be like this: root#n211-203-164:~# strace -e bpf ./test bpf(BPF_MAP_CREATE, {map_type=0x11 /* BPF_MAP_TYPE_??? */, key_size=4, value_size=4, max_entries=1}, 112) = -1 EPERM (Operation not permitted) fd:-1 1 +++ exited with 0 +++ This means max locked memory caused the insufficient resource allocation. Execute cmd ulimit -a could find max locked memory is 64 kbytes. There are 2 solutions, one is to enlarge max locked memory globally by executing cmd ulimit -S -l <a big value>, and the other is to call setrlimit() into libbpf.so when creating a BPF map.
RegexpParser crashes Python 3.8.6 kernel in JupyterLab
I am parsing chunks of pos-tagged text in JupyterLabs. NLTK can run on Python<3.5 and >3.8 according to its faq. I can return pos-tagged text just fine. But when I want to return parsed chunks, it crashes python. I am running MacOS 11.1, Python 3.8.6, Jupyterlab 3.0.0, and nltk 3.5 from nltk import * text = """The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower. To think otherwise is to demean the Buddha...which is to demean oneself.""" sentence_re = r'''(?x) ([A-Z])(\.[A-Z])+\.? | \w+(-\w+)* | \$?\d+(\.\d+)?%? | \.\.\. | [][.,;"'?():-_`] ''' grammar = r""" NBAR: {<NN.*|JJ>*<NN.*>} # Nouns and Adjectives, terminated with Nouns NP: {<NBAR>} {<NBAR><IN><NBAR>} # Above, connected with in/of/etc... """ chunker = RegexpParser(grammar) toks = word_tokenize(text) postoks = pos_tag(toks) All is fine until I want to parse the chunks with RegexpParser. At which point, it crashes the kernel. chunker.parse(postoks) beginning of the crash report: Process: Python [1549] Path: /usr/local/Cellar/python#3.8/3.8.6_2/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 3.8.6 (3.8.6) Code Type: X86-64 (Native) Parent Process: Python [1522] Responsible: Terminal [416] User ID: 501 Date/Time: 2020-12-29 15:34:13.546 -0500 OS Version: macOS 11.1 (20C69) Report Version: 12 Anonymous UUID: 8EEE2257-0986-3569-AA83-52641AF02282 Time Awake Since Boot: 1200 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: abort() called end of the crash report: External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 4 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 4785 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=835.0M resident=0K(0%) swapped_out_or_unallocated=835.0M(100%) Writable regions: Total=1.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.5G(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 1 Dispatch continuations 64.0M 1 Kernel Alloc Once 8K 1 MALLOC 150.1M 37 MALLOC guard page 24K 5 MALLOC_MEDIUM (reserved) 960.0M 8 reserved VM address space (unallocated) STACK GUARD 72K 18 Stack 86.6M 18 VM_ALLOCATE 182.5M 359 VM_ALLOCATE (reserved) 128.0M 2 reserved VM address space (unallocated) __DATA 16.1M 460 __DATA_CONST 11.8M 200 __DATA_DIRTY 509K 87 __FONT_DATA 4K 1 __LINKEDIT 506.1M 241 __OBJC_RO 60.5M 1 __OBJC_RW 2452K 2 __TEXT 329.5M 432 __UNICODE 588K 1 mapped file 51.5M 9 shared memory 40K 4 =========== ======= ======= TOTAL 2.5G 1888 TOTAL, minus reserved VM space 1.4G 1888 Model: iMac18,2, BootROM 429.60.3.0.0, 4 processors, Quad-Core Intel Core i7, 3.6 GHz, 32 GB, SMC 2.40f1 Graphics: kHW_AMDRadeonPro560Item, Radeon Pro 560, spdisplays_pcie_device, 4 GB Memory Module: BANK 0/DIMM0, 16 GB, DDR4 SO-DIMM, 2400 MHz, 0x802C, 0x313641544632473634485A2D3247334232202020 Memory Module: BANK 1/DIMM0, 16 GB, DDR4 SO-DIMM, 2400 MHz, 0x802C, 0x313641544632473634485A2D3247334232202020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x16E), Broadcom BCM43xx 1.0 (7.77.111.1 AirPortDriverBrcmNIC-1675.1) Bluetooth: Version 8.0.2f9, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en1 USB Device: USB 3.0 Bus USB Device: AS2105 USB Device: USB 2.0 BILLBOARD USB Device: Bluetooth USB Host Controller USB Device: FaceTime HD Camera (Built-in) USB Device: Scarlett 2i4 USB USB Device: My Passport 0827 Thunderbolt Bus: iMac, Apple Inc., 41.4
Ceph-rgw Service stop automatically after installation
in my local cluster (4 Raspberry PIs) i try to configure a rgw gateway. Unfortunately the services disappears automatically after 2 minutes. [ceph_deploy.rgw][INFO ] The Ceph Object Gateway (RGW) is now running on host OSD1 and default port 7480 cephuser#admin:~/mycluster $ ceph -s cluster: id: 745d44c2-86dd-4b2f-9c9c-ab50160ea353 health: HEALTH_WARN too few PGs per OSD (24 < min 30) services: mon: 1 daemons, quorum admin mgr: admin(active) osd: 4 osds: 4 up, 4 in rgw: 1 daemon active data: pools: 4 pools, 32 pgs objects: 80 objects, 1.09KiB usage: 4.01GiB used, 93.6GiB / 97.6GiB avail pgs: 32 active+clean io: client: 5.83KiB/s rd, 0B/s wr, 7op/s rd, 1op/s wr After one minute the service(rgw: 1 daemon active) is no longer visible: cephuser#admin:~/mycluster $ ceph -s cluster: id: 745d44c2-86dd-4b2f-9c9c-ab50160ea353 health: HEALTH_WARN too few PGs per OSD (24 < min 30) services: mon: 1 daemons, quorum admin mgr: admin(active) osd: 4 osds: 4 up, 4 in data: pools: 4 pools, 32 pgs objects: 80 objects, 1.09KiB usage: 4.01GiB used, 93.6GiB / 97.6GiB avail pgs: 32 active+clean Many thanks for the help
Solution: On the gateway node, open the Ceph configuration file in the /etc/ceph/ directory. Find an RGW client section similar to the example: [client.rgw.gateway-node1] host = gateway-node1 keyring = /var/lib/ceph/radosgw/ceph-rgw.gateway-node1/keyring log file = /var/log/ceph/ceph-rgw-gateway-node1.log rgw frontends = civetweb port=192.168.178.50:8080 num_threads=100 https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/3/html-single/object_gateway_guide_for_red_hat_enterprise_linux/index
IPv6 encapsuling on Azure ILPIP
Use of IPv6 tunnels (like tunnelbroker.net) is possible on Azure VM, via ILPIP (Instance Level Public IP)? I tried to use it, but I don't get replies for ping packets to IPv6 gateway. Internet Protocol Version 4, Src: 100.90.204.79, Dst: 216.66.84.46 0100 .... = Version: 4 .... 0101 = Header Length: 20 bytes Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT) 0000 00.. = Differentiated Services Codepoint: Default (0) .... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0) Total Length: 124 Identification: 0x33d7 (13271) Flags: 0x02 (Don't Fragment) 0... .... = Reserved bit: Not set .1.. .... = Don't fragment: Set ..0. .... = More fragments: Not set Fragment offset: 0 Time to live: 255 Protocol: IPv6 (41) Header checksum: 0xea66 [validation disabled] [Good: False] [Bad: False] Source: 100.90.204.79 Destination: 216.66.84.46 [Source GeoIP: Unknown] [Destination GeoIP: Unknown] Internet Protocol Version 6, Src: 2001:470:1f14:105a::2, Dst: 2001:470:1f14:105a::1 0110 .... = Version: 6 .... 0000 0000 .... .... .... .... .... = Traffic class: 0x00 (DSCP: CS0, ECN: Not-ECT) .... 0000 00.. .... .... .... .... .... = Differentiated Services Codepoint: Default (0) .... .... ..00 .... .... .... .... .... = Explicit Congestion Notification: Not ECN-Capable Transport (0) .... .... .... 1001 0111 0111 0110 1010 = Flowlabel: 0x0009776a Payload length: 64 Next header: ICMPv6 (58) Hop limit: 64 Source: 2001:470:1f14:105a::2 Destination: 2001:470:1f14:105a::1 [Source GeoIP: Unknown] [Destination GeoIP: Unknown] Internet Control Message Protocol v6 Type: Echo (ping) request (128) Code: 0 Checksum: 0xd3f8 [correct] Identifier: 0x5016 Sequence: 1 [No response seen] [Expert Info (Warn/Sequence): No response seen to ICMPv6 request in frame 212] [No response seen to ICMPv6 request in frame 212] [Severity level: Warn] [Group: Sequence] Data (56 bytes) Data: 8bb5ed56000000006ed40d00000000001011121314151617... [Length: 56] I suspect that Azure is rejecting IPv4 protocol 41, am I correct?
The following is documented: Microsoft has played a leading role in helping customers to smoothly transition from IPv4 to IPv6 for the past several years. To date, Microsoft has built IPv6 support into many of its products and solutions like Windows 8 and Windows Server 2012 R2. Microsoft is committed to expanding the worldwide capabilities of the Internet through IPv6 and enabling a variety of valuable and exciting scenarios, including peer-to-peer and mobile applications. The foundational work to enable IPv6 in the Azure environment is well underway. However, we are unable to share a date when IPv6 support will be generally available at this time.