Quantcast

numa and taskqueues

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

numa and taskqueues

Emeric POUPON-2
Hello,

I have made a review to boost ipsec performance when very few flows are involved: https://reviews.freebsd.org/D10680 (reviews would be appreciated btw!)
The idea is to dispatch the crypto jobs using a taskqueue (with nb threads = nbcpus), details are in the review.

However, this does not scale well on multi socket architectures (ex: 2*6 cores), a lot of time is wasted in the locks.

For testing purposes, I created as many taskqueues as domains and I modified the taskqueue_start_threads function to specify a cpuset_t mask.
The idea here is to stay on the same domain to dispatch the crypto jobs and to notify back the crypto users.
This gives quite good performance so it seems to be an promising way.

Now the question is: how can I make the taskqueues "domain aware"?
Do I have to add some logic in crypto(9) or could this be abstracted in some other part of the kernel?
Another annoying part is the kprocs used by the return queues. We would also have to bind them to a single domain. How?

What do you think?

Emeric
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: numa and taskqueues

Adrian Chadd-4
Hi,

I've been worried about the trend to create ncpu*taskqueue or
ndomain*taskqueue for things unless we really need the priority /
preemption behaviour. Otherwise we will just end up with a lot of
pcpu/pdomain taskqueues that sit idly and/or compete infficiently.

Anyway - I think it'd be nice to have domain aware and pcpu aware
taskqueues so we can eventually migrate to a taskqueue group model of
"one top level things for net processing" for devices to share, etc,
etc. But for the short term just prototype it with some thin API in
crypto that wraps the taskqueue / kproc work so it gets done, then
push that work out for review/evaluation. if it does indeed work the
way you intend, we can try to use it as a template for a higher level,
shared taskqueue thing.

Thanks,


-adrian


On 19 May 2017 at 00:13, Emeric POUPON <[hidden email]> wrote:

> Hello,
>
> I have made a review to boost ipsec performance when very few flows are involved: https://reviews.freebsd.org/D10680 (reviews would be appreciated btw!)
> The idea is to dispatch the crypto jobs using a taskqueue (with nb threads = nbcpus), details are in the review.
>
> However, this does not scale well on multi socket architectures (ex: 2*6 cores), a lot of time is wasted in the locks.
>
> For testing purposes, I created as many taskqueues as domains and I modified the taskqueue_start_threads function to specify a cpuset_t mask.
> The idea here is to stay on the same domain to dispatch the crypto jobs and to notify back the crypto users.
> This gives quite good performance so it seems to be an promising way.
>
> Now the question is: how can I make the taskqueues "domain aware"?
> Do I have to add some logic in crypto(9) or could this be abstracted in some other part of the kernel?
> Another annoying part is the kprocs used by the return queues. We would also have to bind them to a single domain. How?
>
> What do you think?
>
> Emeric
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "[hidden email]"
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Loading...