Skip to content

Memory footprint of DNS cache & prefetch - How much RAM for e.g. 10,000 entries? #1425

Closed Answered by kwitsch
gspannu asked this question in Q&A
Discussion options

You must be logged in to vote

"plain text" is really misleading regarding DNS messages. 😅

It is stored as struct without the OPT section.
For prefetching purposes there are some additional values per cache entry and some additional overhead from the beginning (prefetching logic doesn't increase its footprint for additional cache entries).

The entries aren't compressed since the initial overhead is low and it would increase response times.

But then again your question is hard to answer since DNS messages differ in size and you don't specify what messages are stored(1 to 1 or 1 to n mapping, additional section,...).

If you want to calculate a really rough estimate use: MaxUdpSize * 2 * CacheEntryCount

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@gspannu
Comment options

@t-e-s-tweb
Comment options

@gspannu
Comment options

@kwitsch
Comment options

Answer selected by gspannu
@gspannu
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants