cURL / Mailing Lists / curl-library / Single Mail

curl-library

DNS cache size control

From: Jacky Lam <sylam_at_emsoftltd.com>
Date: Wed, 17 Apr 2002 13:17:57 +0800

        Is it possible to add some control on DNS cache size? Especially, the global
one? I use global size and run through 150 websites and fnd that the dns
cache size grow to more than 6M!!! There are two reasons:
        i) Libcurl won't remove some old expired dns cache
        ii) Libcurl will alloc 9000bytes to hold dns answer. However, normally, it
just use 500-600bytes. (on Linux with gethostbyname_r).

        I solve the second problem by using an adaptive buffer size which reduce the
dns cache size to 1/10 of the original. For the first problem, I can only
destroy all handles and call global_cleanup. Is there any alternative?

Jacky
Received on 2002-04-17