MongoDB WiredTiger compression stats
What does "page written failed to compress" indicate?


WiredTiger's general strategy is to only compress pages on-disk where there is a storage benefit.

The "page written failed to compress" counter is incremented when compression was attempted but didn't result in an on-disk storage saving (so a page was stored uncompressed).

Another metric for pages that are stored uncompressed is "page written was too small to compress". In this case, the size of a page was considered too small to attempt compression.

The commonly expected case is that pages can be stored compressed, which increments the "compressed pages written" metric.


  Is it an error I should be concerned about with regards to data integrity and why does it happen?


These storage metrics are informational counters and expected behaviour (i.e. unrelated to data integrity).

There isn't any obvious actionable outcome based on these metrics, but if a collection wasn't getting much overall benefit from compression the counters might provide insight into how often pages aren't compressed (as compared to compressible pages that don't have a significant level of compression).