@kai_infra | IT Infrastructure Engineer (@sideb_01) header
@kai_infra | IT Infrastructure Engineer (@sideb_01) profile picture

IT Infrastructure Engineer 🇯🇵 Linux | Oracle | Virtualization | Storage | Apache/Tomcat | Cloud Sharing Linux internals, performance & troubleshooting tips in

東京
Joined May 2022
Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)Photo by @kai_infra | IT Infrastructure Engineer (@sideb_01)
SIerで働いているITインフラエンジニアです。 Linux / ITインフラを「図解」で発信しています。 主なテーマは、 Linux / CPU / Memory / I/O / Network / DB / Middleware / Virtualization。 トラブルシューティングや性能解析など、現場で役立つ知識を中心にまとめています。 「知っている」から「説明できる」へ。 皆さんと一緒に楽しくスキルアップしていけたら嬉しいです! 📝 Blog eeengineer.com/ 📚 Kindle|Linux技術書 amazon.co.jp/stores/author/B… ✅ Habicheck|習慣管理アプリ habicheck.eeengineer.com/ #Linux #インフラエンジニア #Troubleshooting
🤖 Made with AI
2
6
1
77
3,508
Are you using the right performance tests? ① Load: Normal traffic ② Peak: Expected maximum ③ Stress: Find limits ④ Spike: Sudden surges ⑤ Soak: Long-term stability ⑥ Failure: Test failover More Details👇 eeengineer.com/en/web-perfor… #PerformanceTesting #WebPerformance
1
7
411
How do you find high-load SQL in PostgreSQL? 🔍 pg_stat_statements lets you compare: • calls : execution count • total_exec_time : cumulative execution time • mean_exec_time : average time per execution Details👇 eeengineer.com/en/database-p… #PostgreSQL #SQL #Database
2
303
Why can retries make an overloaded system even worse? Fixed-interval retries can cause many clients to retry at the same time. Exponential backoff increases the delay, while jitter adds randomness to reduce synchronized retries. More👇 eeengineer.com/en/prevent-we… #Performance #SRE
1
4
343
What makes G1 GC different from other Java garbage collectors? ① Regions: Divides the heap into regions ② Concurrent Marking: Identifies live objects while the app runs ③ Mixed GC: Collects young and selected old regions Details👇 eeengineer.com/en/jvm-perfor… #Java #JVM #G1GC
How does Tomcat handle incoming HTTP requests? Here's the NIO Connector flow: ① SYN Queue ② Accept Queue ③ Acceptor Thread ④ Connection Management ⑤ Poller Thread ⑥ Worker Thread Pool Each stage has a different role. More👇 eeengineer.com/en/tomcat-per… #Tomcat #Java #Linux
1
2
6
502
How does Tomcat handle incoming HTTP requests? Here's the NIO Connector flow: ① SYN Queue ② Accept Queue ③ Acceptor Thread ④ Connection Management ⑤ Poller Thread ⑥ Worker Thread Pool Each stage has a different role. More👇 eeengineer.com/en/tomcat-per… #Tomcat #Java #Linux
1
2
1
15
1,341
Oracle DatabaseでUPDATEを実行すると、内部では何が起きる? ① UNDOで更新前の情報を保持 ② Data Blockを変更(Dirty Buffer) ③ REDOで変更履歴を記録 ④ COMMIT時にLGWRがREDOを書き込む ⑤ DBWnは独立してDatafileへ書き込む 詳細は以下👇 eeengineer.com/oracle-databa… #Oracle #Database
Oracle DatabaseのDirty Bufferは、いつDatafileに書き込まれる? UPDATEなどで変更されたData Blockは、まずDatabase Buffer Cache上でDirty Bufferになります。 DBWnが書き込む主なタイミングは主に3つ。 ① 再利用可能なBufferの不足 ② Checkpointの進行 ③ 定期的な書き込み処理 COMMIT時に必ずDatafileへ書き込まれるわけではありません。 詳しくは以下のブログを参照ください👇 eeengineer.com/oracle-databa… #Oracle #Database #インフラエンジニア
1
15
615
ApacheのMPM、Prefork・Worker・Eventの違いを説明できますか? ① Prefork:Process単位で接続を処理 ② Worker:複数Threadで並列処理 ③ Event:Keep-Alive待機中のThread占有を削減 特に重要なのは、待機接続の扱い方です。 詳細は以下👇 eeengineer.com/apache-perfor… #Apache #Linux #インフラ
Apacheの性能チューニング、考え方を整理できていますか? Requestが増えたときの流れを頭に入れてチューニングすることが大切です。 ①Request増加 ②BusyWorkers増加 ③MaxRequestWorkers付近まで使用 ④新しいRequestをすぐ処理できない ⑤accept待ちのConnectionが増加 ⑥後段のTomcat / DBも影響 ⑦Response Time悪化・Timeout・接続失敗 Apacheだけでなく、「どこで待ちが発生しているか」をEnd-to-Endで見ることが重要です。 詳しくはブログで👇 eeengineer.com/apache-perfor… #Apache #Linux #性能チューニング #インフラエンジニア #トラブルシューティング
4
17
649
Why does response time increase so sharply as CPU utilization approaches 100%? The M/M/1 queueing model explains why. With a 10 ms average service time: • 50% utilization → 20 ms • 80% → 50 ms • 90% → 100 ms • 95% → 200 ms More👇 eeengineer.com/en/web-perfor…
2
1
5
332
What's the difference between fork() and exec() in Linux? ① fork(): Creates a child process with a new PID. ② exec(): Replaces the current program without changing its PID. Key point: fork() uses Copy-on-Write (CoW) to share memory efficiently. #Linux #LinuxKernel
What actually happens when Linux executes read() and write()? The key is the Page Cache. For read(): Application → Page Cache Cache Hit → data can be returned from memory Cache Miss → read from storage → load into Page Cache → return data For write(): Application → Page Cache → Dirty Page → Writeback → Storage A normal buffered write can complete after updating the Page Cache, while the actual storage writeback happens later. I explain Linux I/O internals with diagrams on my kindle book. amazon.com/dp/B0HP6DWQ82 #Linux #LinuxKernel #PageCache #IO #Storage #PerformanceEngineering #OperatingSystems
3
18
724
Linuxの「Anonymous Page(匿名ページ)」って何か説明できますか? ファイルに直接紐づかないメモリページのことです。 代表例は以下の3つ ① Heap:Javaオブジェクト、malloc ② Stack:関数呼び出し、ローカル変数 ③ 匿名マッピング:MAP_ANONYMOUS #Linux #メモリ管理 #インフラ
Swapされるのは、すべてのページではありません。 Linuxはメモリ不足になると、元データがない「Anonymous Page」をSwap領域へ退避させ、物理メモリを確保します。 一方、File-backed Pageは元ファイルを再読み込みできるため、ページキャッシュを解放するだけで対応できます。 「どのページを解放するか」を使い分けることで、限られた物理メモリを効率よく活用しているのがLinuxの特徴です。 eeengineer.com/linux-swap/ #Linux #LinuxKernel #インフラエンジニア #OSS #メモリ管理
3
13
852
How does Linux build an Ethernet frame? ① Look up the route ② Determine the next-hop IP ③ Resolve its MAC via ARP/NDP ④ Build the Ethernet frame More details👇 eeengineer.com/en/linux-pack… #Linux #Networking #TCPIP
What does a Linux NIC driver actually do? It bridges the kernel's network stack and NIC hardware. Key functions: ① Register access ② Descriptor rings ③ DMA mapping ④ Interrupt handling ⑤ Offload settings ⑥ Link-state monitoring More details👇 eeengineer.com/en/linux-nic-…
1
1
34
1,070
Oracle DatabaseのBuffer Cache、Clean BufferとDirty Bufferの違いを理解してますか? Data Blockの変更でDirtyになったBufferは、すぐDatafileへ書かれるわけではない Dirty Buffer → Write Queue → DBWn → Datafile 書き込み後はCleanとなり再利用される 詳細は以下 eeengineer.com/oracle-databa…
Oracle DatabaseのDirty Bufferは、いつDatafileに書き込まれる? UPDATEなどで変更されたData Blockは、まずDatabase Buffer Cache上でDirty Bufferになります。 DBWnが書き込む主なタイミングは主に3つ。 ① 再利用可能なBufferの不足 ② Checkpointの進行 ③ 定期的な書き込み処理 COMMIT時に必ずDatafileへ書き込まれるわけではありません。 詳しくは以下のブログを参照ください👇 eeengineer.com/oracle-databa… #Oracle #Database #インフラエンジニア
6
385
What does a Linux NIC driver actually do? It bridges the kernel's network stack and NIC hardware. Key functions: ① Register access ② Descriptor rings ③ DMA mapping ④ Interrupt handling ⑤ Offload settings ⑥ Link-state monitoring More details👇 eeengineer.com/en/linux-nic-…
How does Linux process an incoming network packet? The kernel processes it layer by layer: ① Ethernet (L2): MAC & EtherType ② IP (L3): IP addresses & protocol ③ TCP/UDP (L4): Ports & transport data ④ Socket: Receive buffer More details👇 eeengineer.com/en/linux-netw… #Linux #TCP
1
6
1
25
2,068
What actually happens when Linux boots? UEFI → GRUB2 → Kernel → initramfs → systemd Each stage plays a different role. Visual guide + real AlmaLinux 9 boot logs👇 eeengineer.com/en/linux-boot… CPU Internal👇 amazon.in/Linux-CPU-Internal… #Linux #RHEL #SRE
2
29
127
2,828
What happens after an app sends data on Linux? Application → TCP/IP → qdisc → Driver → TX Ring → NIC qdisc queues and schedules packets, controls bandwidth, and may drop packets when queues fill. More details👇 eeengineer.com/en/linux-netw… #Linux #Networking #TCP
How does Linux process an incoming network packet? The kernel processes it layer by layer: ① Ethernet (L2): MAC & EtherType ② IP (L3): IP addresses & protocol ③ TCP/UDP (L4): Ports & transport data ④ Socket: Receive buffer More details👇 eeengineer.com/en/linux-netw… #Linux #TCP
1
3
383
qdisc stands for Queueing Discipline. It can handle: • Queueing • Scheduling • Bandwidth shaping • Packet dropping/marking When packets accumulate in qdisc, queueing delay increases. If the queue reaches its limit, packets may be dropped.
1
132
How does Linux process an incoming network packet? The kernel processes it layer by layer: ① Ethernet (L2): MAC & EtherType ② IP (L3): IP addresses & protocol ③ TCP/UDP (L4): Ports & transport data ④ Socket: Receive buffer More details👇 eeengineer.com/en/linux-netw… #Linux #TCP
Why does TCP stop sending data even when the network isn't congested? The answer is Flow Control. TCP uses the receiver's advertised window (rwnd) to prevent its receive buffer from overflowing. Here's how it works👇 eeengineer.com/en/how-tcp-wo… #Linux #TCP #Networking
1
2
2
15
1,955
Why does TCP stop sending data even when the network isn't congested? The answer is Flow Control. TCP uses the receiver's advertised window (rwnd) to prevent its receive buffer from overflowing. Here's how it works👇 eeengineer.com/en/how-tcp-wo… #Linux #TCP #Networking
2
6
1
28
1,723
システムの性能問題が発生したとき、皆さんはどのような手順で調査していますか? 性能分析の手法としてUSEやREDなどはありますが、性能問題発生時のEnd-to-Endの調査フローは、あまり標準化されていない印象がありましたので、自分なりに5ステップで整理してみました。 ① 事象・影響範囲の把握 ② サービス性能の確認(RED) ③ 各レイヤーの一次切り分け ④ ボトルネックの詳細分析(USEなど) ⑤ 仮説検証・原因特定 皆さんの現場では、どんな流れで性能問題を調査しているか、教えてもらえると嬉しいです。 詳細は以下に記載したので、合わせて見てみてください。 eeengineer.com/system-perfor… #システム性能 #トラブルシューティング #Linux #インフラエンジニア
Webサービスの性能を見るとき、Latencyだけを見ていませんか? 「遅くなった」という事象を捉えるには、 どれだけ処理しているのか? どれだけ失敗しているのか? どれだけ時間がかかっているのか? をセットで見ることが重要です。 そこで役立つのが REDメソッドです。 R:Rate → 単位時間あたりのRequest数(RPS) E:Errors → 失敗したRequestの数・割合 D:Duration → Requestの処理時間(平均・p95・p99など) Rate・Errors・Durationを並べて見ることで、サービスの状態を整理しやすくなります。 詳細は以下も合わせて参照ください👇 eeengineer.com/linux-perform… #Linux #LinuxPerformance #PerformanceEngineering #Observability #REDMethod #WebApplication
1
17
686
Linuxサーバー間のネットワーク性能、どうやって測定していますか? 便利なのが「iperf3」です。 2台のサーバー間でTCP/UDP通信を発生させ、以下を測定できます。 ✅ Throughput:実効通信速度 ✅ Retr:TCP再送回数 ✅ Jitter / Loss:UDPの揺らぎ・損失 特に役立つのが、性能トラブル時の切り分けです。 例えば、アプリの通信が遅い場合、iperf3でサーバー間の転送性能を測定することで、ネットワーク側にボトルネックがあるかを調べる手掛かりになります。 #Linux #iperf3 #Network #インフラエンジニア
性能試験、いきなり測定していませんか? 性能は試験開始直後と一定時間経過後で変わることがあります。 特に、 ・Cacheのウォームアップ ・JVMのJIT最適化 ・Connection確立 などの影響には注意が必要です。 そのため性能試験では、 Ramp-up → Warm-up → Measurement → Ramp-down とフェーズを分けて考えることが重要です。 #性能試験 #パフォーマンス #Linux #インフラエンジニア
1
6
84
3,650