-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persistence: Slow reading of big snapshots #3422
Comments
Thanks for reporting this! And yep, we can send in a PR to https://github.com/akkadotnet/Akka.Persistence.SqlServer to get that fixed. |
Although actually, that might be an issue with the |
I can do it, but it may take me some time (I'm still working on other stuff). I think, it's something that could be even picked up as first contribution. Essentially most of the changes could be closed inside Akka.Persistence.Sql.Common project. IMO sequential access should be a configurable setting (example path: AbstractQueryExecutor.SelectSnapshotAsync is the place for applying command behavior. Probably an additional parameter will be necessary. Also this change most probably will hit all existing Sql providers in terms of backward compatibility. |
@TietoOliverKurowski, would you be interested in contributing this change? Otherwise one of us on the @akkadotnet/core team can pick it up. |
Yes, I want to give it a try. By end of next Friday I should have something working. |
…s can use Sequential access, which improves reading speed for large payloads. (#3429) - Added for Snapshot query - Added for journal queries This change is not backwards compatible
We are seeing very slow performance when reading big snapshots on SQL Server.
Snapshots of some of your actors are in the range of over 100MB. Reading that snapshot takes around 15 minutes and causes 30% CPU usage.
I traced the issue down to the way the data reader is created:
using (var reader = await command.ExecuteReaderAsync(cancellationToken))
when I use the option
CommandBehavior.SequentialAccess
reading only takes around 2 seconds and no CPU usage.Would it be possible to add that parameter?
In parallel I'm working in getting the snapshot smaller.
The text was updated successfully, but these errors were encountered: