improve pdnsd performace
This commit is contained in:
parent
4aaf8e3c62
commit
d3ab7d4cf5
@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SSR Pro
|
|||||||
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +shadowsocks-libev-ss-redir +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full
|
LUCI_DEPENDS:=+iptables-mod-tproxy +kmod-ipt-tproxy +ip +ipset-lists +shadowsocksr-libev-alt +shadowsocks-libev-ss-redir +pdnsd-alt +coreutils +coreutils-base64 +coreutils-nohup +dnsmasq-full
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
PKG_VERSION:=2
|
PKG_VERSION:=2
|
||||||
PKG_RELEASE:=28
|
PKG_RELEASE:=29
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
@ -217,13 +217,13 @@ start_pdnsd()
|
|||||||
|
|
||||||
mkdir -p /var/etc /var/pdnsd
|
mkdir -p /var/etc /var/pdnsd
|
||||||
if ! test -f "/var/pdnsd/pdnsd.cache"; then
|
if ! test -f "/var/pdnsd/pdnsd.cache"; then
|
||||||
dd if=/dev/zero of="/var/pdnsd/pdnsd.cache" bs=1 count=4 2> /dev/null
|
echo -ne "pd13\000\000\000\000" >/var/pdnsd/pdnsd.cache
|
||||||
chown -R nobody.nogroup /var/pdnsd
|
chown -R nobody.nogroup /var/pdnsd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat > /var/etc/pdnsd.conf <<EOF
|
cat > /var/etc/pdnsd.conf <<EOF
|
||||||
global {
|
global {
|
||||||
perm_cache=10240;
|
perm_cache=1024;
|
||||||
cache_dir="/var/pdnsd";
|
cache_dir="/var/pdnsd";
|
||||||
pid_file = /var/run/pdnsd.pid;
|
pid_file = /var/run/pdnsd.pid;
|
||||||
run_as="nobody";
|
run_as="nobody";
|
||||||
@ -235,8 +235,8 @@ global {
|
|||||||
max_ttl=1w;
|
max_ttl=1w;
|
||||||
timeout=10;
|
timeout=10;
|
||||||
neg_domain_pol=on;
|
neg_domain_pol=on;
|
||||||
proc_limit=2;
|
proc_limit=40;
|
||||||
procq_limit=8;
|
procq_limit=60;
|
||||||
}
|
}
|
||||||
server {
|
server {
|
||||||
label= "fwxxx";
|
label= "fwxxx";
|
||||||
@ -265,7 +265,7 @@ stop_pdnsd()
|
|||||||
while iptables -t nat -D OUTPUT -p tcp --dport 53 -j pdnsd_output 2>/dev/null; do :; done
|
while iptables -t nat -D OUTPUT -p tcp --dport 53 -j pdnsd_output 2>/dev/null; do :; done
|
||||||
iptables -t nat -X pdnsd_output
|
iptables -t nat -X pdnsd_output
|
||||||
fi
|
fi
|
||||||
killall -9 pdnsd 2>/dev/null
|
kill $(cat /var/run/pdnsd.pid) >/dev/null 2>&1 || killall -9 pdnsd >/dev/null 2>&1
|
||||||
rm -rf /var/pdnsd
|
rm -rf /var/pdnsd
|
||||||
rm -f /var/etc/pdnsd.conf
|
rm -f /var/etc/pdnsd.conf
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user