Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-20 Thread Jeff King
On Tue, Jul 19, 2016 at 12:53:47PM -0700, Jonathan Nieder wrote: > Junio C Hamano wrote: > > > Even if it is conservative, I wonder if it is truly a good idea to > > make it exponentially grow forever from that point of view. Would > > it give essentially the same result to you if we discard

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Junio C Hamano
Jonathan Nieder writes: > In the stateless-rpc case, linear growth means getting a bounded > number of 'have's worth of benefit (new 'have's) in each round, in > exchange for a linearly increasing cost (existing 'have's). That is a > high cost for limited benefit.

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Jonathan Nieder
Junio C Hamano wrote: > Even if it is conservative, I wonder if it is truly a good idea to > make it exponentially grow forever from that point of view. Would > it give essentially the same result to you if we discard the patch > in question and just raise LARGE_FLUSH to 10k instead? I don't

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Junio C Hamano
Jonathan Tan writes: >> So I guess what I do not understand is why we need to slow down the >> exponential growth at all? > > The current code has an exponential (a' = a * 2) then a linear (a' = a > + 1024) growth. I'm not slowing down the exponential growth - that >

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Stefan Beller
On Tue, Jul 19, 2016 at 12:03 PM, Jonathan Tan wrote: > On Tue, Jul 19, 2016 at 9:46 AM, Stefan Beller wrote: >> Care to elaborate on why you choose 11/10 as growth factor? >> >> (As someone who has a tick in micro optimizing: >> 9/8 is roughly the

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Jonathan Tan
On Tue, Jul 19, 2016 at 9:46 AM, Stefan Beller wrote: > Care to elaborate on why you choose 11/10 as growth factor? > > (As someone who has a tick in micro optimizing: > 9/8 is roughly the same exponent, but the division > by 8 is easier as it is just a shift by 3. Similar

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-19 Thread Stefan Beller
On Mon, Jul 18, 2016 at 3:21 PM, Jonathan Tan wrote: > When updating large repositories, the LARGE_FLUSH limit (that is, the > limit at which the window growth strategy switches from exponential to > linear) is reached quite quickly. Use a conservative exponential growth

Re: [PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-18 Thread Jonathan Nieder
Jonathan Tan wrote: > Signed-off-by: Jonathan Tan > --- > fetch-pack.c | 19 --- > 1 file changed, 12 insertions(+), 7 deletions(-) Reviewed-by: Jonathan Nieder Thanks again. -- To unsubscribe from this list: send the line

[PATCH v2] fetch-pack: grow stateless RPC windows exponentially

2016-07-18 Thread Jonathan Tan
When updating large repositories, the LARGE_FLUSH limit (that is, the limit at which the window growth strategy switches from exponential to linear) is reached quite quickly. Use a conservative exponential growth strategy when that limit is reached instead (and increase LARGE_FLUSH so that there