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
eBPF with PHPをさわる
Search
chiroruxx
January 29, 2025
0
120
eBPF with PHPをさわる
第172回PHP勉強会@東京で発表したスライドです。
chiroruxx
January 29, 2025
Tweet
Share
More Decks by chiroruxx
See All by chiroruxx
Go Connectへの想い
chiroruxx
0
170
sl完全に理解したつもり
chiroruxx
0
110
命名をリントする
chiroruxx
1
800
良い命名かを調べるリンターを作った + α
chiroruxx
0
120
GoLandを布教する会
chiroruxx
0
38
PHPはいつから死んでいるかの調査
chiroruxx
3
650
元phperから見たGoの良いところ
chiroruxx
0
95
Go Connectへの想い
chiroruxx
0
490
GraphQLに入門してみた
chiroruxx
2
350
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
4 Signs Your Business is Dying
shpigford
184
22k
Writing Fast Ruby
sferik
628
62k
The Cult of Friendly URLs
andyhume
79
6.5k
Building Applications with DynamoDB
mza
95
6.5k
Rails Girls Zürich Keynote
gr2m
95
14k
Thoughts on Productivity
jonyablonski
69
4.7k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.2k
Producing Creativity
orderedlist
PRO
346
40k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Transcript
eBPF with PHP をさわる 2025/01/29 第172回PHP勉強会@東京
自己紹介 ちひろ 株式会社モリサワ X: @chiroruxxxx
はじめに エンジニアが「システムを作ること」が価値になる時代は 終わりつつある? AI・ノーコード・ローコードの出現 小学生でもブログやゲームサーバを作れる 「システムが動き続けること」は引き続き価値になる
事業会社はもちろん 受託開発でもワンストップ化が進んでいる DevOps・SRE エンジニアが開発もするし、運用もする 開発の段階から運用・監視を作り込む ということで運用監視に近い話をするぞ
eBPF
eBPF Linuxの機能で、カーネルのイベントをフックして簡単なプ ログラムを実行する機能 Macでは動きません WSLでは・・・どうなんだろう HyperVにくわしくない
Docker on Macではうまく動かなかった おま環の可能性もある だがカーネルのイベントなんていう低レイヤーはさわりたく ない そこでUSDT!!
USDT User Statically-Defined Tracing DTrace用にイベントを発火する機能 eBPFのイベントフックに利用できる
もちろんPHPにもある
PHPとUSDT
どういうこと だってばよ PHP eBPF 処理 処理 処理 処理 イベント イベント
イベント
デモ やってみよう
デモが できなかった とき用
デモが できなかった とき用
デモが できなかった とき用
何が嬉しい? PHPのコードを汚さずにPHPの動作を取得できる PHPからログを出そうとすると、プログラムを修正する必要が ある ステージング環境でのバグ調査に便利か? プロダクションだと取得したデータをどこかに送るくらい?
Linuxの機能かつ非同期なのでオーバーヘッドが少ない 他のミドルウェアをまたいだ解析に memcachedやMySQLにもUSDTがある
何が嬉しい? オレオレAPMとかも作れるか? リクエストごとにプロセスが立てばいけそう? APMのお金が払えないときとか・・・
肌感 わからん でも何かに使えそうな雰囲気はある ワークショップに参加すれば何かわかるかもしれない
ピセカ 2/8(土)
参考 「eBPF+USDTでphpをトレースしてみる、bpftraceと RbBCCでやる」 https://dasalog.hatenablog.jp/entry/2020/04/30/094503 「超入門 よかBPF for
PHPer」 https://udzura.jp/slides/2024/phpconfuk2024-preevent/