Client-side async delete is slow
Applies to
- ONTAP 9
- volume file async-delete
Issue
- A volume file async-delete from ONTAP is performed to delete the directory asynchronously.
- Performing it via the client via a async-delete via file move to the ONTAP trash bin is very slow compared to the ONTAP async delete:
[root@rhel1 ontap]# mv dir_to_delete_from_client/ ._ontaptrashbin
[root@rhel1 ontap]# ls -a
. .. .100_deleting_20240422_071730 dir_to_delete my_directory my_directory2
Note: you can not monitor client-side async-deletes via below commands, to monitor the progress of ONTAP draining the trashbin, you can monitor the trashbin directory usage client side and see it draining slowly over time (see Solution).
This is how server-side async-delete would be triggered and monitored instead using above client-side async-delete method:
This is how server-side async-delete would be triggered and monitored instead using above client-side async-delete method:
cluster1::*> vol file async-delete start -vserver svm1_cluster1 -volume test -path dir_to_delete/
[Job 488] Job is queued: Asynchronous directory delete job.
cluster1::*> vol file async-delete show
Vserver Volume Job ID Path Progress
(#Files #Dirs #Bytes
------------ ------------ -------- --------------- -------------------------
svm1_cluster1 test 0:6 /.100_deleting_20240422_071730 49 0 0
0:7 dir_to_delete/ 331 0 0
cluster1::*> vol file async-delete show
Vserver Volume Job ID Path Progress
(#Files #Dirs #Bytes
------------ ------------ -------- --------------- -------------------------
svm1_cluster1 test 0:6 /.100_deleting_20240422_071730 144 0 0