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
狂気!AWS CloudShell細胞分裂!
Search
greymd
December 29, 2020
Technology
0
2.4k
狂気!AWS CloudShell細胞分裂!
2020/12/29 AWS CloudShell おもしろ選手権で発表した内容です。
https://connpass.com/event/199259/
greymd
December 29, 2020
Tweet
Share
More Decks by greymd
See All by greymd
Breaking Through Firewalls with Shell-gei
greymd
0
65
シェル芸人に必要なのは「マスキングテープ」だったのでは
greymd
19
11k
毎日叩ける シェル芸を覚えよう!
greymd
4
4.4k
入門Cureutils
greymd
3
2.5k
Other Decks in Technology
See All in Technology
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
1
170
Node-REDのFunctionノードでMCPサーバーの実装を試してみた / Node-RED × MCP 勉強会 vol.1
you
PRO
0
110
Oracle Audit Vault and Database Firewall 20 概要
oracle4engineer
PRO
3
1.7k
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
140
登壇ネタの見つけ方 / How to find talk topics
pinkumohikan
5
500
フィンテック養成勉強会#54
finengine
0
180
HiMoR: Monocular Deformable Gaussian Reconstruction with Hierarchical Motion Representation
spatial_ai_network
0
110
Postman AI エージェントビルダー最新情報
nagix
0
110
生成AI時代の開発組織・技術・プロセス 〜 ログラスの挑戦と考察 〜
itohiro73
1
220
本が全く読めなかった過去の自分へ
genshun9
0
470
Javaで作る RAGを活用した Q&Aアプリケーション
recruitengineers
PRO
1
110
Github Copilot エージェントモードで試してみた
ochtum
0
110
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
How to Think Like a Performance Engineer
csswizardry
24
1.7k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
Raft: Consensus for Rubyists
vanstee
140
7k
Automating Front-end Workflow
addyosmani
1370
200k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Site-Speed That Sticks
csswizardry
10
660
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Music & Morning Musume
bryan
46
6.6k
Transcript
狂気!AWS CloudShell細胞分裂! grethlen 2020/12/29 AWS CloudShell おもしろ選⼿権
$ whoami ぐれさん Twitter: @grethlen GitHub: @greymd シェル芸⼈ ↓ の作者
tmux 使ってますか? tmux on AWS Cloud9 の Terminal では残念な状態 CloudShellではなんとデフォルトで⼊っている!
分割してもレイアウト崩れず どんどん使えという中の⼈のメッセージと理解
tmux-xpanes tmuxの端末分割を超絶楽にできる xpanes コマンド Bash 3.2〜5.xで動く超ポータブルコマンド 私が作者です(GitHub:greymd/tmux-xpanes) EPEL登録済み、ぜひ御社でも CloudShellでもこの通り $
sudo amazon-linux-extras install epel -y $ sudo yum install xpanes -y ### 必要なら HOME 以下に退避 $ cp /usr/bin/xpanes ~
デモ
何分割できるのか?
制限 tmux 当然、1(⾏ or ⽂字)より低い幅はできない CloudShellの制限はあるか? 端末サイズは上限なさそう ウィンドウを⼤きくすると stty size
も⼤きくなる ulimit の max user processes は無制限( unlimited ) = コンテナのリソースが許す限り分割できそう
何プロセスくらい⾛るのか(1/2) 端末1: $ yes 'sleep 1000 &' | sh 端末2:
$ ps ax | nl 8,600 プロセスくらいまでsleepは動かせた それ以上では動作が重すぎて話にならず( ps すら⽌まる) 数千のオーダーで性能限界が来るっぽい
何プロセスくらい⾛るのか(2/2) 皆さんの関⼼ => ⼀般的なユースケースのコマンドがどれくらい並列で使えるか ssh セッションマネージャ ojichat $ xpanes -sc
ojichat {1..100} => ojichatを 100 分割して実⾏
デモ2
ちなみに セッションマネージャは40分割での利⽤くらいが限度でした
結論 CloudShellは並列作業に便利! tmux と xpanes が使える 端末サイズとコンテナのリソースが許す限り画⾯分割して動かせる ただし……そこそこの処理をするコマンドの動作は分割しすぎると苦しい 数⼗程度の規模が限度 AWS
CLI + セッションマネージャ: 40分割〜あたりからプロセスが落ちる ojichat: 100 を超えると動作が極めて遅い上に精神的にも⾟い
END