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 over 1 year 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 over 1 year ago
- Status changed from Pending RTI to Closed
commit 4ac23efef166d029b8dda8f16179b1ab9a70c27a Author: Andy Fiddaman <firstname.lastname@example.org> Date: 2018-10-17T13:57:51.000Z 9891 libbe slow building snapshot list Reviewed by: Dominik Hassler <email@example.com> Reviewed by: Garrett D'Amore <firstname.lastname@example.org> Reviewed by: Jim Klimov <email@example.com> Reviewed by: Dan McDonald <firstname.lastname@example.org> Approved by: Gordon Ross <email@example.com>