On Thu, Aug 06, 2020 at 03:00:06PM -0000, Chris Lamb wrote:
> Thanks for the heads-up; I don't subscribe to Redis bugs filed against
> Ubuntu. So, for completeness, I can "reproduce" this in Debian:

Thanks for confirming, I was able to get the same behavior when I tried it on 
your latest Debian source package, hence why I felt reasonably comfortable it 
applied to both distributions.

> I use the term "reproduce" in square quotes here because I am not
> entirely sure why you are surprised by this error -- we deliberately
> do not use the bundled version of jemalloc in Debian so we can use the
>  system one as per the general policy about avoiding embedded code
> copies.

I am curious: where did I say I was surprised by the behavior? I've used 
Debian (or Ubuntu derivatives) since about 1997 and I am aware of and strongly 
support the general policy.

But at the same time, I wanted to be sure the community was made aware of it 
if they were setting up the service and expected the feature to work, and 
advise that at least a base config file comment about it could be a good idea 
if everybody decides not to fix it.

> The only solutions would appear to be either (a) revert to using the
> bundled jemalloc version (which would require a stronger case at this
> point), or (b) ask upstream to merge this fragmentation support into
> upstream jemalloc.

I think this analysis is probably correct, depending on the estimated 
importance of the feature.

If you could provide some advice, of the right way to temporarily disable the 
USE_SYSTEM_JEMALLOC patch, for building a one-off Debian package of the 
redis-server where defrag would be able to operate, probably that's good 
enough so that somebody would see it in the public historical record if they 
run into this later.

> What am I missing here? I might be missing something ...

I think you got it right.

> I don't completely understand your remarks about the JEMALLOC_FRAG_HINT 
> define.

Sorry, I was pretty tired when I wrote it, as I found it late in a 16 hour day 
of coding something else which had redis-server as a dependency, and took a 
break to debug it and report it in an effort to give back to the community at 
least a little bit, after I found it was apparently not seen before online in 
my search engine results.

> Indeed, the code that surrounds it in zmalloc.h appears to
> perfectly describe the trade-off being made:
> 
>  73 /* We can enable the Redis defrag capabilities only if we are using 
> Jemalloc
>  74  * and the version used is our special version modified for Redis having
>  75  * the ability to return per-allocation fragmentation hints. */
>  76 #if defined(USE_JEMALLOC) && defined(JEMALLOC_FRAG_HINT)
>  77 #define HAVE_DEFRAG
>  78 #endif

True, but that's a good few layers deep, so I was trying to give it a bit more 
exposure for the next user, whoever that might be.

Thanks for your prompt reply and analysis, and for maintaining the package.

Matthew.

Reply via email to