Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
eBPF with PHPをさわる
Search
chiroruxx
January 29, 2025
220
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
eBPF with PHPをさわる
第172回PHP勉強会@東京で発表したスライドです。
chiroruxx
January 29, 2025
Transcript
17 slides
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/
More Decks by chiroruxx
See All by chiroruxx
Contextとはなにか
chiroruxx
1
530
初心者エンジニアから中級者エンジニアになるためにオススメの1冊
chiroruxx
0
170
Laravelのパッケージ全部紹介する
chiroruxx
2
220
Gopher のための「自由な話し合い」ワークショップ
chiroruxx
0
65
PHPをGoで動かす
chiroruxx
0
130
Goを使ってTDDを体験しよう!
chiroruxx
1
1.5k
今ならできる!PhpStormプラグイン開発
chiroruxx
0
140
Go Connectへの想い
chiroruxx
0
250
sl完全に理解したつもり
chiroruxx
0
200
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
3
940
The Mindset for Success: Future Career Progression
greggifford
PRO
0
560
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
520
Making the Leap to Tech Lead
cromwellryan
135
10k
Chasing Engaging Ingredients in Design
codingconduct
0
390
Practical Orchestrator
shlominoach
192
12k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
121
130k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.7k
How to Ace a Technical Interview
jacobian
280
24k
4 Signs Your Business is Dying
shpigford
187
23k