Commit a6fd373b authored by gavinp's avatar gavinp Committed by Commit bot

Raise FD limit on Mac for simple cache backend performance.

The simple cache can use too many FDs and crash systems with low FD
limits, like Macs. Longer term we should probably have ways to not
keep so many files open simultaneously, but the quick fix is to raise
the limit on Mac.

R=jkarlin@chromium.org,clamy@chromium.org
BUG=634413

Review-Url: https://codereview.chromium.org/2399073002
Cr-Commit-Position: refs/heads/master@{#423846}
parent eb45c138
......@@ -511,17 +511,16 @@ void BrowserMainLoop::EarlyInitialization() {
if (parts_)
parts_->PreEarlyInitialization();
#if defined(OS_MACOSX)
// We use quite a few file descriptors for our IPC, and the default limit on
// the Mac is low (256), so bump it up.
base::SetFdLimit(1024);
#elif defined(OS_LINUX)
#if defined(OS_MACOSX) || defined(OS_LINUX)
// We use quite a few file descriptors for our IPC as well as disk the disk
// cache,and the default limit on the Mac is low (256), so bump it up.
// Same for Linux. The default various per distro, but it is 1024 on Fedora.
// Low soft limits combined with liberal use of file descriptors means power
// users can easily hit this limit with many open tabs. Bump up the limit to
// an arbitrarily high number. See https://crbug.com/539567
base::SetFdLimit(8192);
#endif // default(OS_MACOSX)
#endif // defined(OS_MACOSX) || defined(OS_LINUX)
#if defined(OS_WIN)
net::EnsureWinsockInit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment