Welcome! Log In Create A New Profile

Advanced

Re: Use primes for hashtable size

June 01, 2017 08:58PM
If this actually yields a decrease in start time while not introducing
other effects we would use it. Our start time of a couple minutes is
annoying at times.

On Fri, Jun 2, 2017 at 3:57 AM, Andrew Borodin <borodin@octonica.com> wrote:

> 2017-06-01 22:39 GMT+05:00 Maxim Dounin <mdounin@mdounin.ru>:
> > Thanks, though suggested change will certainly modify current
> > nginx (documented) approach of searching for minimum possible
> > hash sizes.
> >
> > It might be a better solution for large hashes though, as
> > currently optimized by using a larger start size:
> >
> > if (hinit->max_size > 10000 && nelts && hinit->max_size / nelts <
> 100) {
> > start = hinit->max_size - 1000;
> > }
>
> Yeah, maybe put the primes loop under if.
>
> > Not sure it is at all needed though, as I don't remember any
> > "words about startup speed" in the documentation and startup
> > speed of hashes wasn't a practical problem as far as I remember.
>
>
> Here https://nginx.ru/en/docs/http/server_names.html
> "if nginx’s start time is unacceptably long, try to increase
> server_names_hash_bucket_size" It's about allowing more hash
> collisions.
> But I do not insist, though :) I've done the patch jut for fun
>
> Best regards, Andrey Borodin, Octonica.
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Use primes for hashtable size Attachments

Andrew Borodin 358 May 30, 2017 06:30AM

Re: Use primes for hashtable size

Maxim Dounin 233 May 30, 2017 09:04AM

Re: Use primes for hashtable size

Andrew Borodin 239 June 01, 2017 07:56AM

Re: Use primes for hashtable size

Maxim Dounin 204 June 01, 2017 01:40PM

Re: Use primes for hashtable size

Andrew Borodin 154 June 01, 2017 01:58PM

Re: Use primes for hashtable size

splitice 192 June 01, 2017 08:58PM

Re: Use primes for hashtable size

Maxim Dounin 158 June 02, 2017 07:48AM

Re: Use primes for hashtable size

splitice 216 June 02, 2017 07:52AM

Re: Use primes for hashtable size

Andrew Borodin 209 June 03, 2017 02:02AM

Re: Use primes for hashtable size

Andrew Borodin 209 June 04, 2017 02:24PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 114
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready