Skip to content

Do SavedData IO Saving Async#9408

Closed
Cryptite wants to merge 9 commits into
PaperMC:masterfrom
Cryptite:asyncsaveddataio
Closed

Do SavedData IO Saving Async#9408
Cryptite wants to merge 9 commits into
PaperMC:masterfrom
Cryptite:asyncsaveddataio

Conversation

@Cryptite
Copy link
Copy Markdown
Contributor

@Cryptite Cryptite commented Jun 27, 2023

This work stems from a discovery of some fairly heavy main-thread IO writing going on with SavedData coming, at least in the below screenshot, from DimensionDataStorage saving:
image

We should be able to safely perform async IO writes of this data when doing typical incremental saves. There was some debate about which executor to use, so open to discussion on that and more.


Download the paperclip jar for this pull request: paper-9408.zip

@Cryptite Cryptite requested a review from a team as a code owner June 27, 2023 16:41
@Warriorrrr Warriorrrr added the publish-pr Enables a workflow to build Paperclip jars on the pull request. label Aug 13, 2023
@ghost
Copy link
Copy Markdown

ghost commented Nov 21, 2023

Been using this in production for over 3 months with 0 problems, saved data io and portal travel are 2 main natural causes of lag spikes (ticks over 250ms) from what I've seen (I have maps disabled lol).
This patch is great as its a simple fix with large benefit.

@electronicboy
Copy link
Copy Markdown
Member

I'm still in a general conflict with this sorta thing, the lack of means to ensure that we get behind all data saves is generally a nuisance, while 99.999999999999...% of the time this is not going to cause issues, there is still a small technical risk of mangling the data on the disk

uses a thread per dim store, this is not ideal but generally not a huge risk, maybe we could handle this
on the shared IO pool but it's generally not a big deal or likely worth the effort
@electronicboy
Copy link
Copy Markdown
Member

electronicboy@4e672d5

Not 100% on it, but I generally feel that that would be more closer to making me happy here

@MinecraftCitiesNetwork
Copy link
Copy Markdown

electronicboy@4e672d5

Not 100% on it, but I generally feel that that would be more closer to making me happy here

We've just started using this patch to solve an issue we reported in #paper-help, world saving no longer lags for us! :)

@StKillReal
Copy link
Copy Markdown

I've been trying to fix world save lag spikes for a month. This patch fixed the issue, thanks

kashike referenced this pull request in pufferfish-gg/Pufferfish Jan 15, 2024
@Warriorrrr
Copy link
Copy Markdown
Member

Closing in favour of #10171 which should be getting merged soon, thank you for your contribution!

@Warriorrrr Warriorrrr closed this Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

publish-pr Enables a workflow to build Paperclip jars on the pull request.

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

5 participants