Bug 1010723

Summary: [PERF] oo-accept-node should cache lscgroup output
Product: OpenShift Online Reporter: Andy Grimm <agrimm>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: chunchen, jgoulding
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-17 13:30:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andy Grimm 2013-09-22 19:19:08 UTC
Description of problem:

On systems with a large number of users, oo-accept-node can take several minutes to run.  The longest operation is check_users, where there is one invocation of lscgroup per user.  It's possible to run lscgroup once and cache the results instead.  In my testing on a node with 2500 users, this cut the runtime of oo-accept-node from 2:30 to 1:15.  On systems with more users, the difference will be much more pronounced.


Version-Release number of selected component (if applicable):

openshift-origin-node-util-1.14.3-1.el6oso.noarch

Comment 2 openshift-github-bot 2013-09-25 19:18:16 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/48600f86f81678d52b950860af9dfc6af1fc644d
Bug 1010723 - Only run lscgroup once for check_users

https://bugzilla.redhat.com/show_bug.cgi?id=1010723

Running lscgroup once per user gets expensive, so run it once and
cache the results.  This is also more in line with how quota info
and other data is gathered in oo-accept-node.

Comment 3 chunchen 2013-09-27 01:56:25 UTC
It's fixed, verified on devenv_3831, please refer to the following results:

1. Create 800 apps on devenv instance
2. SSH into the instance and run "time oo-accept-node" at first time
3. run " time oo-accept-node" again

at step 2: the runtime is 1:02
at step 3: the runtime is 0:28