Bug 1128917 - [perf] set NSS_SDB_USE_CACHE=no in cartridges
Summary: [perf] set NSS_SDB_USE_CACHE=no in cartridges
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 1.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 2.x
Assignee: Rajat Chopra
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-08-11 20:36 UTC by Andy Grimm
Modified: 2016-11-08 03:48 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-09-19 19:53:53 UTC

Attachments (Terms of Use)

Description Andy Grimm 2014-08-11 20:36:36 UTC
Description of problem:

The performance team noticed an issue on some OpenShift Online nodes where the negative dentry cache was consuming a large amount of memory.  We tracked down the cause on one node to the sdb_measureAccess function in the nss library's soft token code ( https://github.com/servo/nss/blob/master/lib/softoken/sdb.c ) The purpose of the function is to determine whether a cache would be faster that reading data from disk, but in our case, the test is probably hurting the gear's performance significantly, as well as the node overall.  I don't know if this nss module is commonly used in OpenShift Online (this particular app we found is using it to authenticate to facebook), but it's easier for us to just define the variable everywhere than to continuously watch for apps causing this problem.

It does not really matter to me whether we set the variable to yes or no, but my gut says that no, is reasonable, since the code comments indicate that the authors expect to use cache when the alternative is a slow network filesystem.

Comment 2 Ben Parees 2014-08-11 21:45:41 UTC
Sounds like you're proposing that NSS_SDB_USE_CACHE=no be set on all gears (not something each cartridge would set), so that sounds like a node level thing...Jhon correct me if I'm wrong.

Comment 3 Jhon Honce 2014-08-11 21:58:41 UTC
Is it acceptable populate /etc/openshift/env/NSS_SDB_USE_CACHE with the value 'no' using puppet?

This take effect on the gear's next start or unidle.

Comment 4 Andy Grimm 2014-08-12 00:07:27 UTC
Ok, the suggestion did what I wanted, but the problem is still occurring.  I'll have to investigate this further tomorrow.

Comment 5 Dan McPherson 2015-06-12 02:03:09 UTC
@Andy Any update here?

Comment 6 Andy Grimm 2016-09-19 19:53:53 UTC
It's been more than two years since we dealt with this issue, and I have not seen the problem again.  This seems to have been a characteristic of one particular app, so we'll defer it for now.

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