[syslog-ng] [patch] only stat dns_cache_hosts file once in a second
ILLES, Marton
illes.marton at balabit.hu
Wed Feb 25 23:32:38 CET 2009
Hi,
I was doing today some performance tests where use_dns(yes) and
persistent dns cache (dns_cache_hosts) were configured and I got awful
results. When I disabled dns_cache_hosts the message rate doubled. After
a quick check I realized that for every message a dns cache lookup was
performed which stat()-ed my dns_cache_hosts file. However it does not
make much sense to check the file for modification so often, I guess
once a second is enough most of the cases.
In my test configuration I received msgs over syslog() source and sent
to an empty destination. The server was a 2way quad-core 1.9GHz Opteron
box running 32bit syslog-ng and messsages were generated with loggen.
>From an average 80,000-90,000 msg/s using the fix I could do
220,000-230,000 msg/s. Interesting that on my laptop (dual-core 2.4GHz
Intel 64bit) the performance gain was smaller from 90,000 to 100,000
msg/s. I am still wondering about this big difference, specially because
my laptop has higher frequency CPU...
Anyhow the patch could be found in my git repo, Bazsi please apply.
git://git.balabit.hu/marci/syslog-ng-3.0.git
M
--
Key fingerprint = F78C 25CA 5F88 6FAF EA21 779D 3279 9F9E 1155 670D
More information about the syslog-ng
mailing list