TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Design of GNU Parallel (2015)

170 pointsby Havelockabout 2 years ago

15 comments

ketzuabout 2 years ago
This was quite interesting to look through!<p>Perl 5.8.0 is over 20 years old (<a href="https:&#x2F;&#x2F;dev.perl.org&#x2F;perl5&#x2F;news&#x2F;2002&#x2F;07&#x2F;18&#x2F;580ann&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dev.perl.org&#x2F;perl5&#x2F;news&#x2F;2002&#x2F;07&#x2F;18&#x2F;580ann&#x2F;</a>) while centOS 3.9 was released in 2007! At the same time it seems not-that-old and ancient.<p>My personal anecdote with gnu parallel was running into it while working in academia. It worked well and saved me some time, but I felt that it was unreasonable of a tool to ask for a citation to parallelise a script - it seemed that matplotlib, jupyter and co would need one as well. On the other hand, I decided to not use it, because I also feel that authors can ask for whatever they want.
评论 #35219038 未加载
评论 #35224597 未加载
a2800276about 2 years ago
Wait what: `parallel` is a Perl script!? [1]<p>I would have thought it&#x27;s black magic with assembler optimisations for MIPS and special considerations for HP-UX...<p>This is such a lovely and interesting writeup, it&#x27;s wonderful that people take their time to share so generously!<p>[1] : an 11k loc petal script, you can read along here: <a href="https:&#x2F;&#x2F;github.com&#x2F;gitGNU&#x2F;gnu_parallel&#x2F;blob&#x2F;master&#x2F;src&#x2F;parallel">https:&#x2F;&#x2F;github.com&#x2F;gitGNU&#x2F;gnu_parallel&#x2F;blob&#x2F;master&#x2F;src&#x2F;paral...</a>
评论 #35218943 未加载
NortySpockabout 2 years ago
I found GNU parallel useful when I wanted to queue up transcoding of flac files to mp3 on my Raspberry Pi. A few ffmpeg flags plus a list of files meant I could easily just saturate one job per core with a one-line bash command.
评论 #35219546 未加载
评论 #35216840 未加载
cricalixabout 2 years ago
parallel is a tool I&#x27;ve reached for many times; the citation bit it prints is odd - it seems to assume that the general use case is research&#x2F;academic - but easily squelched.<p>A sample use case would be having a file that has words in it, one per line, and you want to run a program that operates on each word (device name, dollar amount, whatever). Sure, you can use a loop, but if the words and actions are independent, parallel is one way to spin up N copies of your program and pass it a single word from the file. Can get around Python&#x27;s GIL without having to use multiprocessing or threads (as a more concrete example).<p>Didn&#x27;t realise that it busy waits, but I&#x27;m typically running it on a not very busy server with tens of cores.
评论 #35216858 未加载
BooneJSabout 2 years ago
Before GNU Parallel I used to use Ruby&#x27;s workers and job queue to keep ${N} cores busy with work. It sorta worked like GNU parallel but was quite basic. I&#x27;ve since switched to using GNU Parallel. Stable code I don&#x27;t have to write doesn&#x27;t have to be maintained... not to mention it has more features than I normally supported.
评论 #35222279 未加载
docandrewabout 2 years ago
I couldn’t make heads or tails of what this would be useful for from the OP (maybe it’s something I should already have known), but this from the official site was pretty helpful: <a href="https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;parallel&#x2F;parallel_cheat.pdf" rel="nofollow">https:&#x2F;&#x2F;www.gnu.org&#x2F;software&#x2F;parallel&#x2F;parallel_cheat.pdf</a>
评论 #35216868 未加载
mianosabout 2 years ago
I once replaced a 10 machine Hadoop cluster job with a python script and parallel on my laptop because I didn&#x27;t want to wait for hours for it to finish.<p>The i7 on my laptop with quite a few CPUS&#x2F;threads and a few optimisations got the job finished in 10 minutes.<p>(I later put the Hadoop use on my resume, not the GNU parallel. That&#x27;s the joke of modern job hunting. There is no interested in what you did, just buzzwords and leetcode. Luckily there are still a few places that value real work or I&#x27;d be too old to get a job. :) )
ZoomZoomZoomabout 2 years ago
If anyone needs a pretty basic alternative with Windows support, there&#x27;s Rush:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;shenwei356&#x2F;rush">https:&#x2F;&#x2F;github.com&#x2F;shenwei356&#x2F;rush</a><p>I use it pretty extensively with ffmpeg, imagemagick and the like.<p>I&#x27;d been using the mmstick&#x2F;parallel for a while, but it moved to RedoxOS repos and then stopped being updated, while still having some issues not ironed out.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;shenwei356&#x2F;rush">https:&#x2F;&#x2F;github.com&#x2F;shenwei356&#x2F;rush</a>
seizedabout 2 years ago
Parallel is a fun tool. I use it as a sort of simple slurm to distribute work over many VMs to process tens to hundreds of TBs of data. Sometimes across 2400+ cores.
michalcabout 2 years ago
I&#x27;ve never been sure if it&#x27;s too much of a hack, but I&#x27;ve used GNU parallel in Docker containers as a quick and easy way of getting multiple processes running for web applications.<p>And with the `--halt now,done=1` option (that I think is relatively recent?) it means that if any of the parallel processes exit, parallel would exit itself, the whole container will shut down, and external orchestration would start another one if needed.
评论 #35218508 未加载
评论 #35217206 未加载
imglorpabout 2 years ago
Don&#x27;t forget &quot;make -j&quot; is another option.
评论 #35220163 未加载
评论 #35221517 未加载
anthkabout 2 years ago
Parallel, vidir to edit directories with nvi&#x2F;vim, moreutils, detox to scrap out any non-typeable char...<p>These are a must have today.
评论 #35218194 未加载
rurbanabout 2 years ago
I wrote down a small usage example here: <a href="https:&#x2F;&#x2F;savannah.gnu.org&#x2F;forum&#x2F;forum.php?forum_id=9197" rel="nofollow">https:&#x2F;&#x2F;savannah.gnu.org&#x2F;forum&#x2F;forum.php?forum_id=9197</a><p>No need for massive distributed clusters when you have a simple perl oneliner
rockwotjabout 2 years ago
I recently used parallel to write a 1TB data file for testing using all cores<p><pre><code> seq 0 10000 | parallel dd if=&#x2F;dev&#x2F;urandom of=&#x2F;mnt&#x2F;foo&#x2F;input bs=10M count=10 seek={}0</code></pre>
评论 #35221353 未加载
globalresetabout 2 years ago
What&#x27;s the best rewrite of GNU Parallel in Rust? That citation thing is so annoying.