-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
scylla_swap_setup: run error check before allocating swap and increase swap allocation speed #12668
Conversation
CI state |
I changed my mind, |
4546b92
to
19ec02a
Compare
We should run error check before running dd, otherwise it will left swapfile on disk without completing swap setup. Signed-off-by: Takuya ASADA <syuu@scylladb.com>
We stop using fallocate for allocating swap since it does not work on xfs (scylladb#6650). However, dd is much slower than fallocate since it filling data on the file, let's use fallocate when filesystem is ext4 since it actually works and faster. Signed-off-by: Takuya ASADA <syuu@scylladb.com>
19ec02a
to
ea61b14
Compare
Rebased, dropped |
CI state |
CI state |
ping |
@avikivity ping |
8896be2
to
d450a14
Compare
@avikivity ping, we want this for Azure machine-image |
|
||
swapunit_bn = out('systemd-escape -p --suffix=swap {}'.format(swapfile)) | ||
swapunit = Path('/etc/systemd/system/{}'.format(swapunit_bn)) | ||
if not args.overwrite_unit_file and swapunit.exists(): |
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.
There is no overwrite_unit_file
arg
@avikivity please dequeue (It fails scylla installation - #16331) |
This patch fixes error check and speed up swap allocation.
Following patches are included:
avoid create swapfile before running error check
this inclease swap allocation speed on ext4