Skip to content
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

Temporarily increase write performance while relaxing transaction durability for Hour of Code #43836

Merged
merged 1 commit into from
Dec 1, 2021

Conversation

sureshc
Copy link
Contributor

@sureshc sureshc commented Nov 30, 2021

After reviewing detailed production database metrics with the AWS Aurora engineer who will be on standby for the Hour of Code, it appears we have less head room on the production database than we typically would on the scaled up instance types (db.r5.16xlarge). Temporarily configure the dynamic (no db restart required) setting innodb_flush_log_at_trx_commit to 0:

https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit

Controls the balance between strict ACID compliance for commit operations and higher performance that is possible when commit-related I/O operations are rearranged and done in batches. You can achieve better performance by changing the default value but then you can lose transactions in a crash.

* The default setting of 1 is required for full ACID compliance. Logs are written and flushed to disk at each transaction commit.

* With a setting of 0, logs are written and flushed to disk once per second. Transactions for which logs have not been flushed can be lost in a crash.

We ran with the value set to 0 for several years and only switched to 1 (full ACID compliance) in June 2021 because we felt that Aurora performance was excellent.

Links

Testing story

$ export AWS_PROFILE=codeorg-admin
$ bin/aws_access
AWS access: GoogleSignInAdmin/suresh@code.org

Pending update for stack `DATA-production`:
Modify AuroraClusterDBParameters [AWS::RDS::DBClusterParameterGroup] Properties (Parameters)
Modify AuroraReportingClusterDBParameters [AWS::RDS::DBClusterParameterGroup] Properties (Parameters)

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@sureshc sureshc requested a review from a team November 30, 2021 17:00
@sureshc sureshc merged commit 7fdf415 into staging Dec 1, 2021
@sureshc sureshc deleted the temporarily-improve-write-latency branch December 1, 2021 00:57
snickell pushed a commit that referenced this pull request Feb 3, 2024
…-latency

Temporarily increase write performance while relaxing transaction durability for Hour of Code
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.

None yet

1 participant