From: Jesper Dangaard Brouer <jbrouer@redhat.com>
To: Vincent Li <mchun.li@gmail.com>
Cc: Christian Deacon <gamemann@gflclan.com>, xdp-newbies@vger.kernel.org
Subject: Re: Measuring/Debugging XDP Performance
Date: Thu, 23 Jan 2020 13:30:33 +0100 [thread overview]
Message-ID: <20200123133033.5398e848@carbon> (raw)
In-Reply-To: <alpine.OSX.2.21.2001221405250.1261@jiadeimac.local>
On Wed, 22 Jan 2020 14:11:07 -0800 (PST)
Vincent Li <mchun.li@gmail.com> wrote:
> On Wed, 22 Jan 2020, Christian Deacon wrote:
>
> > Hey everyone,
> >
> > I am new to XDP + AF_XDP (along with C programming in general), but I am very
> > interested in it and I've been learning a lot recently. I own an Anycast
> > network and our POP servers are running custom software our developer created
> > that processes packets using XDP. This software basically forwards specific
> > traffic to another machine via an IPIP tunnel. One issue I've been noticing is
> > the packets our software is processing and forwarding to another machine keep
> > dropping at higher traffic loads. I can't tell if this is dropping at the POP
> > level or if the machine the software is forwarding this specific traffic to
> > is. I've even tried upgrading the POP server from a two-core VPS (2.5 GHz
> > CPUs) to a dedicated server (Intel E3-1230v6 @ 3.5 GHz, 4 cores, and 8
> > threads). If this is being dropped at the POP level, I'm wondering if the
> > software is being limited to one core on this specific POP (other POPs are
> > able to use more than one core specifically). However, I have no way to
> > confirm that. To my understanding XDP programs should be able to use more than
> > one core.
> >
> > My questions are the following:
> >
> > 1. Is there a way to see how much CPU the XDP program is using or the load of
> > the NIC? To my understanding, you cannot tell the XDP program's CPU usage
> > based off of something like `top` or `htop` due to that being in the user
> > space (XDP happens at the NIC driver level in the kernel IIRC).
>
> I am newbie in XDP too, maybe Linux
> Perf http://www.brendangregg.com/perf.html tool could help you figuring
> out which part of the code in your XDP app consuming CPU cycles (debug
> symbol needed)
I agree start with the 'perf' command line tool to look at the issue.
As this is likely a CPU load distribution issue, let me give you are
couple of perf commands to use.
First record system wide (-a) entire system for 10 sec:
perf record -g -a sleep 10
Look at what happened:
perf report --no-children
Now you also want to look at this per CPU:
perf report --no-children --sort cpu,comm,dso,symbol
If you want to send some info about your perf report results via email,
you can use the --stdio parameter to get the plain text output.
Once you have completed this quest, I'll help you with some more
advanced commands... does you distro have 'bpftrace' ?
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2020-01-23 12:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 18:02 Measuring/Debugging XDP Performance Christian Deacon
2020-01-22 22:11 ` Vincent Li
2020-01-23 12:30 ` Jesper Dangaard Brouer [this message]
2020-01-23 13:11 ` Jesper Dangaard Brouer
2020-01-23 17:22 ` Christian Deacon
2020-01-23 20:38 ` Jesper Dangaard Brouer
2020-01-23 21:38 ` Christian Deacon
2020-01-28 18:55 ` Christian Deacon
2020-01-29 1:19 ` Matheus Salgueiro Castanho
[not found] ` <b1d478e6-555c-97da-f967-4f10f879f589@gflclan.com>
2020-01-29 12:09 ` Jesper Dangaard Brouer
2020-01-29 14:26 ` Jesper Dangaard Brouer
2020-01-30 14:53 ` Christian Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123133033.5398e848@carbon \
--to=jbrouer@redhat.com \
--cc=gamemann@gflclan.com \
--cc=mchun.li@gmail.com \
--cc=xdp-newbies@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.