Date: Wed, 19 Feb 2014 14:11:45 -0800 From: Jeffrey Carl Faden <jeffreyatw@gmail.com> To: Alexander Motin <mav@freebsd.org> Cc: "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>, Slawa Olhovchenkov <slw@zxy.spb.ru> Subject: Re: [rfc] bind per-cpu timeout threads to each CPU Message-ID: <CACwe8VgGaxtULRaTPf2K73ttqwyApzkSOesYMF5rsmskPw_fCA@mail.gmail.com> In-Reply-To: <53052B80.3010505@FreeBSD.org> References: <530508B7.7060102@FreeBSD.org> <CAJ-VmokQ_C=YVpk41_r-QakB46_RWRe0didq1_RrZBMS7hDX-A@mail.gmail.com> <53050D24.3020505@FreeBSD.org> <CAJ-Vmo=KFF_2tdyq1u=jNkWfEe1sR-89t3JNggf7MEvYsF%2BtQg@mail.gmail.com> <53051C71.3050705@FreeBSD.org> <20140219214428.GA53864@zxy.spb.ru> <53052B80.3010505@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi guys! I was accidentally added to this thread, and would appreciate if you removed my email from any further correspondence. Thanks a bunch! Jeffrey On Wed, Feb 19, 2014 at 2:09 PM, Alexander Motin <mav@freebsd.org> wrote: > On 19.02.2014 23:44, Slawa Olhovchenkov wrote: > >> On Wed, Feb 19, 2014 at 11:04:49PM +0200, Alexander Motin wrote: >> >> On 19.02.2014 22:04, Adrian Chadd wrote: >>> >>>> On 19 February 2014 11:59, Alexander Motin <mav@freebsd.org> wrote: >>>> >>>> So if we're moving towards supporting (among others) a pcbgroup / RSS >>>>>> hash style work load distribution across CPUs to minimise >>>>>> per-connection lock contention, we really don't want the scheduler to >>>>>> decide it can schedule things on other CPUs under enough pressure. >>>>>> That'll just make things worse. >>>>>> >>>>> >>>> True, though it is also not obvious that putting second thread on CPU >>>>> run >>>>> queue is better then executing it right now on another core. >>>>> >>>> >>>> Well, it depends if you're trying to optimise for "run all runnable >>>> tasks as quickly as possible" or "run all runnable tasks in contexts >>>> that minimise lock contention." >>>> >>>> The former sounds great as long as there's no real lock contention >>>> going on. But as you add more chances for contention (something like >>>> "100,000 concurrent TCP flows") then you may end up having your TCP >>>> timer firing stuff interfere with more TXing or RXing on the same >>>> connection. >>>> >>> >>> 100K TCP flows probably means 100K locks. That means that chance of lock >>> collision on each of them is effectively zero. More realistic it could >>> >> >> What about 100K/N_cpu*PPS timer's queue locks for remove/insert TCP >> timeouts callbacks? >> > > I am not sure what this formula means, but yes, per-CPU callout locks can > much more likely be congested. They are only per-CPU, not per-flow. > > -- > Alexander Motin >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACwe8VgGaxtULRaTPf2K73ttqwyApzkSOesYMF5rsmskPw_fCA>