trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <zw...@apache.org>
Subject Re: HostDB sizing
Date Tue, 05 Jun 2012 06:09:27 GMT
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


Mime
View raw message