Skip to content

Commit

Permalink
add notes to docs recommending -j0 in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Apr 25, 2014
1 parent 56dd105 commit 9c994b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion zs/cmdline/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ def command_dump(opts):
are performed using ASCIIbetical ordering.
Processing options:
-j PARALLELISM The number of CPUs to use for decompression.
-j PARALLELISM The number of CPUs to use for decompression. Note
that if you know that you are only reading a small
number of records, then -j0 may be the fastest
option, since it reduces startup overhead.
[default: guess]
Output options:
-o FILE, --output=FILE Output to the given file, or "-" for stdout.
[default: -]
Expand Down
5 changes: 5 additions & 0 deletions zs/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ class ZS(object):
``parallelism="guess"`` means to spawn one worker process per available
CPU.
Note that if you know that you are going to read just a few records on
each search, then parallelism=0 may be slightly faster; this saves the
overhead of setting up the worker processes, and they only really help
when doing large bulk reads.
:arg index_block_cache: The number of index blocks to keep cached in
memory. This speeds up repeated queries. Larger values provide better
caching, but take more memory. Usually you'll want this to at least be
Expand Down

0 comments on commit 9c994b2

Please sign in to comment.