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
150
eBPF with PHPをさわる
第172回PHP勉強会@東京で発表したスライドです。
chiroruxx
January 29, 2025
Tweet
Share
More Decks by chiroruxx
See All by chiroruxx
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
84
Laravelのパッケージ全部紹介する
chiroruxx
2
63
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
20
PHPをGoで動かす
chiroruxx
0
73
Goを使ってTDDを体験しよう!
chiroruxx
1
810
今ならできる!PhpStormプラグイン開発
chiroruxx
0
71
Go Connectへの想い
chiroruxx
0
200
sl完全に理解したつもり
chiroruxx
0
140
命名をリントする
chiroruxx
1
950
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
130
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
Evolving SEO for Evolving Search Engines
ryanjones
0
110
The Art of Programming - Codeland 2020
erikaheidi
57
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Building the Perfect Custom Keyboard
takai
2
680
For a Future-Friendly Web
brad_frost
182
10k
Typedesign – Prime Four
hannesfritz
42
2.9k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
110
Design in an AI World
tapps
0
140
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
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/