Project

General

Profile

Bug #9891

Bug #9885: zoneadm takes ages to do something on a system with many snapshots

libbe slow building snapshot list

Added by Andy Fiddaman over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-10-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

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.

History

#1

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
#3

Updated by Andy Fiddaman over 1 year ago

  • Status changed from New to Pending RTI
  • % Done changed from 60 to 100
#4

Updated by Electric Monk over 1 year ago

  • Status changed from Pending RTI to Closed

git commit 4ac23efef166d029b8dda8f16179b1ab9a70c27a

commit  4ac23efef166d029b8dda8f16179b1ab9a70c27a
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2018-10-17T13:57:51.000Z

    9891 libbe slow building snapshot list
    Reviewed by: Dominik Hassler <hadfl@omniosce.org>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Jim Klimov <jim@cos.ru>
    Reviewed by: Dan McDonald <danmcd@joyent.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Also available in: Atom PDF