SlideShare a Scribd company logo
1 of 19
Download to read offline
paexec – distributes tasks over network or CPUs

                 Aleksey Cheusov
                  vle@gmx.net



               Minsk, Belarus, 2011
Problem




     Huge amount of data to process
     Typical desktop machines have more than one CPU/Core
     Unlimited resources are available through Internet
     Heterogeneous environment (*BSD, Linux, Windows...)
Solution

                         Usage
   paexec [OPTIONS] 
     -n ’machines of CPUs’ 
     -t ’transport program’ 
     -c ’calculator’ < tasks
                        example
   ls *.wav | paexec 
     -n +4 
     -c ~/bin/wav2flac
                        example
   paexec 
     -n ’host1 host2 host3’ 
     -t /usr/bin/ssh 
     -c ~/bin/toupper < tasks
Example 1: toupper
   Our task is to convert strings to upper case

                            ˜/bin/toupper
   #!/usr/bin/awk -f

   {
       print " ", toupper($0)
       print "" # end-of-task marker!
       fflush() # We must flush stdout!
   }


                             ˜/tmp/tasks
   apple
   bananas
   orange
Example 1: toupper



                    paexec invocation
   $ paexec -t ssh -c ~/bin/toupper 
      -n ’syn-proc7 syn-proc5’ 
      < ~/tmp/tasks > results
   $ cat results
    BANANAS
    ORANGE
    APPLE
   $
Example 1: toupper



                   paexec -lr invocation
   $ paexec -lr -t ssh -c ~/bin/toupper 
      -n ’syn-proc7 syn-proc5’ 
      < ~/tmp/tasks > results
   $ cat results
   syn-proc5 2 BANANAS
   syn-proc5 3 ORANGE
   syn-proc7 1 APPLE
   $
Example 2: parallel banner(1)



                     what is banner(1)?
   $ banner   -f @ NetBSD
   @     @                    @@@@@@    @@@@@     @@@@@@
   @@    @    @@@@@@   @@@@@ @       @ @      @   @      @
   @ @   @    @          @    @      @ @          @      @
   @ @ @      @@@@@      @    @@@@@@    @@@@@     @      @
   @   @ @    @          @    @      @        @   @      @
   @    @@    @          @    @      @ @      @   @      @
   @     @    @@@@@@     @    @@@@@@    @@@@@     @@@@@@

   $
Example 2: parallel banner(1)

                      ˜/bin/pbanner
   #!/bin/sh

   while read task; do
       banner -f M "$task" | sed ’s/ˆ/ /’
       echo ’’ # end-of-task-marker
   done
                       ˜/bin/tasks2
   pae
   xec
                    paexec invocation
   $ paexec -l -c ~/bin/pbanner 
       -n +2 
       < ~/tmp/tasks2 > results
   $
Example 2: parallel banner(1)


                                   Sliced result
   $ cat results
   2
   2
   2   M     M MMMMMM     MMMM
   2     M M   M         M     M
   1
   1
   1   MMMMM     MM      MMMMMM
   1   M     M  M M      M
   1   M     M M     M   MMMMM
   1   MMMMM   MMMMMM    M
   2      MM   MMMMM     M
   2      MM   M         M
   2     M M   M         M     M
   2   M     M MMMMMM     MMMM
   2
   1   M       M     M   M
   1   M       M     M   MMMMMM
   1
   $
Example 2: parallel banner(1)


                             Ordered result
   $ paexec_reorder -S results

    MMMMM       MM     MMMMMM
    M     M    M M     M
    M     M   M    M   MMMMM
    MMMMM     MMMMMM   M
    M         M    M   M
    M         M    M   MMMMMM

    M    M    MMMMMM       MMMM
     M M      M        M       M
      MM      MMMMM    M
      MM      M        M
     M M      M        M       M
    M    M    MMMMMM       MMMM

   $
Example 3: dependency graph of tasks
   paexec(1) is able to build tasks taking into account their
   “dependencies”


                                                             lang/f2c




                                                         devel/libtool-base                               devel/m4




                                                            devel/gmake       audio/id3lib               devel/bison




    audio/cd-discid   textproc/gsed   audio/cdparanoia       misc/mkcue       audio/id3v2    audio/id3   shells/bash




                                                             audio/abcde
Example 3: dependency graph of tasks

                        ˜/tmp/packages to build
   audio/cd-discid audio/abcde
   textproc/gsed audio/abcde
   audio/cdparanoia audio/abcde
   audio/id3v2 audio/abcde
   audio/id3 audio/abcde
   misc/mkcue audio/abcde
   shells/bash audio/abcde
   devel/libtool-base audio/cdparanoia
   devel/gmake audio/cdparanoia
   devel/libtool-base audio/id3lib
   devel/gmake audio/id3v2
   audio/id3lib audio/id3v2
   devel/m4 devel/bison
   lang/f2c devel/libtool-base
   devel/gmake misc/mkcue
   devel/bison shells/bash
Example 3: dependency graph of tasks




                             ˜/bin/pkg builder
   #!/usr/bin/awk -f

   {
       print "build " $0
       print ”success” # build succeeded!
       print ""          # end-of-task marker
       fflush()          # we must flush stdout
   }
Example 3: dependency graph of tasks
                     paexec -g invocation (no failures)
   $ paexec -g -l -c ~/bin/pkg_builder -n ’syn-proc5 syn-proc7’ 
       -t ssh < ~/tmp/packages_to_build | paexec_reorder > result
   $ cat result
   build textproc/gsed
   success
   build devel/gmake
   success
   build misc/mkcue
   success
   build devel/m4
   success
   build devel/bison
   success
   ...
   build audio/id3v2
   success
   build audio/abcde
   success
   $
Example 3: dependency graph of tasks


                            ˜/bin/pkg builder
   #!/usr/bin/awk -f

   {
       print "build " $0
       if ($0 == "devel/gmake")
          print ”failure” # Oh no...
       else
          print "success" # build succeeded!

       print ""        # end-of-task marker
       fflush()        # we must flush stdout
   }
Example 3: dependency graph of tasks

                    paexec -g invocation (with failures)
   $ paexec -gl -c ~/bin/pkg_builder -n ’syn-proc5 syn-proc7’ 
        -t ssh < ~/tmp/packages_to_build | paexec_reorder > result
   $ cat result
   build audio/cd-discid
   success
   build audio/id3
   success
   build devel/gmake
   failure
   devel/gmake audio/cdparanoia audio/abcde audio/id3v2 misc/mkcue
   build devel/m4
   success
   build textproc/gsed
   success
   ...
   $
Example 4: Resistance to network failures


                            ˜/bin/pkg builder
   #!/usr/bin/awk -f

   {
       "hostname -s" | getline hostname
       print "build " $0 " on " hostname

       if (hostname == "syn-proc7" && $0 == "textproc/gsed")
          exit 0 # Damn it, I’m dying...
       else
          print "success" # Yes! :-)

       print ""        # end-of-task marker
       fflush()        # we must flush stdout
   }
Example 4: Resistance to network failures


                    paexec -Z300 invocation (with failure)
   $ paexec -gl -Z300 -t ssh -c ~/bin/pkg_builder 
          -n ’syn-proc5 syn-proc7’ < ~/tmp/packages_to_build 
          | paexec_reorder > result
   $ cat result
   build audio/cd-discid on syn-proc5
   success
   build textproc/gsed on syn-proc7
   fatal
   build textproc/gsed on syn-proc5
   success
   build audio/id3 on syn-proc5
   success
   ...
   $
The End

More Related Content

What's hot

GHCソースコード読みのススメ
GHCソースコード読みのススメGHCソースコード読みのススメ
GHCソースコード読みのススメ
Kiwamu Okabe
 
32 shell-programming
32 shell-programming32 shell-programming
32 shell-programming
kayalkarnan
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basics
Abhay Sapru
 
Quize on scripting shell
Quize on scripting shellQuize on scripting shell
Quize on scripting shell
lebse123
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
Dr.Ravi
 

What's hot (20)

Unix shell scripting
Unix shell scriptingUnix shell scripting
Unix shell scripting
 
Créer une base NoSQL en 1 heure
Créer une base NoSQL en 1 heureCréer une base NoSQL en 1 heure
Créer une base NoSQL en 1 heure
 
GHCソースコード読みのススメ
GHCソースコード読みのススメGHCソースコード読みのススメ
GHCソースコード読みのススメ
 
Web 8 | Introduction to PHP
Web 8 | Introduction to PHPWeb 8 | Introduction to PHP
Web 8 | Introduction to PHP
 
Web 4 | Core JavaScript
Web 4 | Core JavaScriptWeb 4 | Core JavaScript
Web 4 | Core JavaScript
 
Web 9 | OOP in PHP
Web 9 | OOP in PHPWeb 9 | OOP in PHP
Web 9 | OOP in PHP
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
32 shell-programming
32 shell-programming32 shell-programming
32 shell-programming
 
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
Introduction to Bash Scripting, Zyxware Technologies, CSI Students Convention...
 
Emacs Key Bindings
Emacs Key BindingsEmacs Key Bindings
Emacs Key Bindings
 
OpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell ScriptingOpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell Scripting
 
Web 10 | PHP with MySQL
Web 10 | PHP with MySQLWeb 10 | PHP with MySQL
Web 10 | PHP with MySQL
 
Using the Command Line with Magento
Using the Command Line with MagentoUsing the Command Line with Magento
Using the Command Line with Magento
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basics
 
Quize on scripting shell
Quize on scripting shellQuize on scripting shell
Quize on scripting shell
 
De 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWKDe 0 a 100 con Bash Shell Scripting y AWK
De 0 a 100 con Bash Shell Scripting y AWK
 
Unix And Shell Scripting
Unix And Shell ScriptingUnix And Shell Scripting
Unix And Shell Scripting
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 

Viewers also liked

Viewers also liked (7)

Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...
Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...
Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...
 
Amazon EC2 hardware vs Cloud
Amazon EC2 hardware vs CloudAmazon EC2 hardware vs Cloud
Amazon EC2 hardware vs Cloud
 
Drupal in Action
Drupal in ActionDrupal in Action
Drupal in Action
 
Comdi player
Comdi playerComdi player
Comdi player
 
Marketing Essentials for Startup Teams
Marketing Essentials for Startup TeamsMarketing Essentials for Startup Teams
Marketing Essentials for Startup Teams
 
Когда сказать нет. Арсений Кравченко
Когда сказать нет. Арсений КравченкоКогда сказать нет. Арсений Кравченко
Когда сказать нет. Арсений Кравченко
 
Что сделать, чтобы сто раз все не переделывать
Что сделать, чтобы сто раз все не переделыватьЧто сделать, чтобы сто раз все не переделывать
Что сделать, чтобы сто раз все не переделывать
 

Similar to Paexec -- distributed tasks over network or cpus

Interface de Voz con Rails
Interface de Voz con RailsInterface de Voz con Rails
Interface de Voz con Rails
Svet Ivantchev
 
Shell Scripts
Shell ScriptsShell Scripts
Shell Scripts
Dr.Ravi
 
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitPenetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
JongWon Kim
 
101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects
Acácio Oliveira
 
Im trying to run make qemu-nox In a putty terminal but it.pdf
Im trying to run  make qemu-nox  In a putty terminal but it.pdfIm trying to run  make qemu-nox  In a putty terminal but it.pdf
Im trying to run make qemu-nox In a putty terminal but it.pdf
maheshkumar12354
 
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaaShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ewout2
 

Similar to Paexec -- distributed tasks over network or cpus (20)

EC2
EC2EC2
EC2
 
Interface de Voz con Rails
Interface de Voz con RailsInterface de Voz con Rails
Interface de Voz con Rails
 
Shell Scripts
Shell ScriptsShell Scripts
Shell Scripts
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Unix tips and tricks
Unix tips and tricksUnix tips and tricks
Unix tips and tricks
 
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post ExploitPenetration Testing for Easy RM to MP3 Converter Application and Post Exploit
Penetration Testing for Easy RM to MP3 Converter Application and Post Exploit
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL
 
Unix 5 en
Unix 5 enUnix 5 en
Unix 5 en
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on Docker
 
DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...
DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...
DevSecCon London 2017 - MacOS security, hardening and forensics 101 by Ben Hu...
 
101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects101 3.4 use streams, pipes and redirects
101 3.4 use streams, pipes and redirects
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret Sauce
 
Im trying to run make qemu-nox In a putty terminal but it.pdf
Im trying to run  make qemu-nox  In a putty terminal but it.pdfIm trying to run  make qemu-nox  In a putty terminal but it.pdf
Im trying to run make qemu-nox In a putty terminal but it.pdf
 
Laravel Day / Deploy
Laravel Day / DeployLaravel Day / Deploy
Laravel Day / Deploy
 
Medicine show2 Drupal Bristol Camp 2015
Medicine show2 Drupal Bristol Camp 2015Medicine show2 Drupal Bristol Camp 2015
Medicine show2 Drupal Bristol Camp 2015
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them All
 
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaaShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
 

More from Транслируем.бел

More from Транслируем.бел (20)

Медицинские трансляции
Медицинские трансляцииМедицинские трансляции
Медицинские трансляции
 
Vinteo
VinteoVinteo
Vinteo
 
Руководство по видео, трансляциям и премьерам (Youtube 2020)
Руководство по видео, трансляциям и премьерам (Youtube 2020)Руководство по видео, трансляциям и премьерам (Youtube 2020)
Руководство по видео, трансляциям и премьерам (Youtube 2020)
 
Корпоративный новый год онлайн
Корпоративный новый год онлайнКорпоративный новый год онлайн
Корпоративный новый год онлайн
 
Unofficial guide to vmix by streamgeeks
Unofficial guide to vmix by streamgeeksUnofficial guide to vmix by streamgeeks
Unofficial guide to vmix by streamgeeks
 
Руководство для малого и среднего бизнеса по использованию цифровых решений
Руководство для малого и среднего бизнеса по использованию цифровых решенийРуководство для малого и среднего бизнеса по использованию цифровых решений
Руководство для малого и среднего бизнеса по использованию цифровых решений
 
Sennheiser ew100 g2
Sennheiser ew100 g2Sennheiser ew100 g2
Sennheiser ew100 g2
 
Sony mcs 8m
Sony mcs 8mSony mcs 8m
Sony mcs 8m
 
Сравнение поколений Y и Z
Сравнение поколений Y и ZСравнение поколений Y и Z
Сравнение поколений Y и Z
 
Онлайн-трансляции в соцсетях
Онлайн-трансляции в соцсетяхОнлайн-трансляции в соцсетях
Онлайн-трансляции в соцсетях
 
Как организовать трансляцию в Facebook
Как организовать трансляцию в FacebookКак организовать трансляцию в Facebook
Как организовать трансляцию в Facebook
 
The ultimate guide to facebook live for your event
The ultimate guide to facebook live for your eventThe ultimate guide to facebook live for your event
The ultimate guide to facebook live for your event
 
Guide to facebook live
Guide to facebook liveGuide to facebook live
Guide to facebook live
 
SMM учебник. Как продвигать банк в социальных сетях. Наглядное пособие
SMM учебник. Как продвигать банк в социальных сетях. Наглядное пособиеSMM учебник. Как продвигать банк в социальных сетях. Наглядное пособие
SMM учебник. Как продвигать банк в социальных сетях. Наглядное пособие
 
методы монетизации интернет проектов
методы монетизации интернет проектовметоды монетизации интернет проектов
методы монетизации интернет проектов
 
Belarus internet users discovery
Belarus internet users discoveryBelarus internet users discovery
Belarus internet users discovery
 
Эффективный маркетинг в Instagram
Эффективный маркетинг в InstagramЭффективный маркетинг в Instagram
Эффективный маркетинг в Instagram
 
Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...
Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...
Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...
 
payqr presentation
payqr presentationpayqr presentation
payqr presentation
 
аналитика 2014 0806
аналитика 2014 0806аналитика 2014 0806
аналитика 2014 0806
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Paexec -- distributed tasks over network or cpus

  • 1. paexec – distributes tasks over network or CPUs Aleksey Cheusov vle@gmx.net Minsk, Belarus, 2011
  • 2. Problem Huge amount of data to process Typical desktop machines have more than one CPU/Core Unlimited resources are available through Internet Heterogeneous environment (*BSD, Linux, Windows...)
  • 3. Solution Usage paexec [OPTIONS] -n ’machines of CPUs’ -t ’transport program’ -c ’calculator’ < tasks example ls *.wav | paexec -n +4 -c ~/bin/wav2flac example paexec -n ’host1 host2 host3’ -t /usr/bin/ssh -c ~/bin/toupper < tasks
  • 4. Example 1: toupper Our task is to convert strings to upper case ˜/bin/toupper #!/usr/bin/awk -f { print " ", toupper($0) print "" # end-of-task marker! fflush() # We must flush stdout! } ˜/tmp/tasks apple bananas orange
  • 5. Example 1: toupper paexec invocation $ paexec -t ssh -c ~/bin/toupper -n ’syn-proc7 syn-proc5’ < ~/tmp/tasks > results $ cat results BANANAS ORANGE APPLE $
  • 6. Example 1: toupper paexec -lr invocation $ paexec -lr -t ssh -c ~/bin/toupper -n ’syn-proc7 syn-proc5’ < ~/tmp/tasks > results $ cat results syn-proc5 2 BANANAS syn-proc5 3 ORANGE syn-proc7 1 APPLE $
  • 7. Example 2: parallel banner(1) what is banner(1)? $ banner -f @ NetBSD @ @ @@@@@@ @@@@@ @@@@@@ @@ @ @@@@@@ @@@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @@@@@ @ @@@@@@ @@@@@ @ @ @ @ @ @ @ @ @ @ @ @ @ @@ @ @ @ @ @ @ @ @ @ @ @@@@@@ @ @@@@@@ @@@@@ @@@@@@ $
  • 8. Example 2: parallel banner(1) ˜/bin/pbanner #!/bin/sh while read task; do banner -f M "$task" | sed ’s/ˆ/ /’ echo ’’ # end-of-task-marker done ˜/bin/tasks2 pae xec paexec invocation $ paexec -l -c ~/bin/pbanner -n +2 < ~/tmp/tasks2 > results $
  • 9. Example 2: parallel banner(1) Sliced result $ cat results 2 2 2 M M MMMMMM MMMM 2 M M M M M 1 1 1 MMMMM MM MMMMMM 1 M M M M M 1 M M M M MMMMM 1 MMMMM MMMMMM M 2 MM MMMMM M 2 MM M M 2 M M M M M 2 M M MMMMMM MMMM 2 1 M M M M 1 M M M MMMMMM 1 $
  • 10. Example 2: parallel banner(1) Ordered result $ paexec_reorder -S results MMMMM MM MMMMMM M M M M M M M M M MMMMM MMMMM MMMMMM M M M M M M M M MMMMMM M M MMMMMM MMMM M M M M M MM MMMMM M MM M M M M M M M M M MMMMMM MMMM $
  • 11. Example 3: dependency graph of tasks paexec(1) is able to build tasks taking into account their “dependencies” lang/f2c devel/libtool-base devel/m4 devel/gmake audio/id3lib devel/bison audio/cd-discid textproc/gsed audio/cdparanoia misc/mkcue audio/id3v2 audio/id3 shells/bash audio/abcde
  • 12. Example 3: dependency graph of tasks ˜/tmp/packages to build audio/cd-discid audio/abcde textproc/gsed audio/abcde audio/cdparanoia audio/abcde audio/id3v2 audio/abcde audio/id3 audio/abcde misc/mkcue audio/abcde shells/bash audio/abcde devel/libtool-base audio/cdparanoia devel/gmake audio/cdparanoia devel/libtool-base audio/id3lib devel/gmake audio/id3v2 audio/id3lib audio/id3v2 devel/m4 devel/bison lang/f2c devel/libtool-base devel/gmake misc/mkcue devel/bison shells/bash
  • 13. Example 3: dependency graph of tasks ˜/bin/pkg builder #!/usr/bin/awk -f { print "build " $0 print ”success” # build succeeded! print "" # end-of-task marker fflush() # we must flush stdout }
  • 14. Example 3: dependency graph of tasks paexec -g invocation (no failures) $ paexec -g -l -c ~/bin/pkg_builder -n ’syn-proc5 syn-proc7’ -t ssh < ~/tmp/packages_to_build | paexec_reorder > result $ cat result build textproc/gsed success build devel/gmake success build misc/mkcue success build devel/m4 success build devel/bison success ... build audio/id3v2 success build audio/abcde success $
  • 15. Example 3: dependency graph of tasks ˜/bin/pkg builder #!/usr/bin/awk -f { print "build " $0 if ($0 == "devel/gmake") print ”failure” # Oh no... else print "success" # build succeeded! print "" # end-of-task marker fflush() # we must flush stdout }
  • 16. Example 3: dependency graph of tasks paexec -g invocation (with failures) $ paexec -gl -c ~/bin/pkg_builder -n ’syn-proc5 syn-proc7’ -t ssh < ~/tmp/packages_to_build | paexec_reorder > result $ cat result build audio/cd-discid success build audio/id3 success build devel/gmake failure devel/gmake audio/cdparanoia audio/abcde audio/id3v2 misc/mkcue build devel/m4 success build textproc/gsed success ... $
  • 17. Example 4: Resistance to network failures ˜/bin/pkg builder #!/usr/bin/awk -f { "hostname -s" | getline hostname print "build " $0 " on " hostname if (hostname == "syn-proc7" && $0 == "textproc/gsed") exit 0 # Damn it, I’m dying... else print "success" # Yes! :-) print "" # end-of-task marker fflush() # we must flush stdout }
  • 18. Example 4: Resistance to network failures paexec -Z300 invocation (with failure) $ paexec -gl -Z300 -t ssh -c ~/bin/pkg_builder -n ’syn-proc5 syn-proc7’ < ~/tmp/packages_to_build | paexec_reorder > result $ cat result build audio/cd-discid on syn-proc5 success build textproc/gsed on syn-proc7 fatal build textproc/gsed on syn-proc5 success build audio/id3 on syn-proc5 success ... $