Adding or removing an ACL in AFE is very slow |
|||
Issue description
Example code:
>>> afe = frontend.AFE()
>>> hosts = afe.get_hosts(["chromeos4-row1-rack3-host7"])
>>> host = hosts[0]
>>> now = datetime.datetime.now()
>>> host.remove_acl("performance")
Removing ACL performance from host chromeos4-row1-rack3-host7
acl_time = datetime.datetime.now() - now
print "Timing: remove_acl %d secs" % acl_time.total_seconds()
>>> acl_time = datetime.datetime.now() - now
>>> print "Timing: remove_acl %d secs" % acl_time.total_seconds()
Timing: remove_acl 223 secs
Most operations take 1 or 2 seconds.
In a chat with Dan seems like there could be some DB optimizations to improve performance.
,
Jun 13 2016
I can still reproduce the issue:
>>> afe = frontend.AFE()
>>> hosts = afe.get_hosts(["chromeos4-row2-rack9-host19"])
>>> host = hosts[0]
>>> now = datetime.datetime.now()
>>> host.add_acl("performance")
Adding ACL performance to host chromeos4-row2-rack9-host19
acl_time = datetime.datetime.now() - now
print "Timing: remove_acl %d secs" % acl_time.total_seconds()
>>> acl_time = datetime.datetime.now() - now
>>> print "Timing: remove_acl %d secs" % acl_time.total_seconds()
Timing: remove_acl 231 secs
,
Jun 21 2016
+dshi any idea why this might be slow? what sort of query / code path are we following?
,
Jul 19 2016
Can't reproduce it now. Maybe some db load issue?
,
Jun 13 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by autumn@chromium.org
, Jun 13 2016