[Unbound-users] Improve avg response times
vinay3 at justemail.net
vinay3 at justemail.net
Sat Jul 7 18:55:28 UTC 2012
I tried using a prefetch trigger at 90% instead of 10% (intentionally
inefficient) and a cache-min-ttl of 5400 so that an hourly scan is
guaranteed to find a cached entry from the last scan and will also reset
it's TTL back to 5400 by forcing a new iteration.
If I do a new namebench run, I still get a 150ms+ avg response time and I
see several responses that have a TTL of 5400 meaning they were cachemisses.
blogx.sina.com.cn. -> 220.127.116.11
youtube-ui.l.google.com. -> 18.104.22.168, 22.214.171.124, 126.96.36.199,
188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168, 22.214.171.124,
126.96.36.199, 188.8.131.52, 184.108.40.206
www154.mywebsearch.com. -> 220.127.116.11
18.104.22.168, 22.214.171.124, 126.96.36.199, 188.8.131.52,
So this is appearing like unexpected behavior to me: If www.utorrent.com was
scanned less than an hour ago and was supposed to be cached for 5400
seconds, why would a random scan like the one above find it flushed out of
the cache (5400 TTL) and requiring an iteration (203.9 msecs response time)?
From: 1phon3apps at googlegroups.com [mailto:1phon3apps at googlegroups.com] On
Behalf Of vinay3 at justemail.net
Sent: Friday, July 06, 2012 11:24 PM
To: unbound-users at unbound.net
Subject: Improve avg response times
I am using an amazon large EC2 instance (4ECUs, 2 cores) for my unbound
configured as below. I am seeing a 150ms+ average response time as reported
by namebench Alexa 2K result. In order to reduce my lookup times, I am
running an hourly scan of these 35K sites (from namebench dat files) in
order to give my clients a cached response whenever possible. On average, my
cachemiss rate is 6% as shown below. My cache-ttl-min is 1 hour so these
entries should be cached at all times. The cachemisses I am guessing are
from sites my pythonmod looks up and responds to in a special way:
6.5Mbytes of free RAM
#disable chroot as it caused several issues with python's PYTHONHOME
# set to num of cores or cpus
#2X outgoing range
# sudo sysctl -w net.core.rmem_max=8388608
access-control: 0.0.0.0/0 allow
module-config: "python iterator"
Even with this setup, I am seeing most of the domains return a TTL of 3600
at the start of a random namebench which means they were iterated/recursed
over instead of looked up from cache. This is causing a 150ms+ average
response times for these 35K sites. It's the exact same 35K sites being
scanned by namebench - why aren't these looked up from the cache instead of
being iterated over? Are these sites not cached for a full 3600 seconds?
With prefetch, cache-min-ttl of 1hour, why isn't an hourly scan of these 35K
sites populating my cache and giving me a <50ms response time on average?
With the same setup, if I take 500 sites and run namebench back to back for
these fixed 500 sites, my average response time starts approaching 40-50ms
which is where I am trying to be with the 35K sites.
Where am I going wrong and how can debug and fix this issue?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Unbound-users