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
2.5k
0
Share
狂気!AWS CloudShell細胞分裂!
2020/12/29 AWS CloudShell おもしろ選手権で発表した内容です。
https://connpass.com/event/199259/
greymd
December 29, 2020
More Decks by greymd
See All by greymd
Breaking Through Firewalls with Shell-gei
greymd
0
110
シェル芸人に必要なのは「マスキングテープ」だったのでは
greymd
19
11k
毎日叩ける シェル芸を覚えよう!
greymd
4
4.5k
入門Cureutils
greymd
3
2.6k
Other Decks in Technology
See All in Technology
AI와 협업하는 조직으로의 여정
arawn
0
430
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.1k
明日からドヤれる!超マニアックなAWSセキュリティTips10連発 / 10 Ultra-Niche AWS Security Tips
yuj1osm
0
590
昔はシンプルだった_AmazonS3
kawaji_scratch
0
330
Rebirth of Software Craftsmanship in the AI Era
lemiorhan
PRO
4
2k
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
2
900
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
16k
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
ハーネスエンジニアリングをやりすぎた話 ~そのハーネスは解体された~
gotalab555
4
1.7k
ARIA Notifyについて
ryokatsuse
1
120
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
150
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
360
Featured
See All Featured
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
890
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
310
Docker and Python
trallard
47
3.8k
From π to Pie charts
rasagy
0
160
The Invisible Side of Design
smashingmag
303
52k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
280
Prompt Engineering for Job Search
mfonobong
0
270
Claude Code のすすめ
schroneko
67
220k
Fireside Chat
paigeccino
42
3.9k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.9k
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