]> git.saurik.com Git - apt.git/commitdiff
Increase APT::Cache-HashTableSize default to 50503
authorJulian Andres Klode <jak@debian.org>
Sun, 3 Jan 2016 16:45:26 +0000 (17:45 +0100)
committerJulian Andres Klode <jak@debian.org>
Sun, 3 Jan 2016 16:56:49 +0000 (17:56 +0100)
This drop the hash table utilization from a high 98%
to acceptable 74% on unstable, and the average bucket length
from 4.6 to 1.8.

This improves performance by about 5%, while increasing
the size of the cache by 0.2 out of 38MB, that is 0.5%.

48481 is a nice number

apt-pkg/pkgcache.cc

index 4d8b9bc4172a7fec1ace37a03754176ffbc217df..3c7fac64217d7282643a2bbd4cf51223b68a916c 100644 (file)
@@ -94,7 +94,7 @@ pkgCache::Header::Header()
    VerSysName = 0;
    Architecture = 0;
    SetArchitectures(0);
-   SetHashTableSize(_config->FindI("APT::Cache-HashTableSize", 15013));
+   SetHashTableSize(_config->FindI("APT::Cache-HashTableSize", 50503));
    memset(Pools,0,sizeof(Pools));
 
    CacheFileSize = 0;