Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Understanding distributed processing in Python
Search
chie8842
June 16, 2019
Technology
2
1.9k
Understanding distributed processing in Python
#pyconth2019
https://th.pycon.org/talks/#row-47
Slides of my talk at PyConTh2019
chie8842
June 16, 2019
Tweet
Share
More Decks by chie8842
See All by chie8842
MongoDB Atlas Search のご紹介
chie8842
2
1.3k
MongoDB Atlas Vectorsearchではじめる生成AIアプリ開発
chie8842
3
1.4k
AWS GlueとAWS Lake Formationではじめるデータマネジメント
chie8842
0
940
Distributed Processing in Python
chie8842
2
640
クックパッドにおける推薦(と検索)の取り組み
chie8842
21
7.9k
Performance Tuning Tips of TensorFlow Inference
chie8842
1
720
クックパッドにおけるCloud AutoML事例
chie8842
9
7.8k
Cookpad_Internship_MLOps_Lecture_2018
chie8842
35
16k
機械学習デプロイを支えるコンテナ技術(Machine Learning on Docker)
chie8842
14
8.2k
Other Decks in Technology
See All in Technology
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
The Rise of LLMOps
asei
7
1.5k
Taming you application's environments
salaboy
0
190
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
CysharpのOSS群から見るModern C#の現在地
neuecc
2
3.3k
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
4 Signs Your Business is Dying
shpigford
180
21k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
How GitHub (no longer) Works
holman
310
140k
Ruby is Unlike a Banana
tanoku
97
11k
Docker and Python
trallard
40
3.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Fireside Chat
paigeccino
34
3k
Transcript
Understanding distributed processing in Python Chie Hayashida
$IJF)BZBTIJEB !DIJF) • 4PGUXBSF&OHJOFFSBU$PPLQBE GSPN+BQBO! • EFWFMPQBOEDPOUSJCVUFUPTPNF044 XSJUFBSUJDMFT BOENBLF QSFTFOUBUJPOT
• 8POGJSTUQSJ[FBUSF*OWFOU (BNF%BZ
$PPLQBE ‒ worldʼs largest recipe sharing platform Try it
$PPLQBE JTHMPCBMTFSWJDF
"HFOEB •CBTJDLOPXMFEHFPG DPODVSSFOUQBSBMMFMEJTUSJCVUFEQSPDFTTJOH •QBSBMMFMQSPDFTTJOHJO1ZUIPO •EJTUSJCVUFEQSPDFTTJOHJO1ZUIPO
%JTDMBJNFS • 8IBUEP*UBML • CBTJDBSDIJUFDUVSFPGQBSBMMFMEJTUSJCVUFE QSPDFTTJOH DPNQVUJOH MJCSBSJFTJO1ZUIPO • 8IBUEP*OPU
UBML • IPXUPJOTUBMMBOETFUVQFBDIMJCSBSJFT • VTBHFTPGEFUBJMFE"1*TPGXIBUXFJOUSPEVDF
8IFOXFVTFQBSBMMFMEJTUSJCVUFE QSPDFTTJOH FH •%PXOMPBEMBSHFEBUBJOTIPSUUJNF •6TFMBSHFEBUBGPS%BUBBOBMZTJTPS .BDIJOF-FBSOJOH •)BOEMFBMPUPGSFRVFTUTTJNVMUBOFPVTMZ BU8FC4JUF
28IBUJT UIFEJGGFSFODFPGCFMPX •$P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UZMJCSBSJFT
UISFBEJOH • UISFBEJOHNPEVMFEJWJEFTPOFQSPDFTTJOUPNVMUJQMF UISFBET .BJO5ISFBE 5ISFBE 5ISFBE 1SPDFTT
UISFBEJOH • (*- (MPCBM *OUFSQSFUFS-PDL MJNJUTPOMZPOFUISFBEDBOCF JOBTUBUFPGFYFDVUJPOBUBOZQPJOUJOUJNFJO$1ZUIPO 1SPDFTT 5ISFBE
5ISFBE 5ISFBE SVO BXBJU BXBJU SVO BXBJU SVO SVO SVO BXBJU BXBJU SVO "DRVJSF-PDL
8IZ(*- • 5ISFBETJOQSPDFTTVTFTTBNFNFNPSZTQBDF • (*-XBTDIPTFOUPQSPUFDUUIFJOUFSOBMNFNPSZVTFECZ UIFJOUFSQSFUFS QSPDFTT UISFBE UISFBE .FNPSZ4QBDF
*OXIBUTJUVBUJPOTJTUISFBEJOH FGGFDUJWF • 5BTLTXIJDIJT*0 CPVOETVDIBT • SFBEXSJUFGJMFT • %#DPOOFDUJPO •
%PXOMPBEEBUBGSPN/8 1SPDFTT 5ISFBE 5ISFBE 5ISFBE SVO BXBJU BXBJU SVO BXBJU SVO SVO SVO BXBJU BXBJU SVO "DRVJSF-PDL
*OXIBUTJUVBUJPOTJTUISFBEJOH FGGFDUJWF • 5BTLTXIJDIJT*0 CPVOETVDIBT • SFBEXSJUFGJMFT • %#DPOOFDUJPO •
%PXOMPBEEBUBGSPN/8 1SPDFTT 5ISFBE 5ISFBE 5ISFBE SVO BXBJU BXBJU SVO BXBJU SVO SVO SVO *0 BXBJU SVO "DRVJSF -PDL *0 *0 *0 VTF$16 EPOPUVTF$16
NVMUJQSPDFTTJOH •NVMUJQSPDFTTJOHTQBXOTQSPDFTTFTGPS QBSBMMFMJ[BUJPO •QBSBMMFMJ[FJOCPUIMPDBMBOESFNPUF .BJO1SPDFTT $IJME1SPDFTT $IJME1SPDFTT
NVMUJQSPDFTTJOH • FBDIQSPDFTTFTIBTJUTPXONFNPSZTQBDF • /PUBGGFDUFECZ(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PCKFDUT EBTLBSSBZ EBTLEBUBGSBNF EBTLCBH BOE"1*T
• 4DIFEVMFSJTDVTUPNJ[BCMFUPHFUHPPEQFSGPSNBODFGPS CPUIGPSQBSBMMFMQSPDFTTJOHPOMPDBMNBDIJOFBOEGPS EJTUSJCVUFEQSPDFTTJOHPODMVTUFS • )BTHPPE8FC*OUFSGBDFGPSSFBMUJNFKPCNPOJUPSJOH
%BTL TDIFEVMFS http://docs.dask.org/en/latest/scheduling.html
%BTL 8FC*OUFSGBDF
*OXIBUTJUVBUJPOTJT%BTL FGGFDUJWF • 8IFOXFXBOUUPQBSBMMFMJ[F/VN1ZPSQBOEBTQSPDFTTJOH • 8IFOUIFEBUBTJ[FGJUTPOFUP NBDIJOFT
1Z4QBSL • CVJMEJO+BWBBOEIBT1ZUIPO*OUFSGBDF • DBOCFNPSFTDBMFPVUUIBODFMFSZBOEEBTL • 0SJHJOBMMZCVJMUUPSVOPOB)BEPPQDMVTUFS • GBTUBOEDPTUFGGJDJFOUQSPDFTTJOH •
)BTHPPE8FC*OUFSGBDFGPSSFBMUJNFKPCNPOJUPSJOH • NVMUJGVODUJPOBM • TUSFBN "1* • NBDIJOFMFBSOJOH"1* • DBOCFVTFJONBOBHFNFOUTFSWJDFJODMPVETFSWJDF
1Z4QBSL • CVJMEJO+BWBBOEIBT1ZUIPO*OUFSGBDF only with partial API
1Z4QBSL • DBOCFNPSFTDBMFPVUUIBODFMFSZBOE%BTL node number 1 4-5 thousands
*OXIBUTJUVBUJPOTJT1Z4QBSL FGGFDUJWF • 8IFOXFXBOUUPSVODPNQMFYUBTLTXJUIBMBSHFBNPVOU PGEBUB • 8IFOXFIBWF)BEPPQDMVTUFS
4VNNBSZ • &YQMBJOFEBCPVUUIFEJGGFSFODFPG DPODVSSFOUQBSBMMFMEJTUSJCVUFEQSPDFTTJOH •*OUSPEVDFEUIFBSDIJUFDUVSFPG QBSBMMFMEJTUSJCVUFE QSPDFTTJOHMJCSBSJFT
DPVMEO`UJOUSPEVDF • BTZODJP • DPODVSSFOUGVUVSF • "OPUIFSUIJSEQBSUZMJCSBSJFT
%PObUCFBGSBJEUPVTFQBSBMMFM QSPDFTTJOHNPSF
2VFTUJPO