Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2017 10:47:30 +0800
From:      Julian Elischer <julian@freebsd.org>
To:        Rick Macklem <rmacklem@uoguelph.ca>, Ian Lepore <ian@freebsd.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: RFC how to use kernel procs/threads efficiently
Message-ID:  <e4a4c6ff-5ce0-b979-ab84-32136acdcba6@freebsd.org>
In-Reply-To: <YQXPR0101MB0997FAE97A7E42BCF570AA7EDD740@YQXPR0101MB0997.CANPRD01.PROD.OUTLOOK.COM>
References:  <YQXPR0101MB099752292CCAC9E8A72C1E96DD710@YQXPR0101MB0997.CANPRD01.PROD.OUTLOOK.COM> <1507317060.86205.268.camel@freebsd.org> <YQXPR0101MB0997FAE97A7E42BCF570AA7EDD740@YQXPR0101MB0997.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/10/17 4:25 am, Rick Macklem wrote:
> ________________________________________
> Ian Lepore wrote:
> [stuff snipped]
>> taskqueue(9) is an existing mechanism to enqueue functions to execute
>> asynch using a pool of threads, but it doesn't answer the scalability
>> questions.  In fact it may make them harder, inasmuch as I don't think
>> there's a mechanism to dynamically adjust the number of threads after
>> first calling taskqueue_start_threads().
> I've coded it using taskqueue and it seems to work ok.
> The patch is here, in case anyone would like to review it:
> https://www.reviews.freebsd.org/D12632
>
> I don't know what the overheads are (or even how to measure/compare
> them), but I suspect it is less than a kproc_create()/kproc_exit() for every
> RPC.
>
> I also don't think having a fixed # of threads is a problem. Since NFS I/O
> is so bursty, recent I/O activity doesn't give a good indication of how many
> threads will be needed soon. In other words, it can go from no I/O to
> heavy I/O and back to no I/O rapidly.
> --> As such, having a fixed reasonable # of threads is probably the best
>        that can be done.
>        - The current patch has the # of threads as a sysctl with a default of 32.
why not set it to ncpu or something?

>
> Thanks for your comments and feel free to review it, if you'd like, rick
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e4a4c6ff-5ce0-b979-ab84-32136acdcba6>