Re: cache: move open to thread pool

2019-02-08 Thread Ka-Hing Cheung via nginx-devel
:39 AM Maxim Konovalov wrote: > >> > >> Hi Ka-Hing, > >> > >> Roman told me that the delta is because of your changes. > >> > >> Thanks for your time on that. Waiting for your testing results. > >> > >> Maxim > >> >

Re: cache: move open to thread pool

2019-02-06 Thread Ka-Hing Cheung via nginx-devel
. > > Maxim > > On 22/01/2019 22:34, Ka-Hing Cheung via nginx-devel wrote: > > I spoke too soon, just realized our test colo is running the patches > > without aio_open on. Flipping that switch now. > > > > Also, including the patch that we applied on top in additi

Re: cache: move open to thread pool

2019-01-22 Thread Ka-Hing Cheung via nginx-devel
I spoke too soon, just realized our test colo is running the patches without aio_open on. Flipping that switch now. Also, including the patch that we applied on top in addition to the massaging we did to resolve conflicts. I haven't dug too deep to see if stock nginx also requires similar changes

Re: cache: move open to thread pool

2019-01-22 Thread Ka-Hing Cheung via nginx-devel
Hi Maxim and Roman, We've been running a version of your patches in our test colo for the past week with no ill effects, with the caveat that it's difficult to measure performance impacts in our test colo because of varying traffic. We had to massage the patches a bit because we don't run vanilla

Re: cache: move open to thread pool

2019-01-14 Thread Ka-Hing Cheung via nginx-devel
We didn't get to it last year because of other priorities but this is being worked on. We don't use a vanilla nginx so it takes effort to integrate your patches. Having a version of this in upstream nginx is important to us and to me personally. On Thu, Jan 10, 2019 at 12:30 AM Maxim Konovalov wr

Re: cache: move open to thread pool

2018-11-15 Thread Ka-Hing Cheung via nginx-devel
Hi, I didn't forget about this. I am pretty swamped at the moment and there's a holiday freeze coming up. Will get to his in December. - Ka-Hing On Thu, Nov 8, 2018 at 6:19 AM Maxim Konovalov wrote: > > Hi Ka-Hing, > > would you mind to test Roman's most recent patches that add > "aio_open" dir

Re: cache: move open to thread pool

2018-09-04 Thread Ka-Hing Cheung via nginx-devel
On Mon, Sep 3, 2018 at 9:09 AM, Maxim Dounin wrote: > The biggest problem with in-place solution is that it requires > in-place coding for all the places where we want to use aio_open. > Currently we use ngx_open_cached_file() to open files everywhere, > and it would be a good idea to preserve it

Re: cache: move open to thread pool

2018-08-27 Thread Ka-Hing Cheung via nginx-devel
Hi Eran, Happy to see that we are not the only place where we find open to be a problem. I took a look at your module and while the approach is sound, I decided the complexity doesn't seem to be worth it. Hope to see some numbers of how your module works at scale. - Ka-Hing On Wed, Aug 8, 2018

Re: cache: move open to thread pool

2018-08-27 Thread Ka-Hing Cheung via nginx-devel
Thanks for all the feedback! This is an updated version of the patch. There may still be some coding style issues (which will be addressed), but should address most of the comments other than these two: > - The code bypasses open file cache, and uses a direct call > in the http cache code instead

Re: cache: move open to thread pool

2018-08-09 Thread Ka-Hing Cheung via nginx-devel
Very good feedback, we will look into implementing some of them at least. On Wed, Aug 8, 2018 at 11:16 AM, Maxim Dounin wrote: > > We've thought about offloading more operations to thread pools, > and that's basically why "aio_write" is a separate directive, so > more directives like "aio_" can b

cache: move open to thread pool

2018-08-07 Thread Ka-Hing Cheung via nginx-devel
commit 0bcfefa040abdff674047c15701d237ff16a5f2b Author: Ka-Hing Cheung Date: Fri Aug 3 13:37:58 2018 -0700 move open to thread pool At cloudflare we found that open() can block a long time, especially at p99 and p999. Moving it to thread pool improved overall p99 by 6x or so du