Re: [PATCH v2 0/2] read-cache: call verify_hdr() in a background thread
- From
- Jeff Hostetler <git@jeffhostetler.com>
- Date
- Mar 28, 2017, 15:30 UTC
- Message-ID
- <bf02e996-0b4b-f2ed-09b1-c99bb93c800f@jeffhostetler.com>
- In-Reply-To
- <20170327224505.ngp2gel3yvqcjrhw@sigill.intra.peff.net>
On 3/27/2017 6:45 PM, Jeff King wrote:
Show 33 quoted lines
> On Mon, Mar 27, 2017 at 09:09:37PM +0000, git@jeffhostetler.com wrote: > >> From: Jeff Hostetler <jeffhost@microsoft.com> >> >> Version 2 of this patch series simplifies this to just >> turn off the hash verification. Independent comments >> from Linus and Peff suggested that we could just turn >> this off and not worry about it. So I've updated this >> patch to do that. I added a global variable to allow >> the original code path to be used. I also added a >> t/helper command to demonstrate the differences. >> >> On the Linux repo, the effect is rather trivial: >> >> $ ~/work/gfw/t/helper/test-skip-verify-index -c 3 >> 0.029884 0 [cache_nr 57994] >> 0.031035 0 [cache_nr 57994] >> 0.024308 0 [cache_nr 57994] >> 0.028409 0 avg >> 0.018359 1 [cache_nr 57994] >> 0.017025 1 [cache_nr 57994] >> 0.011087 1 [cache_nr 57994] >> 0.015490 1 avg >> >> On my Windows source tree (450MB index), I'm seeing a >> savings of 0.6 seconds -- read_index() went from 1.2 to 0.6 >> seconds. > > Very satisfying. I assume that was with OpenSSL as the SHA-1 > implementation (sha1dc would have been much slower on 450MB, I think). > > -Peff >
Yes, this was with the OpenSSL SHA-1 code in a GfW build. I haven't played with the sha1dc code yet.
$ $/work/gh_gfw/t/helper/test-skip-verify-index.exe -c 5 1.276485 0 [cache_nr 3077831] 1.261164 0 [cache_nr 3077831] 1.256012 0 [cache_nr 3077831] 1.261411 0 [cache_nr 3077831] 1.266174 0 [cache_nr 3077831] 1.264249 0 avg 0.672057 1 [cache_nr 3077831] 0.666968 1 [cache_nr 3077831] 0.668725 1 [cache_nr 3077831] 0.675879 1 [cache_nr 3077831] 0.670213 1 [cache_nr 3077831] 0.670768 1 avg
Jeff