Netdata Community

Recommended setting of "page cache size" for dbengine?


I’d like to use Netdata for historic data and found the article below about dbengine:

The provided calculator indicates I need 211MiB per day for “dbengine multihost disk space”, however the value seems to depend on “page cache size”. There is no recommendation on “page cache size” except for the default value is 32MiB. I’d like to ask how do I know what to set for “page cache size” if I’d like to store past 30 days metrics in Netdata? Thank you!

It is true the page cache size is not related to data retention. The page cache holds data pages so that queries (performed by the dashboard, alarms etc) find the necessary information in memory as those data pages are not longer needed they are removed (evicted) from the page cache.

Depending on the number of metrics you are collecting, you may want to increase that if your workload (usage of the dashboard puts pressure on the database engine)

Go to the dashboard under Netdata Monitoring → dbengine and look for Netdata dbengine page cache statistics (netdata.page_cache_stats)

If during a normal workload and usage of your agent (browsing the dashboard etc), you see frequent sudden spikes in the evictions dimension then you can increase the page cache size.

Note that evictions will always happen as the page cache will eventually get full and pages that haven’t been used (LRU) will be removed.

1 Like

Hi Stelios, thanks a lot for the detailed reply. In my setup I’m collecting 3235 metrics and I have “page cache size” set to 128. I only started to use Netdata since 2 days ago, and I don’t see any spike in netdata.page_cache_stats). So I assume 128 is good and potentially I can even reduce it, right?

Yes, you should be fine with the default of 32

Thanks have now changed to 64MB still no spikes :slight_smile: