Skip to content

Commit

Permalink
lxd/storage/backend_lxd: Lower qemu-img convert priority instead of l…
Browse files Browse the repository at this point in the history
…imiting CPU time

Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Jul 19, 2024
1 parent 6fcc631 commit 8355390
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lxd/storage/backend_lxd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1826,8 +1826,8 @@ func (b *lxdBackend) imageConversionFiller(imgPath string, imgFormat string) fun

// Convert uploaded image from backups directory into RAW format on the instance volume.
cmd := []string{
// Use prlimit to limit QEMU to 1 GiB address space and 120 seconds of CPU time.
"prlimit", "--cpu=120", "--as=1073741824",
// Run with low priority to reduce CPU impact on other processes.
"nice", "-n19",
"qemu-img", "convert", "-f", imgFormat, "-O", "raw", imgPath, diskPath,
}

Expand Down

0 comments on commit 8355390

Please sign in to comment.