-
Notifications
You must be signed in to change notification settings - Fork 70
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
devel: Speed up leapp database writes by disabling synchronization #732
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
fd72ec7
to
a2cfa06
Compare
This patch introduces an optimization of the database access when the LEAPP_DEVEL_DATABASE_SYNC_OFF environment variable is set. This causes to write to the database up to 20 times faster than normal, depending on the underlying hard drive and file system. I managed to increase the speed leapp preupgrade from 9 minutes 7 seconds to 26 seconds. However this feature comes at the cost of risking database corruption, in case of powerloss or OS crashes. According to the SQLite documentation, application crashes are safe. Since this option poses a potential risk, it is deemed for now a development option only and will help to speed up our CI systems.
a2cfa06
to
09b3856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
/rerun |
Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/2831780 |
Testing Farm request for tmt test was created. Once finished, results should be available here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love it. and so far, it still works. as it is covered by a "LEAPP_DEVEL_*" envar, it's safe to merge it. We will document additional envars soon, so merging it even when it's still not documented.
Tested on vms from 1MT - 40-50% speedup.
Env var set:
|
## Packaging - Drop the dependency on leapp-repository for Fedora and RHEL 8+ (oamg#717) - Provide builds for RHEL 7+ and Fedora (oamg#717) - Drop automatically generated Python dependences on RHEL 8+ and Fedora systems (oamg#717, oamg#716) - Bump the provided leapp-framework capability to 2.0 (oamg#700) ## Framework ### Fixes - models: Do not make references to private symbols (oamg#718) ### Enhancements - Introduce the LEAPP_DEVEL_DATABASE_SYNC_OFF envar to enable speed up writes into the leapp database by disabling synchronisation - only for development / testing purposes (oamg#732) ## Leapp ### Fixes - Fix print of the leapp help msg for Python 3.6+ (oamg#731) ### Enhancements - The leapp commands are now defined/provided by leapp-repositories; leapp discovers the specified commands automatically (oamg#700) - Add CLI support for `choices` and `default` for options of leapp commands (oamg#734) ## Modifications - Makefile: Added the `fast_lint` target to apply linters just on files different from master (oamg#733)
## Packaging - Drop the dependency on leapp-repository for Fedora and RHEL 8+ (oamg#717) - Provide builds for RHEL 7+ and Fedora (oamg#717) - Drop automatically generated Python dependences on RHEL 8+ and Fedora systems (oamg#717, oamg#716) - Bump the provided leapp-framework capability to 2.0 (oamg#700) ## Framework ### Fixes - models: Do not make references to private symbols (oamg#718) ### Enhancements - Introduce the LEAPP_DEVEL_DATABASE_SYNC_OFF envar to enable speed up writes into the leapp database by disabling synchronisation - only for development / testing purposes (oamg#732) ## Leapp ### Fixes - Fix print of the leapp help msg for Python 3.6+ (oamg#731) ### Enhancements - The leapp commands are now defined/provided by leapp-repositories; leapp discovers the specified commands automatically (oamg#700) - Add CLI support for `choices` and `default` for options of leapp commands (oamg#734) ## Modifications - Makefile: Added the `fast_lint` target to apply linters just on files different from master (oamg#733)
## Packaging - Drop the dependency on leapp-repository for Fedora and RHEL 8+ (#717) - Provide builds for RHEL 7+ and Fedora (#717) - Drop automatically generated Python dependences on RHEL 8+ and Fedora systems (#717, #716) - Bump the provided leapp-framework capability to 2.0 (#700) ## Framework ### Fixes - models: Do not make references to private symbols (#718) ### Enhancements - Introduce the LEAPP_DEVEL_DATABASE_SYNC_OFF envar to enable speed up writes into the leapp database by disabling synchronisation - only for development / testing purposes (#732) ## Leapp ### Fixes - Fix print of the leapp help msg for Python 3.6+ (#731) ### Enhancements - The leapp commands are now defined/provided by leapp-repositories; leapp discovers the specified commands automatically (#700) - Add CLI support for `choices` and `default` for options of leapp commands (#734) ## Modifications - Makefile: Added the `fast_lint` target to apply linters just on files different from master (#733)
You saved my day, TY. Without this improvment, after 15 min, the |
in PPC64LE system leapp upgrade took around 2 hrs 30 mins
|
@anandanramadoss Hi, in case you still see the problem, report please new issue with all required information inside the template. But first, please ensure you have installed up-to-date versions of leapp & leapp-repository (leapp-upgrade-*) packages and that you have set the expected devel envars. As well, if you test with the current upstream builds (leapp 0.14.0; leapp-repository-0.16.0) the behaviour should be default for the phases until the first reboot. |
This patch introduces an optimization of the database access when the
LEAPP_DEVEL_DATABASE_SYNC_OFF environment variable is set.
This causes to write to the database up to 20 times faster than normal,
depending on the underlying hard drive and file system.
I managed to increase the speed leapp preupgrade from 9 minutes 7
seconds to 26 seconds.
However this feature comes at the cost of risking database corruption,
in case of powerloss or OS crashes. According to the SQLite
documentation, application crashes are safe.
Since this option poses a potential risk, it is deemed for now
a development option only and will help to speed up our CI systems.