Re: [PATCH v2 10/11] reftable: make the compaction factor configurable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 10, 2024 at 03:12:03PM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> 
> > When auto-compacting, the reftable library packs references such that
> > the sizes of the tables form a geometric sequence. The factor for this
> > geometric sequence is hardcoded to 2 right now. We're about to expose
> > this as a config option though, so let's expose the factor via write
> > options.
> 
> Hmph.  It is unclear if having this as uint8_t gives us a useful
> enhancement, but perhaps in the future hosters may find a more
> aggressive geometric sequence is better for their workload or
> something and raise it to 3 or 4?  I was actually wondering if a
> base smaller than 2 (e.g. fibonacci) may work better.
> 
> Anyway, making it configurable is a good first step.  Allowing a bit
> finer grained setting than just integral values can be done later if
> it proves necessary.

That's a fair point indeed. I had similar issues with git-repack(1)'s
`--geometric=` option, where you can also only pick integers. There's
also a similar discussion in the patch series by Taylor [1], where I
proposed to maybe introduce floats into git-config(1).

So this may be good enough for now, and when we gain the ability to
parse floats we may convert this to accept floats, as well. An
alternative would be to convert this to percent, where the default value
would be 200. That should give sufficient flexibility without having to
introduce floats.

Patrick

[1]: https://lore.kernel.org/git/Zjk2UIV3kEwZUDW+@nand.local/

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux