SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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 heureAmaury Bouchard
 
GHCソースコード読みのススメ
GHCソースコード読みのススメGHCソースコード読みのススメ
GHCソースコード読みのススメKiwamu Okabe
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The AnswerIan Barber
 
32 shell-programming
32 shell-programming32 shell-programming
32 shell-programmingkayalkarnan
 
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...Zyxware Technologies
 
OpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell ScriptingOpenGurukul : Language : Shell Scripting
OpenGurukul : Language : Shell ScriptingOpen Gurukul
 
Using the Command Line with Magento
Using the Command Line with MagentoUsing the Command Line with Magento
Using the Command Line with MagentoMatthew Haworth
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101hendrikvb
 
Unix shell scripting basics
Unix shell scripting basicsUnix shell scripting basics
Unix shell scripting basicsAbhay Sapru
 
Quize on scripting shell
Quize on scripting shellQuize on scripting shell
Quize on scripting shelllebse123
 
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 AWKAdolfo Sanz De Diego
 
Unix And Shell Scripting
Unix And Shell ScriptingUnix And Shell Scripting
Unix And Shell ScriptingJaibeer Malik
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting BasicsDr.Ravi
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)brian d foy
 

La actualidad más candente (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)
 

Destacado

Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...
Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...
Андрей Богомолов Автоматизация дистрибуции информации о наличии и цене товара...Транслируем.бел
 
Drupal in Action
Drupal in ActionDrupal in Action
Drupal in ActionJeff Eaton
 
Когда сказать нет. Арсений Кравченко
Когда сказать нет. Арсений КравченкоКогда сказать нет. Арсений Кравченко
Когда сказать нет. Арсений КравченкоТранслируем.бел
 
Что сделать, чтобы сто раз все не переделывать
Что сделать, чтобы сто раз все не переделыватьЧто сделать, чтобы сто раз все не переделывать
Что сделать, чтобы сто раз все не переделыватьТранслируем.бел
 

Destacado (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 a 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 RailsSvet Ivantchev
 
Shell Scripts
Shell ScriptsShell Scripts
Shell ScriptsDr.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 ExploitJongWon Kim
 
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 2Calvin Giles
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL John Anderson
 
MeaNstack on Docker
MeaNstack on DockerMeaNstack on Docker
MeaNstack on DockerDaniel Ku
 
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...DevSecCon
 
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 redirectsAcácio Oliveira
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
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 CaptainsDocker, Inc.
 
Hiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceHiveminder - Everything but the Secret Sauce
Hiveminder - Everything but the Secret SauceJesse Vincent
 
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.pdfmaheshkumar12354
 
Medicine show2 Drupal Bristol Camp 2015
Medicine show2 Drupal Bristol Camp 2015Medicine show2 Drupal Bristol Camp 2015
Medicine show2 Drupal Bristol Camp 2015George Boobyer
 
One-Liners to Rule Them All
One-Liners to Rule Them AllOne-Liners to Rule Them All
One-Liners to Rule Them Allegypt
 
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaaShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaa
ShellAdvanced aaäaaaaaaaaaaaaaaaaaaaaaaaaaaaewout2
 

Similar a 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
 

Más de Транслируем.бел

Руководство по видео, трансляциям и премьерам (Youtube 2020)
Руководство по видео, трансляциям и премьерам (Youtube 2020)Руководство по видео, трансляциям и премьерам (Youtube 2020)
Руководство по видео, трансляциям и премьерам (Youtube 2020)Транслируем.бел
 
Корпоративный новый год онлайн
Корпоративный новый год онлайнКорпоративный новый год онлайн
Корпоративный новый год онлайнТранслируем.бел
 
Руководство для малого и среднего бизнеса по использованию цифровых решений
Руководство для малого и среднего бизнеса по использованию цифровых решенийРуководство для малого и среднего бизнеса по использованию цифровых решений
Руководство для малого и среднего бизнеса по использованию цифровых решенийТранслируем.бел
 
Онлайн-трансляции в соцсетях
Онлайн-трансляции в соцсетяхОнлайн-трансляции в соцсетях
Онлайн-трансляции в соцсетяхТранслируем.бел
 
Как организовать трансляцию в Facebook
Как организовать трансляцию в FacebookКак организовать трансляцию в Facebook
Как организовать трансляцию в FacebookТранслируем.бел
 
SMM учебник. Как продвигать банк в социальных сетях. Наглядное пособие
SMM учебник. Как продвигать банк в социальных сетях. Наглядное пособиеSMM учебник. Как продвигать банк в социальных сетях. Наглядное пособие
SMM учебник. Как продвигать банк в социальных сетях. Наглядное пособиеТранслируем.бел
 
методы монетизации интернет проектов
методы монетизации интернет проектовметоды монетизации интернет проектов
методы монетизации интернет проектовТранслируем.бел
 
Эффективный маркетинг в Instagram
Эффективный маркетинг в InstagramЭффективный маркетинг в Instagram
Эффективный маркетинг в InstagramТранслируем.бел
 
Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...
Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...
Вторая волна исследования о развитии рынка электронной торговли в Беларуси за...Транслируем.бел
 

Más de Транслируем.бел (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
 

Último

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
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, ...apidays
 
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 2024Victor Rentea
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+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...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
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, ...
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 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 ... $