Bug 1010461 - nodejs supervisor poll interval is too short
nodejs supervisor poll interval is too short
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-20 16:04 EDT by Andy Grimm
Modified: 2016-11-07 22:47 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:30:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andy Grimm 2013-09-20 16:04:20 EDT
Description of problem:

The default poll interval in versions of node.js supervisor prior to 0.5.3 is known to be too short and cause performance issues.  nodejs010 SCL contains 0.5.2, and nodejs 0.6 has an even older version.  There is a "-p" option to change the interval.  "-p 1000" (or higher) is recommended.

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

openshift-origin-cartridge-nodejs-1.15.7-1.el6oso.noarch

How reproducible:

Always

Steps to Reproduce:
1. Create a node.js app on Openshift with lots of js files in the repo.
2. Start the app
3. Watch supervisor eat CPU

Actual results:

Unacceptable CPU usage

Expected results:

Reasonably low overhead

Additional info:

strace showed over 1000 futex calls per second in an app with a couple thousand files.

Upstream issue:

https://github.com/isaacs/node-supervisor/issues/71
Comment 1 openshift-github-bot 2013-09-25 02:20:14 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/038acedd8ca9c1c4b93fd45ad5f61767aa552079
Bug 1010461 - Increase supervisor poll_interval

* Increase default supervisor poll_interval to reduce resource usage
Comment 2 Meng Bo 2013-09-26 08:35:15 EDT
Verified on devenv_3833,

To compare, do the same test on devenv-stage_478,

1. Create nodejs-0.10 app
2. SSH login to the app
3. Copy the server.js file to <random>.js about 5000 times under app-repo
4. Restart the gear
5. Use top to check the cpu usage of the supervisor process

On stage ami, it will use up to 99% cpu, and keep in about 60% for a while and then down to 30%.

On devenv_3833, it will use up to 40% cpu, and will go down in a short time with about 5%-10% usage.


Move bug to verified.

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