[Opendnssec-develop] code review needed: KsmParameterCollectionCache()
Jerry Lundström
jerry at opendnssec.org
Mon May 14 13:33:15 UTC 2012
Hi,
As me and Pawal have been testing 50.000 zones I noticed that KsmParameterCollection() gets called a lot in do_communication(), for each zones processed it was called a few times and each time it did ~20 sql calls. Even if it will hit the SQL cache 99.9% of the time it still takes times to make the queries and send them, SQL backend need to parse them and so on.
This patch makes a cache of the latest KSM_PARCOLL fetched and will just memcpy() it if its the same policy fetch again. It reduces the load in the SQL backend and my tests shows some 20-30% performance gain.
Can someone else review the change and the surrounding code before I commit it? And if you don't like the change please comment.
http://svn.opendnssec.org/home/jerry/opendnssec-1.3.8-ksmparametercollectioncache.diff
/Jerry
--
Jerry Lundström - OpenDNSSEC Developer
http://www.opendnssec.org/
More information about the Opendnssec-develop
mailing list