Comments on Fully Utilizing Your X-Core CPU
Fully Utilizing Your X-Core CPU Almost all systems sold nowadays have at least a dual-core CPU, even triple- or quad-cores are getting cheaper and getting standard in the near future. But how to utilize your shiny x-core to it's full potential, with applications that are only utilizing one core ? With Linux, which has strong multitasking capabilities as all unixoid operating systems, there is an easy possibility to parallelize tasks which are normally only using one core of an x-core CPU.
2 Comment(s)
Comments
Nice article..
But just to let you know its not recommend to run applications as root for security reasons..
I have here translated your examples to GNU Parallel http://www.gnu.org/software/parallel/ It makes the examples somewhat easier to read:
for i in *.flac; do oggenc -q3 -o ${i%%flac}ogg $i; done
ls *.flac | parallel -j+0 oggenc -q3 -o {.}.ogg {}
for file in *.flac; do $(flac -cd "$file" | lame -h - "${file%.flac}.mp3"); done
ls *.flac | parallel -j+0 'flac -cd {} | lame -h - {.}.mp3'
for i in *.mp3; do lame -V 4 -B 160 "$i" "${i%.mp3}.downmp3"'; done
ls *.mp3 | parallel lame -V 4 -B 160 {} {.}.downmp3
ppss.sh -f ppss_list -d /path/to/images -c 'mogrify -solarize 50 "$ITEM"'
cat feh_list | parallel mogrify -solarize 50
ppss.sh config -C config.cfg -c 'lame $ITEM -V 4 -B 160 "${ITEM%.mp3}.downmp3"' -d /home/ppss/mp -m srvr -u ppss -K ~/.ssh/known_hosts -n /home/ppss/nodes.txt -k /home/ppss/ppss-private.key
ls *.mp3 | parallel -j+0 --sshloginfile nodes.txt --trc {.}.downmp3 lame -V 4 -B 160 {} {.}.downmp3