wmf_content.mediawiki_content_history_v1 is one of our biggest tables, containing all revisions for all wikis over all of wikitime.
On T383816: Calculate rough HDFS storage requirements for wmf_content.mediawiki_content_history_v1, we estimated the following sizes for respective Iceberg snapshot retention periods:
For wmf_content.mediawiki_content_history_v1 as it stands today:
retention period 7 days 30 days 60 days 90 days size in TBs 36.7 89.6 158.6 227.6 For wmf_content.mediawiki_content_history_v1, assuming merge-on-read enabled with weekly table maintenance:
retention period 7 days 30 days 60 days 90 days size in TBs 25.2 40.3 60.0 79.7
We have now fixed the blocker that prevented us from enabling merge-on-read, namely T391280: Modify table maintenance mechanism to support Iceberg's rewrite_position_delete_files(). Additionally, we now have wmf_content.mediawiki_content_current_v1 close to production. This is a much smaller table, but it does have merge-on-read enabled and it is WAD.
Thus, in this task we want to:
- Enable merge-on-read on wmf_content.mediawiki_content_history_v1.
- Add rewrite_position_delete_files() table maintenance to the above.
- Monitor the performance of all writes, see if we eliminate the number one write latency issue: skewed data on the last shuffle when writing to the table via MERGE INTO. The skew should be eliminated when doing merge-on-read, since we no longer need to rewrite existing files, and we expect to win ~6 hours back, making the job go from ~7.6h - ~6h = 1.6 h, a 475% runtime performance increase.
- Monitor down stream wmf_content.mediawiki_content_current_v1, which consumes the history table daily, for perf regressions.