* [dpdk-users] occasionally ~300us delay @ 2018-02-28 5:01 Yuliang Li 2018-02-28 5:03 ` Yuliang Li 0 siblings, 1 reply; 4+ messages in thread From: Yuliang Li @ 2018-02-28 5:01 UTC (permalink / raw) To: users Hi all, I am using dpdk to generate packets. Specifically, I have a list of <packet Pi, time Ti>, meaning I want to send Pi at Ti. I wait for Ti by while (rte_get_tsc_cycles()<Ti). However, sometimes I see a delay of around 300us of sending packets, i.e., the sending time of some Pi is around Ti+300us. It looks like the program just pauses by 300us, and then resumes. Does anyone know why? Thanks, -- Yuliang Li PhD student Department of Computer Science Yale University ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] occasionally ~300us delay 2018-02-28 5:01 [dpdk-users] occasionally ~300us delay Yuliang Li @ 2018-02-28 5:03 ` Yuliang Li 2018-02-28 9:27 ` Gaëtan Rivet 0 siblings, 1 reply; 4+ messages in thread From: Yuliang Li @ 2018-02-28 5:03 UTC (permalink / raw) To: users Also, such pause happens regularly--every 0.5s. On Wed, Feb 28, 2018 at 12:01 AM, Yuliang Li <yuliang.li@yale.edu> wrote: > Hi all, > > I am using dpdk to generate packets. Specifically, I have a list of > <packet Pi, time Ti>, meaning I want to send Pi at Ti. I wait for Ti by while > (rte_get_tsc_cycles()<Ti). However, sometimes I see a delay of around > 300us of sending packets, i.e., the sending time of some Pi is around > Ti+300us. It looks like the program just pauses by 300us, and then resumes. > Does anyone know why? > > Thanks, > -- > Yuliang Li > PhD student > Department of Computer Science > Yale University > -- Yuliang Li PhD student Department of Computer Science Yale University ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] occasionally ~300us delay 2018-02-28 5:03 ` Yuliang Li @ 2018-02-28 9:27 ` Gaëtan Rivet 2018-02-28 15:15 ` Stephen Hemminger 0 siblings, 1 reply; 4+ messages in thread From: Gaëtan Rivet @ 2018-02-28 9:27 UTC (permalink / raw) To: Yuliang Li; +Cc: users Hi, On Wed, Feb 28, 2018 at 12:03:30AM -0500, Yuliang Li wrote: > Also, such pause happens regularly--every 0.5s. > > On Wed, Feb 28, 2018 at 12:01 AM, Yuliang Li <yuliang.li@yale.edu> wrote: > > > Hi all, > > > > I am using dpdk to generate packets. Specifically, I have a list of > > <packet Pi, time Ti>, meaning I want to send Pi at Ti. I wait for Ti by while > > (rte_get_tsc_cycles()<Ti). However, sometimes I see a delay of around > > 300us of sending packets, i.e., the sending time of some Pi is around > > Ti+300us. It looks like the program just pauses by 300us, and then resumes. > > Does anyone know why? > > > > Thanks, > I would reduce entropy and gather more data. You can isolate your process (i.e. numactl), if possible not on core 0, disable hyper-threading, disable CPU frequency scaling. Then, running your app: # grep ctxt_sw /proc/$(pidof your-dpdk-app)/status If you have context switches, then you have other tasks throwing off your measures. The rte-intr-thread is notorious for having bad affinities and triggering context switches, and can be used for alarms (thus, possible regular occurence). Regards, -- Gaëtan Rivet 6WIND ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-users] occasionally ~300us delay 2018-02-28 9:27 ` Gaëtan Rivet @ 2018-02-28 15:15 ` Stephen Hemminger 0 siblings, 0 replies; 4+ messages in thread From: Stephen Hemminger @ 2018-02-28 15:15 UTC (permalink / raw) To: Gaëtan Rivet; +Cc: Yuliang Li, users On Wed, 28 Feb 2018 10:27:28 +0100 Gaëtan Rivet <gaetan.rivet@6wind.com> wrote: > Hi, > > On Wed, Feb 28, 2018 at 12:03:30AM -0500, Yuliang Li wrote: > > Also, such pause happens regularly--every 0.5s. > > > > On Wed, Feb 28, 2018 at 12:01 AM, Yuliang Li <yuliang.li@yale.edu> wrote: > > > > > Hi all, > > > > > > I am using dpdk to generate packets. Specifically, I have a list of > > > <packet Pi, time Ti>, meaning I want to send Pi at Ti. I wait for Ti by while > > > (rte_get_tsc_cycles()<Ti). However, sometimes I see a delay of around > > > 300us of sending packets, i.e., the sending time of some Pi is around > > > Ti+300us. It looks like the program just pauses by 300us, and then resumes. > > > Does anyone know why? > > > > > > Thanks, > > > > I would reduce entropy and gather more data. > > You can isolate your process (i.e. numactl), if possible not on core 0, disable > hyper-threading, disable CPU frequency scaling. > > Then, running your app: > > # grep ctxt_sw /proc/$(pidof your-dpdk-app)/status > > If you have context switches, then you have other tasks throwing off your measures. > The rte-intr-thread is notorious for having bad affinities and triggering context > switches, and can be used for alarms (thus, possible regular occurence). > > Regards, Sounds like SMI ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-28 15:15 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-02-28 5:01 [dpdk-users] occasionally ~300us delay Yuliang Li 2018-02-28 5:03 ` Yuliang Li 2018-02-28 9:27 ` Gaëtan Rivet 2018-02-28 15:15 ` Stephen Hemminger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).