]> git.ipfire.org Git - thirdparty/squid.git/commit
Reduced startup time with large rock cache_dirs (#634)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Tue, 19 May 2020 17:01:40 +0000 (17:01 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 19 May 2020 17:14:17 +0000 (17:14 +0000)
commitf670688c6600e16bb68c1ac4b33b05747e3f422a
treebee190e42612a57b2039b3535369115ca2a45ad3
parent96356d4e45639dec302ebf95038d9b66f8d63baf
Reduced startup time with large rock cache_dirs (#634)

... addressing an old TODO.

Before scanning the disks to find the actual entries, the old rock
cache_dir initialization code had to populate its index as if all disk
slots were available and then remove all the added entries. Those two
wasteful operations took ~1.5 seconds for a 200GB disk before the
PageStack ABA bug was fixed in a586085. With the tree-based fix, that
time increased to ~15 seconds. The delay is completely gone now,
reducing the total index initialization time (for a 200GB disk) down to
a second.
src/MemStore.cc
src/fs/rock/RockSwapDir.cc
src/ipc/mem/PagePool.cc
src/ipc/mem/PageStack.cc
src/ipc/mem/PageStack.h