DPDK usage discussions
 help / color / mirror / Atom feed
From: "terry.montague.1980@btinternet.com" <terry.montague.1980@btinternet.com>
To: users@dpdk.org
Subject: Re: [dpdk-users] Linux forcibly descheduling isolated thread on isolated cpu running DPDK rx under load
Date: Thu, 19 Apr 2018 21:01:15 +0100 (BST)	[thread overview]
Message-ID: <29021657.45860.1524168075315.JavaMail.defaultUser@defaultHost> (raw)
In-Reply-To: <10337109.30346.1524152612506.JavaMail.defaultUser@defaultHost>


I should also say - I've disabled the kernel's 5% time reservation for SCHED_FIFO through setting /proc/sys/kernel/sched_rt_runtime_us to -1.

Any help with this problem gratefully appreciated.

Many thanks

Terry.


----Original message----
>From : terry.montague.1980@btinternet.com
Date : 19/04/18 - 16:43 (BST)
To : users@dpdk.org
Subject : [dpdk-users] Linux forcibly descheduling isolated thread on isolated cpu running DPDK rx under load

Hi there,
I wondered if anyone had come across this particular problem regarding linux scheduling, or rather what appears to be a forced descheduling effect.
I'm running on standard vanilla Ubuntu 17-10 using kernel 4.13.0-36-generic. 
Local Timer interrupts are therefore enabled....
I'm running a dual CPU Xeon E5-2623v4 system. I have cpu 2 on the first NUMA node (CPU 0) isolated for DPDK receive. I have an Intel X550 card attached to NUMA 0.
What I'm doing is running my DPDK receive thread on the isolated core (2) and 
changing the scheduling for this thread to SCHED_FIFO and priority 98.
Most of the time this works really well. However, I'm running this DPDK thread inside a larger application - there are probably 40 threads inside this process at default priority.
What I'm seeing is, when the application is under load, the DPDK receive thread is forcibly descheduled (observed with pidstat -p <PID> -w and seeing the non-voluntary counts spike ) and the core appears to go idle, sometimes for up to 1400uS. 
This is obviously a problem....
Running "perf" to sample activity on this isolated core only, I see the following entries.
   0.90%  swapper        [kernel.kallsyms]    [k] cpu_idle_poll
   0.60%  lcore-slave-2  [kernel.kallsyms]    [k] clear_page_erms
i.e  - it has gone idle and 1.5% of the processing time has gone elsewhere - which ties in pretty well with my ~1400uS deschedule observation.
In normal operation I do not see this effect.
I've checked the code - it appears to go idle in the middle of some AVX2 data processing code - there are no system calls taken, it just goes idle.
Does anyone have any ideas ? 
Many thanks
Terry

  reply	other threads:[~2018-04-19 20:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 15:43 terry.montague.1980
2018-04-19 20:01 ` terry.montague.1980 [this message]
2018-04-20  1:44   ` Stephen Hemminger
2018-04-20  1:59 ` Tim Shearer
2018-04-20 10:14   ` Richard Nutman
2018-04-20 11:32     ` terry.montague.1980

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=29021657.45860.1524168075315.JavaMail.defaultUser@defaultHost \
    --to=terry.montague.1980@btinternet.com \
    --cc=users@dpdk.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 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).