Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • In fact, this IS significant overhead. In my real case, the overhead is about 100 % but parallelizing with 4 threads gives more total throughput than the serial solution: Elapsed time with parallel is less than without when using one process handling each pipe as you suggest and what I did in my real word problem. Commented Nov 3, 2023 at 19:55
  • The parallel elapsed time is minimized when processing largest files first which is done by ls -S /var/lib/apt/lists/*lz4 | parallel ... (or as you did with ... | xargs -P). But this might not be helpful in your case where the number of threads is as large as the number of files (4 threads and 8 files for me, 1.1 GB compressed and 13 GB decompressed). Commented Nov 3, 2023 at 20:18