Bug 1010461 - nodejs supervisor poll interval is too short
Summary: nodejs supervisor poll interval is too short
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-20 20:04 UTC by Andy Grimm
Modified: 2018-12-03 20:00 UTC (History)
6 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1010464 0 medium CLOSED Allow users to disable node.js supervisor or prune file watches 2021-02-22 00:41:40 UTC

Internal Links: 1010464

Description Andy Grimm 2013-09-20 20:04:20 UTC
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 06:20:14 UTC
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 12:35:15 UTC
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.