summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-12-16 22:31:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2010-12-16 22:32:06 -0800
commit8e81a99c2690a5a8e3a3449e9c4f440738e0cac9 (patch)
tree81978ebc6cb1b584d303d5b91bdc96bce31b6172 /NEWS
parent1b31ce6982a9151d9dfe2ea3595ad7595cb9ca86 (diff)
downloadcoreutils-8e81a99c2690a5a8e3a3449e9c4f440738e0cac9.tar.xz
sort: do not generate thousands of subprocesses for 16-way merge
Without this change, tests/misc/sort-compress-hang would consume more than 10,000 process slots on my RHEL 5.5 x86-64 server, making it likely for other applications to fail due to lack of process slots. With this change, the same benchmark causes 'sort' to consume at most 19 process slots. The change also improved wall-clock time by 2% and user+system time by 14% on that benchmark. * NEWS: Document this. * src/sort.c (MAX_PROCS_BEFORE_REAP): Remove. (reap_exited): Renamed from reap_some; this is a more accurate name, since "some" incorrectly implies that it reaps at least one process. All uses changed. (reap_some): New function: it *does* reap at least one process. (pipe_fork): Do not allow more than NMERGE + 2 subprocesses. (mergefps, sort): Omit check for exited processes: no longer needed, and anyway the code consumed too much CPU per line when 2 < nprocs.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS3
1 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a69ef5460..484ed5ccc 100644
--- a/NEWS
+++ b/NEWS
@@ -22,7 +22,8 @@ GNU coreutils NEWS -*- outline -*-
into the stack of an expired thread. [bug introduced in coreutils-8.6]
sort --compress no longer mishandles subprocesses' exit statuses,
- and no longer hangs indefinitely due to a bug in waiting for subprocesses.
+ no longer hangs indefinitely due to a bug in waiting for subprocesses,
+ and no longer generates many more than NMERGE subprocesses.
sort -m -o f f ... f no longer dumps core when file descriptors are limited.