When restoring many backups, the backup service uses a lot of memory and
when we do many concurrent restores the backup service ends up getting
killed becase the system runs out of memory.
This patch reduces the ref count to the data as soon as possible to let
Python garbage collect it instead of hogging it for the whole chunk
restore.
Related-Bug: #1865011
Change-Id: I942d9d8b3976232ae1cf82b698fb27285fbef13a
(cherry picked from commit 69462315bc8416bd02ebd6085f0cfc141cfd8877)
(cherry picked from commit 94db15dd3b86c7da92ceaa4b8c2d948b2b30c65b)
(cherry picked from commit f4aa81424fff8718bd432cc5a7aae357fe028023)
Reviewed: https:/ /review. opendev. org/711481 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=20b6b7477da ae43907f38337ae f15a5f47a92283
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 20b6b7477daae43 907f38337aef15a 5f47a92283
Author: Gorka Eguileor <email address hidden>
Date: Thu Feb 27 14:04:13 2020 +0100
ChunkedBack upDriver: Freeing memory on restore
When restoring many backups, the backup service uses a lot of memory and
when we do many concurrent restores the backup service ends up getting
killed becase the system runs out of memory.
This patch reduces the ref count to the data as soon as possible to let
Python garbage collect it instead of hogging it for the whole chunk
restore.
Related-Bug: #1865011 2ae1cf82b698fb2 7285fbef13a d02ebd6085f0cfc 141cfd8877) a92ceaa4b8c2d94 8b2b30c65b) 8bd432cc5a7aae3 57fe028023)
Change-Id: I942d9d8b397623
(cherry picked from commit 69462315bc8416b
(cherry picked from commit 94db15dd3b86c7d
(cherry picked from commit f4aa81424fff871