Skip to content

Use write-ahead log for RepositoryContent.#943

Merged
timbru merged 14 commits intoprep-0.12.0-rc1from
write-ahead
Oct 13, 2022
Merged

Use write-ahead log for RepositoryContent.#943
timbru merged 14 commits intoprep-0.12.0-rc1from
write-ahead

Conversation

@timbru
Copy link
Contributor

@timbru timbru commented Sep 27, 2022

[draft] reviewing allowed, but can wait for the following:

Will deploy to benchmark environment to test upgrade and effect.
Still need to update the developer docs.

Tim Bruijnzeels added 6 commits September 21, 2022 16:40
@timbru timbru requested a review from ximon18 September 27, 2022 14:37
@timbru timbru marked this pull request as draft September 27, 2022 14:38
@timbru
Copy link
Contributor Author

timbru commented Sep 28, 2022

Deployed to benchmarking VM with 5000 CAs with 10 ROAs each.

The system is responsive and CPU load is low, except for when publication happens. With the additional log messages added we can see that this is due to updating the RRDP state and writing new RRDP files for every update.

This should be solved when #693 is implemented. That will allow us to defer RRDP updates and include multiple publisher deltas in one. Furthermore, this will mean that the RRDP are not blocking publisher.

The RRDP update process itself can also be optimised more. Currently it's creating the snapshot XML twice (and for a 280 MB XML file this is what's blocking the system). Once to get the hash to include in the notification, and once to write the actual file. We may want to optimise this, and perhaps use the RRDP support from rpki-rs rather than the older RRDP XML support in krill itself.

@timbru
Copy link
Contributor Author

timbru commented Sep 29, 2022

This needs more work - it's currently saving the entire new snapshot in an RrdpUpdate change. This naive implementation ends up using way too much data. So, will change this and only then mark this for review. The CPU usage seems quite improved at least.

Tim Bruijnzeels and others added 2 commits September 30, 2022 17:09
@timbru timbru marked this pull request as ready for review October 3, 2022 09:58
@timbru
Copy link
Contributor Author

timbru commented Oct 4, 2022

The deltas are now much smaller. Overall performance is still not good enough because creating new RRDP snapshots is still too expensive and happens too often. This will be fixed in a separate PR for issue #693.

This should be good to merge now, unless other issues are raised during review of course.

@timbru timbru mentioned this pull request Oct 10, 2022
@timbru timbru linked an issue Oct 10, 2022 that may be closed by this pull request
@timbru timbru merged commit a29651f into prep-0.12.0-rc1 Oct 13, 2022
@timbru timbru deleted the write-ahead branch October 13, 2022 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve speed for RepositoryContent state persistence

2 participants