Bug #9885: zoneadm takes ages to do something on a system with many snapshots
libbe slow building snapshot list
libbe iterates ZFS snapshots and then builds a snapshot list in the callback function. On every callback, it traverses its list of snapshots in order to find the end of the list so that the new entry can be appended - with many snapshots, this slow.
Updated by Andy Fiddaman almost 3 years ago
Testing a fix:
Before on a system with many snapshots,
time beadm list
real 48.6 user 4.7 sys 43.8 real 44.6 user 4.5 sys 40.1 real 45.5 user 4.4 sys 41.0 real 44.4 user 4.5 sys 39.8
After, user time is consistently less.
real 42.6 user 2.9 sys 39.7 real 41.4 user 3.0 sys 38.3 real 40.6 user 3.1 sys 37.4 real 41.5 user 2.8 sys 38.5
Updated by Electric Monk almost 3 years ago
- Status changed from Pending RTI to Closed
commit 4ac23efef166d029b8dda8f16179b1ab9a70c27a Author: Andy Fiddaman <email@example.com> Date: 2018-10-17T13:57:51.000Z 9891 libbe slow building snapshot list Reviewed by: Dominik Hassler <firstname.lastname@example.org> Reviewed by: Garrett D'Amore <email@example.com> Reviewed by: Jim Klimov <firstname.lastname@example.org> Reviewed by: Dan McDonald <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>