Pihole database - is it memory resident?

#1

I’m curious to know if the pihole database is memory resident. If it isn’t by default, I’d like to know how to make it so.

I’m keen to have response time as fast as possible, and I’m not concerned by the amount of memory used.

#2

Which database are you referring to? There is a long term database at /etc/pihole/pihole-FTL.db. This contains up to 365 days of data, and some of this is in memory between writes to the database (every minute).

When Pi-Hole launches, the previous 24 hours of query data is read from this file to populate the graphs and statistics on the web GUI.

The gravity list (master list of blocked domains) is also kept in memory during use, as is the Pi-Hole cache.

Having the entire pihole database in memory will not speed up the response, as this is mostly older data not actively required to run Pi-Hole.

#3

Thank you for that - it is most useful!