-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
什麼狀況緩存紀錄會被踢掉?:serve-expired-ttl 0 #1729
Comments
理论上缓存会一直增长直到达到cache-size。但受内存可用空间影响,可能有更小的限制。实际使用中不会有那么多域名查询,一般不会达到上限。 |
https://pymumu.github.io/smartdns/configuration/ 這邊的敘述寫 0 表示停用超时 我以為是 serve-expired-ttl 無限大的意思。 |
代码有BUG,修改了 |
我测试了新版。跑了一天。设定 serve-expired-ttl 0 。cache好像还是没有持续膨胀。 |
还有一种可能 就是有大量域名只被查询了一次 有些系统或软件会发起很多不存在的域名来实现一些探测的目的 |
重新修改了一下 |
问题现象
每天離峰時段重啟時發現緩存只有100KB。但尖峰時段重啟時,看到緩存有2MB
請問在serve-expired-ttl 0的設置下,緩存會一直變大,大到我設置的cache-size值嗎?
有什麼設置是會把緩存的域名踢掉的嗎?
涉及的配置(注意去除个人相关信息)
rr-ttl-min 60
rr-ttl-max 3600
rr-ttl-reply-max 60
cache-size 20000
cache-persist yes
cache-file /tmp/smartdns.cache
cache-checkpoint-time 0
prefetch-domain yes
serve-expired yes
serve-expired-ttl 0
serve-expired-reply-ttl 2
serve-expired-prefetch-time 14400
The text was updated successfully, but these errors were encountered: