1

I notice that the metric maxwritten_clean in the table pg_stat_bgwriter increases (for example going from 0 to 1000 in several seconds). I guess this is understandable as it happens while there are some spikes of writes in the database. According to the documentation, this behavior is driven by the parameter bgwriter_lru_maxpages but I can't find any recommendations/best practices on how to set this parameter.

Therefore, I've several questions:

  1. Is it bad to see this counter increasing?
  2. Do you have any ratio to share to have some kind of alerting on it?
  3. Is it a good idea to update the parameter bgwriter_lru_maxpages in order to reduce the number of occurrences of maxwritten_clean?

Thanks a lot for your help,

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.