git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stefan Beller <sbeller@google.com>
Date
Jul 19, 2016, 19:17 UTC
Message-ID
<CAGZ79kZxN9uYprMUXMuWpO3mKfw6WTa3uoG=SXWny7St1OfGzA@mail.gmail.com>
In-Reply-To
<CAGf8dgL3t7uX7yAux0xc2QMJJdmnM0262Quj4o6gDehwA+4JqQ@mail.gmail.com>
On Tue, Jul 19, 2016 at 12:03 PM, Jonathan Tan <jonathantanmy@google.com> wrote:
Show 25 quoted lines
> On Tue, Jul 19, 2016 at 9:46 AM, Stefan Beller <sbeller@google.com> 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 17/16)
>
> I don't have a specific reason for 11/10 as opposed to, say, 9/8 - I
> think that the time taken to execute this line is negligible compared
> to what's done in the calling code, but I'll change it to 9/8 if there
> is another reason for me to send another patch.
>
>> I guess one design criterion was 10 being a round number?
>> Does it make sense to experiment with the factor at all?
>> Digging into that, LARGE_FLUSH originates from 6afca450c3f,
>> (2011-03-20, fetch-pack: progressively use larger handshake windows),
>> and before we only had a linear growth.
>>
>> 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
> part is retained. I'm replacing the linear growth with another
> conservative exponential growth (a' = a * 11 / 10).

Sorry for the miss understanding. Once we have the new conservative exponential, we'd have a fast exponential first (a=2*a) and then after a while a slower exponential (a=1.1*a). So we have 2 exponential curves with different growth properties.

So my question could be reworded as: Why do we need two different exponential growth phases (as they are both exponential)? And I answered myself with: Oh, the exponents are different, so that's why.

But then I tried to understand why we choose the 2 exponents as of this patch. (Why start with 2 and drop back to 1.1?) Could one exponential phase be sufficient with an exponent in between (e.g. a=1.3*a with a larger starting a to compensate for the reduced early growth) ?

Or to reword it another way: Using just one exponential growth is simpler than 2 different exponential growth phases, so how do we explain the added complexity?

Thanks, Stefan

Previous: Jonathan TanNext: Junio C Hamano
Message 13 of 17 in “fetch-pack: grow stateless RPC windows exponentially”
  1. fetch-pack: grow stateless RPC windows exponentiallyJonathan Tan, Jul 18, 2016
  2. Jonathan NiederJul 18, 2016
  3. Junio C HamanoJul 18, 2016
  4. Jonathan TanJul 18, 2016
  5. Jonathan NiederJul 18, 2016
  6. Junio C HamanoJul 18, 2016
  7. Jonathan TanJul 18, 2016
  8. Junio C HamanoJul 18, 2016
  9. fetch-pack: grow stateless RPC windows exponentiallyJonathan Tan, Jul 18, 2016
  10. Jonathan NiederJul 18, 2016
  11. Stefan BellerJul 19, 2016
  12. Jonathan TanJul 19, 2016
  13. Stefan BellerJul 19, 2016
  14. Junio C HamanoJul 19, 2016
  15. Jonathan NiederJul 19, 2016
  16. Junio C HamanoJul 19, 2016
  17. Jeff KingJul 20, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.