Only allow leveldb to use the minimum amount of file descriptors.
By default, leveldb will use up to 1000 file descriptors at
a time. The per-process limit on CrOS is 1024. This can
cause file descriptor exhaustion and, as issue 14137 points
out, chrome doesn't handle that situation gracefully.
This change will make leveldb only keep 64 files open in
its cache. The target size for each file is 2mb, so
databases under ~128mb will not be affected.
Larger databases that perform many random reads might see a
negligible performance decrease.
BUG=251385
R=derat@chromium.org, hashimoto@chromium.org, jsbell@chromium.org, marja@chromium.org, mpcomplete@chromium.org, nhiroki@chromium.org, rdevlin.cronin@chromium.org, tzik@chromium.org
Review URL: https://codereview.chromium.org/
19092006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211829 0039d316-1c4b-4281-b951-d872f2087c98