SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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
 

Tendances (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)
 

En vedette

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

En vedette (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
 
Когда сказать нет. Арсений Кравченко
Когда сказать нет. Арсений КравченкоКогда сказать нет. Арсений Кравченко
Когда сказать нет. Арсений Кравченко
 
Что сделать, чтобы сто раз все не переделывать
Что сделать, чтобы сто раз все не переделыватьЧто сделать, чтобы сто раз все не переделывать
Что сделать, чтобы сто раз все не переделывать
 

Similaire à 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
 

Similaire à 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
 

Plus de Транслируем.бел

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

Plus 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
 

Dernier

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Dernier (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

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 ... $