Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
By default on Mac OS X the maximum number of files a process can open is 10,240. Unless the number 50,000 was chosen for a good reason, I suggest we change `target_procs` to `10240` to ensure a better out-of-the-box experience for Mac users.

The alternative would be to add a check for OS X before lowering `target_procs`.
  • Loading branch information
hammer committed Mar 24, 2014
1 parent e93a89d commit 0f590e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bcbio/pipeline/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _setup_resources():
This allows us to avoid out of file handle limits where we can
move beyond the soft limit up to the hard limit.
"""
target_procs = 50000
target_procs = 10240
cur_proc, max_proc = resource.getrlimit(resource.RLIMIT_NPROC)
target_proc = min(max_proc, target_procs)
resource.setrlimit(resource.RLIMIT_NPROC, (max(cur_proc, target_proc), max_proc))
Expand Down

0 comments on commit 0f590e1

Please sign in to comment.