Bug 1010723 - [PERF] oo-accept-node should cache lscgroup output
Summary: [PERF] oo-accept-node should cache lscgroup output
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-22 19:19 UTC by Andy Grimm
Modified: 2016-11-08 03:47 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:30:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.