<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Jae,<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Feb 2019, at 11:39, Jae Sang Lee <<a href="mailto:hyangii@gmail.com" class="">hyangii@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div class="">Arne,<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I saw the messages like ''moving volume to trash"  in the cinder-volume logs and the peridic task also reports
<br class="">
</div>
<div class="">like "Deleted <vol-uuid> from trash for backend '<backends-name>'"</div>
<div class=""><br class="">
</div>
<div class="">The patch worked well when clearing a small number of volumes. This happens only when I am deleting a large
<br class="">
</div>
<div class="">number of volumes.<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Hmm, from cinder’s point of view, the deletion should be more or less instantaneous, so it should be able to “delete”</div>
<div>many more volumes before getting stuck.</div>
<div><br class="">
</div>
<div>The periodic task, however, will go through the volumes one by one, so if you delete many at the same time,</div>
<div>volumes may pile up in the trash (for some time) before the tasks gets round to delete them. This should not affect</div>
<div>c-vol, though.</div>
<div><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">I will try to adjust the number of thread pools by adjusting the environment variables with your advices<br class="">
</div>
<div dir="ltr" class="">
<div class=""><br class="">
</div>
<div class="">Do you know why the cinder-volume hang does not occur when create a volume, but only when delete a volume?<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Deleting a volume ties up a thread for the duration of the deletion (which is synchronous and can hence take very</div>
<div>long for ). If you have too many deletions going on at the same time, you run out of threads and c-vol will eventually</div>
<div>time out. FWIU, creation basically works the same way, but it is almost instantaneous, hence the risk of using up all</div>
<div>threads is simply lower (Gorka may correct me here :-).</div>
<div><br class="">
</div>
<div>Cheers,</div>
<div> Arne</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thanks.<br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">2019년 2월 11일 (월) 오후 6:14, Arne Wiebalck <<a href="mailto:Arne.Wiebalck@cern.ch" class="">Arne.Wiebalck@cern.ch</a>>님이 작성:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;" class="">Jae,
<div class=""><br class="">
</div>
<div class="">To make sure deferred deletion is properly working: when you delete individual large volumes</div>
<div class="">with data in them, do you see that</div>
<div class="">- the volume is fully “deleted" within a few seconds, ie. not staying in ‘deleting’ for a long time?</div>
<div class="">- that the volume shows up in trash (with “rbd trash ls”)?</div>
<div class="">- the periodic task reports it is deleting volumes from the trash?</div>
<div class=""><br class="">
</div>
<div class="">Another option to look at is “backend_native_threads_pool_size": this will increase the number</div>
<div class="">of threads to work on deleting volumes. It is independent from deferred deletion, but can also</div>
<div class="">help with situations where Cinder has more work to do than it can cope with at the moment.</div>
<div class=""><br class="">
</div>
<div class="">Cheers,</div>
<div class=""> Arne</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 11 Feb 2019, at 09:47, Jae Sang Lee <<a href="mailto:hyangii@gmail.com" target="_blank" class="">hyangii@gmail.com</a>> wrote:</div>
<br class="gmail-m_4954915783202618609Apple-interchange-newline">
<div class="">
<div dir="auto" class="">Yes, I added your code to pike release manually.
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class=""><br class="">
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="">2019년 2월 11일 (월) 오후 4:39에 Arne Wiebalck <<a href="mailto:Arne.Wiebalck@cern.ch" target="_blank" class="">Arne.Wiebalck@cern.ch</a>>님이 작성:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Jae,<br class="">
<br class="">
You back ported the deferred deletion patch to Pike?<br class="">
<br class="">
Cheers,<br class="">
 Arne<br class="">
<br class="">
> On 11 Feb 2019, at 07:54, Jae Sang Lee <<a href="mailto:hyangii@gmail.com" rel="noreferrer" target="_blank" class="">hyangii@gmail.com</a>> wrote:<br class="">
> <br class="">
> Hello,<br class="">
> <br class="">
> I recently ran a volume deletion test with deferred deletion enabled on the pike release.<br class="">
> <br class="">
> We experienced a cinder-volume hung when we were deleting a large amount of the volume in which the data was actually written(I make 15GB file in every volumes), and we thought deferred deletion would solve it.<br class="">
> <br class="">
> However, while deleting 200 volumes, after 50 volumes, the cinder-volume downed as before. In my opinion, the trash_move api does not seem to work properly when removing multiple volumes, just like remove api.<br class="">
> <br class="">
> If these test results are my fault, please let me know the correct test method.<br class="">
> <br class="">
<br class="">
--<br class="">
Arne Wiebalck<br class="">
CERN IT<br class="">
<br class="">
</blockquote>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">--<br class="">
Arne Wiebalck<br class="">
CERN IT </div>
<br class="">
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">--<br class="">
Arne Wiebalck<br class="">
CERN IT </div>
<br class="">
</body>
</html>