You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by David Carlin <dc...@yahoo-inc.com> on 2012/06/04 22:29:01 UTC

HostDB sizing

Is there a good rule of thumb for how to set
proxy.config.hostdb.storage_size as you increase the value of
proxy.config.hostdb.size?

It used to be that for values of proxy.config.hostdb.size above 200,000
you increase the storage_size variable by at least 44 bytes per entry.
However, I thought I read on IRC a few weeks back that this is no longer
the case as the data structure has changed.


Re: HostDB sizing

Posted by Leif Hedstrom <zw...@apache.org>.
On 6/4/12 2:29 PM, David Carlin wrote:
> Is there a good rule of thumb for how to set
> proxy.config.hostdb.storage_size as you increase the value of
> proxy.config.hostdb.size?
>
> It used to be that for values of proxy.config.hostdb.size above 200,000
> you increase the storage_size variable by at least 44 bytes per entry.
> However, I thought I read on IRC a few weeks back that this is no longer
> the case as the data structure has changed.
>
I believe the code here is a wild guess at best, but we have

   virtual size_t estimated_heap_bytes_per_entry() const { return 
sizeof(HostDBInfo) * 2; }


I seem to have changed that some time ago (3e1a81ab). :) In any case, 
that would be

(gdb) print sizeof(HostDBInfo)
$1 = 80


There's also some overhead for other stuff, so, ~200 bytes / seems 
plausible. I believe the 44 bytes -> 80 bytes is the change to IPv6. 
Maybe the multiplier of 2x is overly pessimistic, I honestly don't know 
:-/. This code needs to be rewritten anyways.

Cheers,

-- Leif