<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jakson Tate</title>
    <description>The latest articles on DEV Community by Jakson Tate (@jaksontate).</description>
    <link>https://dev.to/jaksontate</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3844606%2F248b4fa0-86c4-40f6-9b8d-d410fdbb9e72.jpeg</url>
      <title>DEV Community: Jakson Tate</title>
      <link>https://dev.to/jaksontate</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaksontate"/>
    <language>en</language>
    <item>
      <title>The OpenTelemetry K8s Cost Trap (And How to Fix It)</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 03 Sep 2026 06:11:30 +0000</pubDate>
      <link>https://dev.to/jaksontate/the-opentelemetry-k8s-cost-trap-and-how-to-fix-it-4mm2</link>
      <guid>https://dev.to/jaksontate/the-opentelemetry-k8s-cost-trap-and-how-to-fix-it-4mm2</guid>
      <description>&lt;p&gt;You instrumented your applications correctly, adopted OpenTelemetry (OTel), and finally achieved end-to-end tracing across your microservices. The engineering team is thrilled. Then, Finance forwards you the monthly cloud invoice, and the CTO demands a meeting. Your observability costs have surged 10x in a single month.&lt;/p&gt;

&lt;p&gt;What happened? The truth about OpenTelemetry in Kubernetes is that while the OTel software is open-source and free, the infrastructure required to transport and store the telemetry is not. When you combine the explosive data volume of OTel auto-instrumentation with the rapid churn of Kubernetes autoscaling, you create a perfect financial storm.&lt;/p&gt;

&lt;p&gt;Here is an SRE/FinOps breakdown exposing hidden cloud network taxes, metric cardinality explosions, distributed trace sampling bugs, and how to fix them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: HPA and The Cardinality Explosion
&lt;/h2&gt;

&lt;p&gt;When investigating why observability SaaS bills (like Datadog or Splunk) explode, Kubernetes clusters often reveal a hidden culprit: the Horizontal Pod Autoscaler (HPA). As traffic spikes, your HPA rapidly spins up dozens of new pods, and then destroys them when traffic subsides.&lt;/p&gt;

&lt;p&gt;Vendors charge heavily for Custom Metrics based on "Cardinality" (the number of unique metric combinations). Every time HPA creates a new pod, it generates ephemeral labels like &lt;code&gt;k8s.pod.uid&lt;/code&gt; or dynamic &lt;code&gt;k8s.pod.name&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;The OTTL Context Blindspot:&lt;/strong&gt; These labels are Resource Attributes, not Datapoint Attributes. If you try to strip them using &lt;code&gt;context: datapoint&lt;/code&gt; in your OpenTelemetry Transformation Language (OTTL) configuration, it will silently fail.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The SRE Fix
&lt;/h3&gt;

&lt;p&gt;Filter high-cardinality attributes at the OTel Collector using the &lt;code&gt;resource&lt;/code&gt; context before exporting metrics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;transform/metrics&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;error_mode&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ignore&lt;/span&gt;
    &lt;span class="na"&gt;metric_statements&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;resource&lt;/span&gt; &lt;span class="c1"&gt;# CRITICAL: You must use 'resource' context for K8s pod labels!&lt;/span&gt;
        &lt;span class="na"&gt;statements&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="c1"&gt;# Strip ephemeral pod identifiers before export to prevent billing spikes&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;delete_key(attributes, "k8s.pod.uid")&lt;/span&gt;
          &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;delete_key(attributes, "k8s.pod.name")&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: The Stealth Egress Tax (NAT &amp;amp; Cross-AZ)
&lt;/h2&gt;

&lt;p&gt;The most devious OpenTelemetry Kubernetes cost trap doesn't come from your observability vendor. It comes directly from AWS, Azure, or GCP. Cloud providers charge heavily for data leaving their network or moving between boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Cross-AZ Penalty:&lt;/strong&gt; A best-practice OTel architecture uses Edge DaemonSets that forward data to a centralized Gateway Collector. If a DaemonSet in &lt;code&gt;us-east-1a&lt;/code&gt; sends 5TB of traces to a Gateway in &lt;code&gt;us-east-1b&lt;/code&gt;, cloud providers charge ~$0.01/GB in &lt;em&gt;both&lt;/em&gt; directions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The NAT Gateway Processing Fee:&lt;/strong&gt; If your Kubernetes cluster sits in a private subnet, sending telemetry to a public SaaS backend requires passing through a NAT Gateway. You pay $0.045/GB for NAT processing &lt;strong&gt;PLUS&lt;/strong&gt; $0.09/GB for Internet Egress.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The Reality:&lt;/strong&gt; You are paying &lt;strong&gt;~$0.135 per GB&lt;/strong&gt; just to move your own data, before your vendor even bills you for ingestion!&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 3: Fixing the Sampling Blindspot
&lt;/h2&gt;

&lt;p&gt;To survive egress taxes, you must aggressively reduce trace volume before it leaves your cluster. However, defaulting to Head-Based Sampling randomly drops traces at inception, destroying 90% of your critical P99 ERROR traces. You must use &lt;strong&gt;Tail-Based Sampling&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;The Multi-Replica Topology Error:&lt;/strong&gt; Tail sampling requires the processor to evaluate the complete trace. If you run multiple OTel Gateway Pods, Span 1 might hit Gateway A, and Span 2 might hit Gateway B. The tail sampling logic gets confused and drops critical error traces.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The SRE Cure
&lt;/h3&gt;

&lt;p&gt;Deploy a Load Balancing Exporter on your Edge Agents (DaemonSets) with &lt;code&gt;routing_key: "traceID"&lt;/code&gt;. This ensures all spans of the same trace reliably hit the exact same Gateway replica where the tail-sampling processor lives.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 1. Edge Agent (DaemonSet) Configuration&lt;/span&gt;
&lt;span class="na"&gt;exporters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;loadbalancing&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;routing_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;traceID"&lt;/span&gt; &lt;span class="c1"&gt;# Ensure all spans for a trace reach the same Gateway replica&lt;/span&gt;
    &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;otlp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;endpoint&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;http&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;//gateway-service.observability.svc.cluster.local&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;4317&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;&lt;span class="s"&gt;(http://gateway-service.observability.svc.cluster.local:4317)&lt;/span&gt;

&lt;span class="c1"&gt;# ----------------------------------------------------&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Gateway Collector Configuration&lt;/span&gt;
&lt;span class="na"&gt;processors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;tail_sampling&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;decision_wait&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt; &lt;span class="c1"&gt;# Buffer time to wait for trace completion&lt;/span&gt;
    &lt;span class="na"&gt;num_traces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100000&lt;/span&gt; &lt;span class="c1"&gt;# Memory sizing (Monitor OOM kills!)&lt;/span&gt;
    &lt;span class="na"&gt;policies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="c1"&gt;# Policy 1: Always keep 100% of Errors&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;keep-errors&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;status_code&lt;/span&gt;
        &lt;span class="na"&gt;status_code&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;status_codes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;ERROR&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="c1"&gt;# Policy 2: Sample only 5% of healthy normal traffic&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sample-healthy&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;probabilistic&lt;/span&gt;
        &lt;span class="na"&gt;probabilistic&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;sampling_percentage&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 4: Repatriating Observability to Bare Metal
&lt;/h2&gt;

&lt;p&gt;Even with aggressive Tail-Based sampling, high-throughput microservices will still generate terabytes of vital telemetry data. The public cloud billing model fundamentally penalizes you for deeply monitoring your own infrastructure.&lt;/p&gt;

&lt;p&gt;This is why Elite engineering organizations are repatriating heavy observability stacks (Prometheus, Grafana Loki, ClickHouse) to &lt;strong&gt;ServerMO Dedicated Bare Metal Servers&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Zero Egress Fees:&lt;/strong&gt; ServerMO provides Unmetered or massive Flat-Rate Bandwidth. Stream 50TB+ of OpenTelemetry data daily with zero cross-AZ or NAT fees.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free Write IOPS:&lt;/strong&gt; Observability is a 100% write-heavy workload. Cloud providers charge astronomical Provisioned IOPS (e.g., AWS io2) fees for heavy storage writes. ServerMO's direct-attached Enterprise PCIe NVMe drives deliver millions of write IOPS at zero extra cost.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full FinOps guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/blogs/opentelemetry-kubernetes-cost-trap/" rel="noopener noreferrer"&gt;The OpenTelemetry Trap: How K8s Autoscaling Bankrupts Your Cloud Bill | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>opentelemetry</category>
      <category>finops</category>
      <category>devops</category>
    </item>
    <item>
      <title>Fix Kubernetes CPU Throttling &amp; CFS Quotas</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 03 Sep 2026 05:45:34 +0000</pubDate>
      <link>https://dev.to/jaksontate/fix-kubernetes-cpu-throttling-cfs-quotas-137g</link>
      <guid>https://dev.to/jaksontate/fix-kubernetes-cpu-throttling-cfs-quotas-137g</guid>
      <description>&lt;p&gt;The P99 latency alert fires while Grafana reports 20% CPU usage. Welcome to &lt;strong&gt;Kubernetes CPU throttling&lt;/strong&gt;, where Linux CFS Quotas forcibly freeze containers in microscopic 100ms windows despite low average usage.&lt;/p&gt;

&lt;p&gt;Here is the complete SRE blueprint to detect micro-freezes, tune runtimes, and bypass CFS limits using bare-metal static core pinning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: The Dashboard Illusion (100ms CFS Quota)
&lt;/h2&gt;

&lt;p&gt;Standard CPU metrics average usage over 1 to 5 minutes, hiding microscopic kernel freezes. Kubernetes CPU limits are actively enforced by the Linux kernel's Completely Fair Scheduler (CFS) in &lt;strong&gt;100-millisecond windows&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;100m&lt;/code&gt; Limit:&lt;/strong&gt; Grants 10ms of execution time per 100ms window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;500m&lt;/code&gt; Limit:&lt;/strong&gt; Grants 50ms of execution time per 100ms window.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When a bursty, multi-threaded application consumes its 100ms allocation in the first 10ms, &lt;strong&gt;the kernel forcibly freezes the container for the remaining 90ms&lt;/strong&gt;. Your dashboard reports low average CPU usage, but your application was completely dead for 90% of that second.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 2: Detecting Throttling via PromQL
&lt;/h2&gt;

&lt;p&gt;Stop tracking raw CPU usage (&lt;code&gt;container_cpu_usage_seconds_total&lt;/code&gt;). Instead, track the percentage of 100ms windows where the kernel parked your application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Throttling Ratio Query (%)
sum by (namespace, pod, container) (
  rate(container_cpu_cfs_throttled_periods_total{container!="", container!="POD"}[5m])
) 
/ 
sum by (namespace, pod, container) (
  rate(container_cpu_cfs_periods_total{container!="", container!="POD"}[5m])
) * 100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;SRE Rule:&lt;/strong&gt; If this metric exceeds &lt;strong&gt;15–25%&lt;/strong&gt;, your application is suffering from artificial latency spikes caused by cgroup throttling.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 3: Fixing Thread Amplification (JVM &amp;amp; Go)
&lt;/h2&gt;

&lt;p&gt;On a bare-metal node with 64 physical cores, Java and Go runtimes inspect the host OS, detect 64 cores, and spawn 64 Garbage Collection or worker threads. If your container limit is set to 2 vCPUs, all 64 threads wake up simultaneously and burn through your 100ms quota in milliseconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Java / JVM (JDK 11+)
&lt;/h3&gt;

&lt;p&gt;Rely on &lt;code&gt;UseContainerSupport&lt;/code&gt; so the JVM auto-detects container cgroup limits:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;ENV&lt;/span&gt;&lt;span class="s"&gt; JAVA_OPTS="-XX:+UseContainerSupport"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Golang
&lt;/h3&gt;

&lt;p&gt;Import Uber's &lt;code&gt;automaxprocs&lt;/code&gt; library to auto-tune &lt;code&gt;GOMAXPROCS&lt;/code&gt; to cgroup limits rather than host core counts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="s"&gt;"go.uber.org/automaxprocs"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 4: The 2x P99 Right-Sizing Rule
&lt;/h2&gt;

&lt;p&gt;Removing CPU limits entirely leaves nodes vulnerable to CPU Exhaustion DoS attacks and Node Starvation risks. Instead of removing limits, right-size using telemetry:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Measure &lt;strong&gt;P50 (median) CPU usage&lt;/strong&gt; over 7 days $\rightarrow$ Set as &lt;code&gt;requests.cpu&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Measure &lt;strong&gt;P99 (peak burst) CPU usage&lt;/strong&gt; over 7 days $\rightarrow$ Multiply by 2 $\rightarrow$ Set as &lt;code&gt;limits.cpu&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Phase 5: Eradicating Throttling on Bare Metal
&lt;/h2&gt;

&lt;p&gt;Public Cloud VMs suffer from "Double Throttling"—K8s CFS limits combined with Hypervisor Steal Time from noisy neighbors.&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;ServerMO Dedicated Bare Metal&lt;/strong&gt;, enable Kubelet's &lt;code&gt;cpuManagerPolicy: static&lt;/code&gt;. By deploying pods in the &lt;strong&gt;Guaranteed QoS class&lt;/strong&gt; (&lt;code&gt;requests&lt;/code&gt; equal &lt;code&gt;limits&lt;/code&gt; using integer CPU values), Kubernetes completely bypasses the CFS 100ms quota system and pins the container directly to dedicated physical CPU cores.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Pod&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;high-performance-api&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;containers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;api&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;enterprise-api:v1.2&lt;/span&gt;
    &lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;limits&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4"&lt;/span&gt;        &lt;span class="c1"&gt;# Integer value required&lt;/span&gt;
        &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8Gi"&lt;/span&gt;
      &lt;span class="na"&gt;requests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4"&lt;/span&gt;        &lt;span class="c1"&gt;# Must equal limits for Guaranteed QoS&lt;/span&gt;
        &lt;span class="na"&gt;memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8Gi"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;👉 &lt;strong&gt;Read the full SRE guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/fix-kubernetes-cpu-throttling/" rel="noopener noreferrer"&gt;Stop Kubernetes CPU Throttling | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>devops</category>
      <category>sre</category>
      <category>linux</category>
    </item>
    <item>
      <title>What is ECC RAM? True ECC vs DDR5 On-Die &amp; Server Needs</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 03 Sep 2026 05:07:11 +0000</pubDate>
      <link>https://dev.to/jaksontate/what-is-ecc-ram-true-ecc-vs-ddr5-on-die-server-needs-49l7</link>
      <guid>https://dev.to/jaksontate/what-is-ecc-ram-true-ecc-vs-ddr5-on-die-server-needs-49l7</guid>
      <description>&lt;p&gt;Data center engineers share a universal fear: &lt;strong&gt;silent data corruption&lt;/strong&gt;. You can have the fastest NVMe storage and the most powerful CPUs in the world, but if the volatile workspace linking them—your Random Access Memory (RAM)—is flawed, your entire enterprise infrastructure is built on sand.&lt;/p&gt;

&lt;p&gt;Here is a deep dive into cosmic ray bit-flips, 80-bit DDR5 bus math, and why consumer DDR5 "On-Die ECC" fails server workloads.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: What Causes RAM Bit-Flips?
&lt;/h2&gt;

&lt;p&gt;Volatile memory cells hold binary data using tiny electrical charges that can be disrupted by external forces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cosmic Rays (Single-Event Upsets):&lt;/strong&gt; Secondary neutrons from cosmic ray collisions constantly strike silicon chips, altering transistor states and flipping binary &lt;code&gt;0&lt;/code&gt;s to &lt;code&gt;1&lt;/code&gt;s.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Electromagnetic Interference (EMI):&lt;/strong&gt; Signal degradation inside server chassis caused by power supply fluctuations or unshielded components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cell Aging &amp;amp; Thermal Stress:&lt;/strong&gt; High temperatures in 24/7 server environments degrade silicon's ability to retain electrical charge accurately.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 2: How Does ECC RAM Work? (72-Bit vs 80-Bit Bus Math)
&lt;/h2&gt;

&lt;p&gt;Standard non-ECC RAM uses a 64-bit data path and blindly trusts incoming data. True ECC RAM adds dedicated parity pathways.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DDR3/DDR4 True ECC Architecture:
[ 64-bit Data Path ] + [ 8-bit Parity (9th Chip) ] = 72-bit Bus Width

DDR5 True Enterprise ECC Architecture:
[ Channel A: 32-bit Data + 8-bit Parity ] + [ Channel B: 32-bit Data + 8-bit Parity ] = 80-bit Bus Width
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ECC uses &lt;strong&gt;Hamming codes&lt;/strong&gt; to provide &lt;strong&gt;SECDED&lt;/strong&gt; (Single Error Correction, Double Error Detection). When the CPU reads data, the memory controller recalculates the checksum. Single-bit errors are corrected on the fly, while double-bit errors safely halt the system before corrupted data reaches persistent storage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 3: The DDR5 "On-Die" Illusion vs True Side-Band ECC
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;SRE HARDWARE WARNING: The DDR5 Myth&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A dangerous misconception claims that consumer DDR5 has built-in ECC, making server-grade RAM obsolete. &lt;strong&gt;This is false.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As DDR5 memory cells shrank to achieve higher clock speeds, internal silicon bit-flips increased. Manufacturers added &lt;strong&gt;On-Die ECC&lt;/strong&gt; to consumer DDR5 purely to improve silicon manufacturing yields.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On-Die ECC:&lt;/strong&gt; Fixes errors &lt;em&gt;internally&lt;/em&gt; inside the memory chip. Data in transit across the motherboard bus to the CPU remains &lt;strong&gt;100% unprotected&lt;/strong&gt;. It does not log errors to the OS or Baseboard Management Controller (BMC).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;True Side-Band ECC (80-bit RDIMM):&lt;/strong&gt; Provides end-to-end protection for data in transit and logs single-bit errors for predictive failure analysis.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 4: The ZFS Reality (Debunking the Scrub of Death)
&lt;/h2&gt;

&lt;p&gt;A popular myth dictates that bad RAM causes ZFS to execute a "Scrub of Death" that overwrites good disk data with corrupted data. This is false—ZFS checksums protect existing data on disk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The True Danger: Dirty Memory Buffers&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When new data enters RAM (within Dirty Data Buffers or Transaction Groups / TXG) &lt;em&gt;before&lt;/em&gt; ZFS generates its checksum, an uncorrected bit-flip corrupts the payload in memory. ZFS then calculates a valid checksum for the corrupted payload and writes it permanently to storage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 5: Gaming vs Enterprise Performance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Gamers:&lt;/strong&gt; Non-ECC is superior. Overclocked profiles (Intel XMP / AMD EXPO) reach 6000MT/s+ CL30, yielding a 15–20% FPS advantage over JEDEC baseline speeds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Servers:&lt;/strong&gt; Absolute stability is mandatory. Enterprise ECC RDIMMs strictly adhere to baseline JEDEC standards (e.g., 4800MT/s CL40) to guarantee 24/7 reliability.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ECC RAM &amp;amp; Server Reliability FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is DDR5 On-Die ECC the same as True Server ECC?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
No. On-Die ECC only fixes internal silicon errors inside individual memory chips. It does not protect data traveling over the motherboard bus to the CPU. Enterprise servers require True Side-Band ECC (80-bit bus) for end-to-end protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need ECC RAM for ZFS?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes. While the "Scrub of Death" myth is false, non-ECC RAM can flip bits in dirty memory buffers before ZFS generates checksums, causing ZFS to write permanently corrupted data to storage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why don't gaming PCs use ECC RAM?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Enterprise ECC RAM runs at baseline JEDEC speeds and does not support consumer XMP/EXPO overclocking, resulting in lower clock speeds and higher latencies compared to consumer RAM.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/blogs/ecc-ram-ddr5-vs-true-ecc/" rel="noopener noreferrer"&gt;What is ECC RAM? True ECC vs DDR5 On-Die | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>hardware</category>
      <category>sre</category>
    </item>
    <item>
      <title>Model Context Protocol: Setup MCP Server on Bare Metal</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Fri, 21 Aug 2026 06:30:05 +0000</pubDate>
      <link>https://dev.to/jaksontate/model-context-protocol-setup-mcp-server-on-bare-metal-1hdj</link>
      <guid>https://dev.to/jaksontate/model-context-protocol-setup-mcp-server-on-bare-metal-1hdj</guid>
      <description>&lt;p&gt;Integrating Large Language Models (LLMs) with enterprise databases using custom REST APIs requires constant glue-code maintenance. The &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt; provides a universal, standardized interface for dynamic tool discovery via JSON-RPC.&lt;/p&gt;

&lt;p&gt;Here is how to deploy a secure FastMCP server on Bare Metal infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: Environment Setup with &lt;code&gt;uv&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Bypass standard &lt;code&gt;pip&lt;/code&gt; bloat and use &lt;code&gt;uv&lt;/code&gt;—the Rust-based Python package manager—for ultra-fast dependency isolation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE WARNING: The FastMCP Import Anomaly&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Do not install &lt;code&gt;mcp[cli]&lt;/code&gt; when writing custom Python code using &lt;code&gt;from fastmcp import FastMCP&lt;/code&gt;. Namespace collisions cause an immediate &lt;code&gt;ModuleNotFoundError&lt;/code&gt;. Install &lt;code&gt;fastmcp&lt;/code&gt; directly.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install 'uv' globally&lt;/span&gt;
curl &lt;span class="nt"&gt;-LsSf&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://astral.sh/uv/install.sh]&lt;span class="o"&gt;(&lt;/span&gt;https://astral.sh/uv/install.sh&lt;span class="o"&gt;)&lt;/span&gt; | sh
&lt;span class="nb"&gt;source&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/.local/bin/env

&lt;span class="c"&gt;# 2. Setup project directory&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; ~/enterprise-mcp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd&lt;/span&gt; ~/enterprise-mcp
uv init
uv venv
&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate

&lt;span class="c"&gt;# 3. SRE FIX: Install FastMCP package explicitly&lt;/span&gt;
uv add fastmcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: Architecting the Secure FastMCP Server
&lt;/h2&gt;

&lt;p&gt;MCP uses Standard I/O (&lt;code&gt;stdio&lt;/code&gt;) to stream JSON-RPC messages to AI clients.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;SECURITY ALERT: The print() Crash Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Never use standard &lt;code&gt;print()&lt;/code&gt; statements in your MCP server code. Outputting text to &lt;code&gt;stdout&lt;/code&gt; injects raw string data into the JSON stream, corrupting the protocol and instantly crashing Claude Desktop. Force all logging exclusively to &lt;code&gt;sys.stderr&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Create &lt;code&gt;server.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;logging&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastmcp&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastMCP&lt;/span&gt;

&lt;span class="c1"&gt;# SRE FIX: Force all logging to stderr to protect the JSON-RPC stdio stream
&lt;/span&gt;&lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;basicConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;INFO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;%(levelname)s: %(message)s&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;logger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;logging&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getLogger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;__name__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;mcp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastMCP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enterprise-Data-Gateway&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nd"&gt;@mcp.tool&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_server_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Returns operational status of the Bare Metal server.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Tool called: get_server_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ServerMO Bare Metal Node 01: All systems operational. 0% Packet Loss.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;info&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Starting MCP Server on stdio transport...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;mcp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;transport&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stdio&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 3: Hardening Against Path Traversal
&lt;/h2&gt;

&lt;p&gt;Granting AI agents file system tools requires strict sandboxing to prevent prompt injections from exfiltrating system secrets like &lt;code&gt;/etc/passwd&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;SECURITY ALERT: The Sibling Directory Bypass&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
String checks like &lt;code&gt;requested_path.startswith(str(ALLOWED_DIR))&lt;/code&gt; create critical vulnerabilities! If your allowed directory is &lt;code&gt;/home/data&lt;/code&gt;, requesting &lt;code&gt;/home/data-secret/pass.txt&lt;/code&gt; passes string matching. Use &lt;code&gt;Path.is_relative_to()&lt;/code&gt; instead.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Add file sandboxing to &lt;code&gt;server.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pathlib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Path&lt;/span&gt;

&lt;span class="n"&gt;ALLOWED_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/home/ubuntu/enterprise-mcp/data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nd"&gt;@mcp.tool&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;read_secure_file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Reads a text file strictly from the allowed data sandbox.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;requested_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ALLOWED_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="c1"&gt;# SRE FIX: Prevent Sibling Directory Path Traversal Bypass
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;requested_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_relative_to&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ALLOWED_DIR&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Security Violation: Attempted path traversal to &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;requested_path&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ERROR: Access Denied. Path traversal detected.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;requested_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_file&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ERROR: File &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt; not found in sandbox.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;requested_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;logger&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Read error: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ERROR: Could not read file due to permissions or locking.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 4: Remote Stdio over SSH (Claude Desktop Integration)
&lt;/h2&gt;

&lt;p&gt;To connect local Claude Desktop to this remote MCP server without exposing public ports:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE WARNING: The MOTD &amp;amp; Working Directory Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Running standard SSH commands causes two critical failures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ubuntu MOTD banners ("Welcome to Ubuntu") corrupt the JSON-RPC stream.&lt;/li&gt;
&lt;li&gt;SSH defaults to &lt;code&gt;/home/ubuntu&lt;/code&gt;, completely blinding &lt;code&gt;uv&lt;/code&gt; to your virtual environment.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;Pass &lt;code&gt;-q -T&lt;/code&gt; to SSH to kill login banners, and pass &lt;code&gt;--directory&lt;/code&gt; and &lt;code&gt;--quiet&lt;/code&gt; to &lt;code&gt;uv&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Edit &lt;code&gt;claude_desktop_config.json&lt;/code&gt; on your local laptop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"enterprise-bare-metal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ssh"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"-q"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"-T"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"-i"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"/path/to/private_key.pem"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"ubuntu@YOUR_REMOTE_SERVER_IP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"/home/ubuntu/.local/bin/uv"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"--directory"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"/home/ubuntu/enterprise-mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"run"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"--quiet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"server.py"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart Claude Desktop to connect your local AI agent directly over an encrypted SSH pipe.&lt;/p&gt;




&lt;h2&gt;
  
  
  FastMCP &amp;amp; Model Context Protocol FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MCP Protocol vs REST API: Which is better for AI Agents?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
REST APIs require custom integration code and static endpoint management for every tool. MCP standardizes client-server interactions, allowing AI agents to dynamically discover and execute tools via JSON-RPC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why did my MCP Server crash Claude Desktop?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Standard &lt;code&gt;print()&lt;/code&gt; statements or SSH MOTD banners write raw text to &lt;code&gt;stdout&lt;/code&gt;, corrupting the JSON-RPC stream. Route Python logs to &lt;code&gt;sys.stderr&lt;/code&gt; and use &lt;code&gt;ssh -q -T&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is &lt;code&gt;.startswith()&lt;/code&gt; dangerous for directory path checks?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;string.startswith("/data")&lt;/code&gt; matches &lt;code&gt;/data-secret/file.txt&lt;/code&gt;. Always use &lt;code&gt;path.is_relative_to(ALLOWED_DIR)&lt;/code&gt; for filesystem sandboxing.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/setup-mcp-server-bare-metal/" rel="noopener noreferrer"&gt;Setup MCP Server on Bare Metal | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title>10 Linux Server Disasters &amp; Open-Source SRE Cures</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 20 Aug 2026 11:58:47 +0000</pubDate>
      <link>https://dev.to/jaksontate/10-linux-server-disasters-open-source-sre-cures-13dj</link>
      <guid>https://dev.to/jaksontate/10-linux-server-disasters-open-source-sre-cures-13dj</guid>
      <description>&lt;p&gt;When a production server goes down at 2 AM, standard beginner advice fails. Running &lt;code&gt;df -h&lt;/code&gt;, staring blindly at &lt;code&gt;top&lt;/code&gt;, or arbitrarily executing &lt;code&gt;systemctl restart&lt;/code&gt; without understanding the root cause leads to prolonged downtime and potential data loss.&lt;/p&gt;

&lt;p&gt;Here are 10 critical Linux server disasters and the open-source Site Reliability Engineering (SRE) techniques required to fix them permanently.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: Surviving the OOM-Killer Blindspot
&lt;/h2&gt;

&lt;p&gt;When your server runs out of RAM, the Linux kernel invokes the OOM Killer to terminate processes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE WARNING: The &lt;code&gt;overcommit_memory=2&lt;/code&gt; Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Running &lt;code&gt;echo "vm.overcommit_memory = 2" &amp;gt; /etc/sysctl.conf&lt;/code&gt; forces strict memory checks. Databases like MySQL or PostgreSQL request large virtual memory blocks on boot. Under strict overcommit settings, they will throw "Cannot allocate memory" and refuse to start, even when physical RAM is free.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;The SRE Fix:&lt;/strong&gt; Shield critical services via Systemd, not kernel sysctl settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl edit mysql

&lt;span class="c"&gt;# Add the following lines to grant OOM immunity:&lt;/span&gt;
&lt;span class="o"&gt;[&lt;/span&gt;Service]
&lt;span class="nv"&gt;OOMScoreAdjust&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nt"&gt;-1000&lt;/span&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart mysql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: High CPU Diagnosis &amp;amp; The &lt;code&gt;iowait&lt;/code&gt; Trap
&lt;/h2&gt;

&lt;p&gt;If &lt;code&gt;htop&lt;/code&gt; shows low CPU utilization but system load average is over 50, your CPU is stalled waiting for storage I/O (&lt;strong&gt;iowait&lt;/strong&gt;).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Diagnosis:&lt;/strong&gt; Install &lt;code&gt;sysstat&lt;/code&gt; and run &lt;code&gt;iostat -xz 1&lt;/code&gt;. Check &lt;code&gt;%util&lt;/code&gt; and &lt;code&gt;await&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cure:&lt;/strong&gt; Adding CPU cores won't resolve disk I/O bottlenecks. Migrate I/O-intensive workloads to &lt;strong&gt;ServerMO Bare Metal&lt;/strong&gt; with enterprise direct-attached NVMe storage.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 3: Fixing the Silent Disk Full Error (Inodes)
&lt;/h2&gt;

&lt;p&gt;An application throws &lt;code&gt;No space left on device&lt;/code&gt;, but &lt;code&gt;df -h&lt;/code&gt; shows the disk is 50% free. This indicates &lt;strong&gt;Inode Exhaustion&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;CRITICAL SRE ALERT: The Server-Crashing &lt;code&gt;find&lt;/code&gt; Loop&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Avoid running nested &lt;code&gt;find&lt;/code&gt; loops on choked production machines. It induces massive I/O load and hangs the server.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Verify Inode usage&lt;/span&gt;
&lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt;

&lt;span class="c"&gt;# 2. Find top Inode consumers safely without hanging the machine&lt;/span&gt;
&lt;span class="nb"&gt;sudo du&lt;/span&gt; &lt;span class="nt"&gt;--inodes&lt;/span&gt; &lt;span class="nt"&gt;-xS&lt;/span&gt; / | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-rh&lt;/span&gt; | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-20&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 4: Resolving Database Choking
&lt;/h2&gt;

&lt;p&gt;If slow database queries bottleneck your app, enable &lt;code&gt;slow_query_log&lt;/code&gt; in MySQL/MariaDB or &lt;code&gt;log_min_duration_statement&lt;/code&gt; in PostgreSQL. Prefix captured queries with &lt;code&gt;EXPLAIN&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The SRE Fix:&lt;/strong&gt; If &lt;code&gt;EXPLAIN&lt;/code&gt; returns &lt;code&gt;type: ALL&lt;/code&gt; (MySQL) or &lt;code&gt;Seq Scan&lt;/code&gt; (PostgreSQL), the database engine is reading millions of rows manually. Create targeted indexes on columns used in &lt;code&gt;WHERE&lt;/code&gt;, &lt;code&gt;JOIN&lt;/code&gt;, or &lt;code&gt;ORDER BY&lt;/code&gt; clauses.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 5: Network Botnets &amp;amp; CrowdSec
&lt;/h2&gt;

&lt;p&gt;Fail2Ban only analyzes local logs, making it ineffective against distributed multi-IP botnets.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Open-Source Fix:&lt;/strong&gt; Deploy &lt;strong&gt;CrowdSec&lt;/strong&gt;, an AI-driven, collaborative Intrusion Prevention System (IPS). Threat intelligence is shared globally across nodes to block malicious IPs before they reach your server.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 6: SSL &amp;amp; Reverse Proxy Simplification
&lt;/h2&gt;

&lt;p&gt;Managing complex Nginx server blocks and Certbot cron jobs creates operational fragility.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Open-Source Fix:&lt;/strong&gt; Switch to &lt;strong&gt;Caddy Server&lt;/strong&gt; or &lt;strong&gt;Nginx Proxy Manager&lt;/strong&gt;. Caddy provisions TLS certificates automatically, supports HTTP/3 (QUIC) natively, and simplifies configurations into concise Caddyfiles.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 7: Container Sprawl &amp;amp; Zombie Networks
&lt;/h2&gt;

&lt;p&gt;Orphaned Docker containers, untagged images, and dangling networks create IP conflicts and waste disk space.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Open-Source Fix:&lt;/strong&gt; Use &lt;strong&gt;Portainer&lt;/strong&gt; for web dashboard management, or run &lt;strong&gt;&lt;code&gt;ctop&lt;/code&gt;&lt;/strong&gt; in the CLI for real-time container metrics.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 8: Configuration Drift &amp;amp; Spaghetti Servers
&lt;/h2&gt;

&lt;p&gt;Manually editing server configs creates unrepeatable "snowflake" servers.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Open-Source Fix:&lt;/strong&gt; Implement &lt;strong&gt;Ansible&lt;/strong&gt;. Define infrastructure as declarative YAML playbooks for automated, auditable deployments across your server fleet.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 9: Zero-Trust Backups
&lt;/h2&gt;

&lt;p&gt;Standard &lt;code&gt;rsync&lt;/code&gt; or &lt;code&gt;tar&lt;/code&gt; scripts leave backup storage exposed to ransomware if root credentials are compromised.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Open-Source Fix:&lt;/strong&gt; Use &lt;strong&gt;Restic&lt;/strong&gt; or &lt;strong&gt;BorgBackup&lt;/strong&gt;. They generate encrypted, deduplicated, and append-only backups that prevent clients from deleting historical snapshots.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 10: The Datadog Escape Plan
&lt;/h2&gt;

&lt;p&gt;Proprietary SaaS monitoring tools incur high per-host licensing costs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The FinOps Stack:&lt;/strong&gt; Deploy &lt;strong&gt;Prometheus&lt;/strong&gt; (metrics) + &lt;strong&gt;Grafana Loki&lt;/strong&gt; (log aggregation) + &lt;strong&gt;Grafana&lt;/strong&gt; (visualization). Running this stack on dedicated Bare Metal ensures high log-ingestion performance without SaaS licensing fees.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  💬 Linux SRE Troubleshooting FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why does my server say "No space left on device" when &lt;code&gt;df -h&lt;/code&gt; shows space available?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You have run out of index nodes (inodes). Check &lt;code&gt;df -i&lt;/code&gt;. Millions of tiny files (like session files) consume inodes regardless of remaining disk space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I prevent MySQL or PostgreSQL from being killed by the OOM Killer?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Set &lt;code&gt;OOMScoreAdjust=-1000&lt;/code&gt; inside a Systemd override file (&lt;code&gt;sudo systemctl edit mysql&lt;/code&gt;) to make the service immune to kernel OOM termination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between Fail2Ban and CrowdSec?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Fail2Ban analyzes local logs on a single server. CrowdSec uses a collaborative network that shares IP blocklists across all users worldwide in real time.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/blogs/linux-server-troubleshooting-tools/" rel="noopener noreferrer"&gt;10 Linux Server Disasters &amp;amp; Open-Source SRE Cures | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>sre</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Setup JupyterLab &amp; PyTorch on Ubuntu 24.04: Remote GPU Server</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 20 Aug 2026 07:20:00 +0000</pubDate>
      <link>https://dev.to/jaksontate/setup-jupyterlab-pytorch-on-ubuntu-2404-remote-gpu-server-525h</link>
      <guid>https://dev.to/jaksontate/setup-jupyterlab-pytorch-on-ubuntu-2404-remote-gpu-server-525h</guid>
      <description>&lt;p&gt;Ditch your local laptop. Build a persistent Deep Learning lab on Bare Metal. Master Secure SSH Tunneling, avoid dependency hell, and connect directly via VSCode.&lt;/p&gt;




&lt;h2&gt;
  
  
  The End of Localhost AI
&lt;/h2&gt;

&lt;p&gt;Running serious Deep Learning models or fine-tuning Large Language Models (LLMs) on a local Mac or standard desktop is no longer viable. The VRAM requirements for modern AI mandate deploying workloads on a &lt;strong&gt;Remote GPU Server&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, transitioning to a headless Ubuntu server often results in "Dependency Hell" and security vulnerabilities. Modern SREs deploy &lt;strong&gt;JupyterLab&lt;/strong&gt; to provide a full browser-based IDE.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: NVIDIA Drivers &amp;amp; The Miniconda Architecture
&lt;/h2&gt;

&lt;p&gt;Verify your server recognizes the NVIDIA hardware via &lt;code&gt;nvidia-smi&lt;/code&gt;. (If drivers are missing, execute &lt;code&gt;sudo ubuntu-drivers autoinstall&lt;/code&gt; and reboot).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE WARNING: Anaconda Bloatware &amp;amp; Conda Crashes&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Anaconda installs gigabytes of unnecessary libraries. Use &lt;strong&gt;Miniconda&lt;/strong&gt; instead. Furthermore, running &lt;code&gt;conda activate&lt;/code&gt; immediately after &lt;code&gt;conda init&lt;/code&gt; triggers a &lt;code&gt;CommandNotFoundError&lt;/code&gt;. You must refresh your shell context using &lt;code&gt;source ~/.bashrc&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Verify NVIDIA Driver&lt;/span&gt;
nvidia-smi

&lt;span class="c"&gt;# 2. Install Miniconda (Lightweight Environment Manager)&lt;/span&gt;
wget &lt;span class="o"&gt;[&lt;/span&gt;https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh]&lt;span class="o"&gt;(&lt;/span&gt;https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nt"&gt;-O&lt;/span&gt; miniconda.sh
bash miniconda.sh &lt;span class="nt"&gt;-b&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="nv"&gt;$HOME&lt;/span&gt;/miniconda
&lt;span class="nb"&gt;eval&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/miniconda/bin/conda shell.bash hook&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
conda init

&lt;span class="c"&gt;# 3. SRE FIX: Refresh shell to prevent CommandNotFoundError&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc

&lt;span class="c"&gt;# 4. Create an isolated environment for Python 3.11&lt;/span&gt;
conda create &lt;span class="nt"&gt;-n&lt;/span&gt; ai_lab &lt;span class="nv"&gt;python&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3.11 &lt;span class="nt"&gt;-y&lt;/span&gt;
conda activate ai_lab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: Install PyTorch &amp;amp; JupyterLab
&lt;/h2&gt;

&lt;p&gt;Modern PyTorch 2.x ships with pre-compiled CUDA binaries, eliminating the need to install system-level CUDA toolkits manually.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install PyTorch with CUDA 12.1 Support&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;torch torchvision torchaudio &lt;span class="nt"&gt;--index-url&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://download.pytorch.org/whl/cu121]&lt;span class="o"&gt;(&lt;/span&gt;https://download.pytorch.org/whl/cu121&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# 2. Install JupyterLab and IPykernel&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;jupyterlab ipykernel

&lt;span class="c"&gt;# 3. Register your environment as a Jupyter Kernel&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; ipykernel &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--user&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ai_lab &lt;span class="nt"&gt;--display-name&lt;/span&gt; &lt;span class="s2"&gt;"PyTorch (GPU)"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 3: Persistent Headless Execution
&lt;/h2&gt;

&lt;p&gt;Avoid training job crashes caused by dropped SSH sessions by setting a persistent hashed password and running JupyterLab in &lt;code&gt;tmux&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Generate config and set a persistent password&lt;/span&gt;
jupyter server &lt;span class="nt"&gt;--generate-config&lt;/span&gt;
jupyter server password

&lt;span class="c"&gt;# 2. Start a persistent tmux session&lt;/span&gt;
tmux new &lt;span class="nt"&gt;-s&lt;/span&gt; jupyter_session

&lt;span class="c"&gt;# 3. Launch JupyterLab bound strictly to localhost&lt;/span&gt;
jupyter lab &lt;span class="nt"&gt;--no-browser&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8888 &lt;span class="nt"&gt;--ip&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;127.0.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Detach from tmux: Press &lt;code&gt;Ctrl+B&lt;/code&gt;, then &lt;code&gt;D&lt;/code&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 4: Browser Access via SSH Tunnel (Zero Open Ports)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;SECURITY ALERT: The Exposed Port Vulnerability&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Running &lt;code&gt;sudo ufw allow 8888&lt;/code&gt; exposes Jupyter directly to the internet. Automated botnets scan port 8888 to hijack GPUs for crypto-mining. Keep UFW closed and bridge connections securely via SSH Tunneling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Run this command &lt;strong&gt;on your Local Laptop&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Forward Local Port 8888 to Remote Port 8888&lt;/span&gt;
ssh &lt;span class="nt"&gt;-N&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; 8888:127.0.0.1:8888 your_username@YOUR_REMOTE_SERVER_IP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now navigate to &lt;code&gt;http://localhost:8888&lt;/code&gt; in your local browser and enter your password.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 5: Modern IDE Approach (VSCode Remote-SSH)
&lt;/h2&gt;

&lt;p&gt;For full local extension support (Pylance, GitHub Copilot) alongside remote execution:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the official &lt;strong&gt;Remote - SSH&lt;/strong&gt; extension in local VSCode.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;F1&lt;/code&gt; -&amp;gt; &lt;code&gt;Remote-SSH: Connect to Host...&lt;/code&gt; -&amp;gt; Enter &lt;code&gt;ssh username@YOUR_SERVER_IP&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open a &lt;code&gt;.ipynb&lt;/code&gt; notebook file on the server.&lt;/li&gt;
&lt;li&gt;Select Kernel -&amp;gt; Python Environments -&amp;gt; Select &lt;code&gt;ai_lab&lt;/code&gt;.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Verify GPU availability in VSCode Notebook
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PyTorch Version: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;CUDA Available: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cuda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_available&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cuda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_available&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hardware Detected: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cuda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_device_name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;VRAM Allocated: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cuda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;memory_allocated&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;1e9&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; GB&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  💬 JupyterLab &amp;amp; Remote GPU FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;JupyterLab vs Jupyter Notebook: Which is better?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
JupyterLab is a complete browser-based IDE offering terminal access, file managers, and split views, making it superior to the legacy single-document Notebook interface for remote GPU workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why shouldn't I open Port 8888 on my Ubuntu Firewall?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Opening port 8888 exposes Jupyter to automated botnet scans that hijack GPU resources for crypto-mining. Access the server strictly via SSH Tunneling or VSCode Remote-SSH.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why did my 'conda activate' command crash on Ubuntu 24.04?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Running &lt;code&gt;conda init&lt;/code&gt; modifies &lt;code&gt;.bashrc&lt;/code&gt; but does not reload your active shell context automatically. You must run &lt;code&gt;source ~/.bashrc&lt;/code&gt; before running &lt;code&gt;conda activate&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Read the full tutorial on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/setup-jupyterlab-pytorch-ubuntu-gpu/" rel="noopener noreferrer"&gt;Setup JupyterLab &amp;amp; PyTorch on Ubuntu 24.04: Remote GPU Server | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pytorch</category>
      <category>jupyterlab</category>
      <category>ubuntu</category>
      <category>gpu</category>
    </item>
    <item>
      <title>Deploy Apache CloudStack on Ubuntu 24.04: Build a Private AWS</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 20 Aug 2026 06:43:30 +0000</pubDate>
      <link>https://dev.to/jaksontate/deploy-apache-cloudstack-on-ubuntu-2404-build-a-private-aws-430f</link>
      <guid>https://dev.to/jaksontate/deploy-apache-cloudstack-on-ubuntu-2404-build-a-private-aws-430f</guid>
      <description>&lt;p&gt;The ultimate VMware Escape Plan. Master cloud repatriation, secure KVM hypervisors, and slash enterprise IT costs natively on ServerMO Bare Metal.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Era of Cloud Repatriation
&lt;/h2&gt;

&lt;p&gt;Organizations face two massive shifts: hyper-inflated public cloud bills (AWS/Azure) and exorbitant VMware license renewals post-Broadcom acquisition.&lt;/p&gt;

&lt;p&gt;Enterprises are executing aggressive cloud repatriation strategies. When comparing CloudStack vs OpenStack vs OpenNebula, CTOs quickly realize that OpenStack requires a dedicated DevOps team to maintain its modular dependency hell. Conversely, &lt;strong&gt;Apache CloudStack&lt;/strong&gt; is a monolithic, turnkey platform that gives you a "Private AWS" out-of-the-box.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: Network Bridge Configuration (Netplan)
&lt;/h2&gt;

&lt;p&gt;To provide VPC routing, isolated guest networks, and floating IPs, CloudStack requires total control over a Linux Bridge. You must strip the IP address from your physical Network Interface Card (NIC) and assign it to a bridge.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE ARCHITECTURE WARNING: Physical NIC DHCP&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
You MUST disable DHCP on your physical ethernet interface (e.g., &lt;code&gt;eth0&lt;/code&gt;). If the physical NIC and the bridge both try to claim an IP address, your server will experience a catastrophic routing loop and disconnect from the network.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Edit &lt;code&gt;/etc/netplan/01-netcfg.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2&lt;/span&gt;
  &lt;span class="na"&gt;renderer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networkd&lt;/span&gt;
  &lt;span class="na"&gt;ethernets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;eth0&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;dhcp4&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
      &lt;span class="na"&gt;dhcp6&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="na"&gt;bridges&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;cloudbr0&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;addresses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;192.168.1.10/24&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt; &lt;span class="c1"&gt;# Your Bare Metal Server IP&lt;/span&gt;
      &lt;span class="na"&gt;routes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;default&lt;/span&gt;
          &lt;span class="na"&gt;via&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;192.168.1.1&lt;/span&gt;
      &lt;span class="na"&gt;nameservers&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;addresses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;8.8.8.8&lt;/span&gt;&lt;span class="pi"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;1.1.1.1&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;interfaces&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;eth0&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;parameters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;stp&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
        &lt;span class="na"&gt;forward-delay&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the configuration safely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;netplan try
&lt;span class="nb"&gt;sudo &lt;/span&gt;netplan apply
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: Hardening the KVM Hypervisor
&lt;/h2&gt;

&lt;p&gt;CloudStack uses KVM as its primary open-source hypervisor. Installing KVM on Ubuntu 24.04 introduces systemic challenges, specifically regarding &lt;code&gt;libvirtd&lt;/code&gt; socket activation and AppArmor blocking API calls.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;CRITICAL SRE ALERT: The Ubuntu 24.04 Libvirt Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ubuntu 24.04 uses socket-based activation for libvirt. CloudStack requires legacy TCP listening. If you do not mask these sockets and disable AppArmor for libvirt, your Virtual Machines will silently fail to start during deployment.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install KVM &amp;amp; CloudStack Agent&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; qemu-kvm cloudstack-agent

&lt;span class="c"&gt;# Mask socket listeners to force legacy mode&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl mask libvirtd.socket libvirtd-ro.socket libvirtd-admin.socket libvirtd-tls.socket libvirtd-tcp.socket

&lt;span class="c"&gt;# Ensure disable directory exists and disable AppArmor for Libvirt&lt;/span&gt;
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /etc/apparmor.d/disable/
&lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
&lt;span class="nb"&gt;sudo &lt;/span&gt;apparmor_parser &lt;span class="nt"&gt;-R&lt;/span&gt; /etc/apparmor.d/usr.sbin.libvirtd

&lt;span class="c"&gt;# Configure Libvirt TCP Listening&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'listen_tls=0'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/libvirt/libvirtd.conf
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'listen_tcp=1'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/libvirt/libvirtd.conf
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'tcp_port="16509"'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/libvirt/libvirtd.conf
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'auth_tcp="none"'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/libvirt/libvirtd.conf

&lt;span class="c"&gt;# Restart the hypervisor engine&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart libvirtd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 3: Secure Storage &amp;amp; Database Setup
&lt;/h2&gt;

&lt;p&gt;CloudStack relies on MySQL for state management and NFS for Primary (VM Disks) and Secondary (ISOs/Snapshots) storage.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;SECURITY ALERT: Defeating NFS Vulnerabilities&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Never expose an NFS share with full &lt;code&gt;chmod 777&lt;/code&gt; permissions. Restrict your &lt;code&gt;/etc/exports&lt;/code&gt; strictly to your Management VLAN subnet, and use UFW to drop external port 2049 requests.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install MySQL &amp;amp; NFS&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; mysql-server nfs-kernel-server

&lt;span class="c"&gt;# 2. Secure NFS Exports (Replace 192.168.1.0/24 with your subnet)&lt;/span&gt;
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /export/primary /export/secondary
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/export/primary 192.168.1.0/24(rw,async,no_root_squash,no_subtree_check)"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/exports
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"/export/secondary 192.168.1.0/24(rw,async,no_root_squash,no_subtree_check)"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/exports
&lt;span class="nb"&gt;sudo &lt;/span&gt;exportfs &lt;span class="nt"&gt;-ra&lt;/span&gt;

&lt;span class="c"&gt;# 3. Optimize MySQL for CloudStack&lt;/span&gt;
&lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;' | sudo tee /etc/mysql/mysql.conf.d/cloudstack.cnf
[mysqld]
server-id=1
innodb_rollback_on_timeout=1
innodb_lock_wait_timeout=600
max_connections=1000
log-bin=mysql-bin
binlog-format = 'ROW'
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart mysql nfs-kernel-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 4: Deploying the Management Server
&lt;/h2&gt;

&lt;p&gt;The Management Server serves the UI, orchestrates KVM hosts, and provisions SystemVMs (Virtual Routers and Console Proxies).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Add the official ShapeBlue CloudStack Repository&lt;/span&gt;
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /etc/apt/keyrings
wget &lt;span class="nt"&gt;-O-&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;http://packages.shapeblue.com/release.asc]&lt;span class="o"&gt;(&lt;/span&gt;http://packages.shapeblue.com/release.asc&lt;span class="o"&gt;)&lt;/span&gt; | gpg &lt;span class="nt"&gt;--dearmor&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/keyrings/cloudstack.gpg &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; /dev/null
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"deb [signed-by=/etc/apt/keyrings/cloudstack.gpg] [http://packages.shapeblue.com/cloudstack/upstream/debian/4.20](http://packages.shapeblue.com/cloudstack/upstream/debian/4.20) /"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/cloudstack.list

&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; cloudstack-management bzip2

&lt;span class="c"&gt;# Initialize the Database Schema&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;cloudstack-setup-databases cloud:P@ssw0rd123@localhost &lt;span class="nt"&gt;--deploy-as&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;root:YourMySQLRootPass

&lt;span class="c"&gt;# Launch the Management Server&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;cloudstack-setup-management

&lt;span class="c"&gt;# Seed the KVM SystemVM Template to Secondary Storage&lt;/span&gt;
wget &lt;span class="o"&gt;[&lt;/span&gt;http://download.cloudstack.org/systemvm/4.20/systemvmtemplate-4.20.1-x86_64-kvm.qcow2.bz2]&lt;span class="o"&gt;(&lt;/span&gt;http://download.cloudstack.org/systemvm/4.20/systemvmtemplate-4.20.1-x86_64-kvm.qcow2.bz2&lt;span class="o"&gt;)&lt;/span&gt;
bzip2 &lt;span class="nt"&gt;-d&lt;/span&gt; systemvmtemplate-4.20.1-x86_64-kvm.qcow2.bz2

&lt;span class="nb"&gt;sudo&lt;/span&gt; /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-m&lt;/span&gt; /export/secondary &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-f&lt;/span&gt; systemvmtemplate-4.20.1-x86_64-kvm.qcow2 &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;-h&lt;/span&gt; kvm &lt;span class="nt"&gt;-F&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Access your Private Cloud Dashboard at &lt;code&gt;http://YOUR_SERVER_IP:8080/client&lt;/code&gt; (Default login: &lt;code&gt;admin&lt;/code&gt; / &lt;code&gt;password&lt;/code&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 5: The VMware Escape Plan
&lt;/h2&gt;

&lt;p&gt;CloudStack includes native &lt;code&gt;virt-v2v&lt;/code&gt; migration integration to move existing virtual machines off VMware ESXi without third-party licenses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install virt-v2v and nbdkit on KVM hosts for native VMware migration&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; virt-v2v nbdkit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can map your vCenter credentials inside CloudStack to automatically convert VMDK disk formats to QCOW2 and inject KVM virtio drivers on the fly. Pairing this with &lt;strong&gt;ServerMO Bare Metal Servers&lt;/strong&gt; slashes hypervisor licensing costs to zero.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Apache CloudStack &amp;amp; Private Cloud FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why is Apache CloudStack the best VMware alternative post-Broadcom?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
CloudStack is a turnkey IaaS platform providing a VMware-like UI, VPC networking, and native migration tools (&lt;code&gt;virt-v2v&lt;/code&gt;) to move workloads to open-source KVM seamlessly without vendor lock-in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CloudStack vs OpenStack vs OpenNebula: Which is better?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
OpenStack requires a dedicated DevOps team to maintain modular complexity. OpenNebula lacks deep enterprise features. Apache CloudStack deploys out-of-the-box like a monolithic AWS clone with low operational overhead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does my CloudStack SystemVM stay in the "Starting" state?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is typically an NFS export permission or routing issue. Verify that Secondary NFS storage includes &lt;code&gt;no_root_squash&lt;/code&gt; and that your &lt;code&gt;cloudbr0&lt;/code&gt; bridge has internet access.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Read the full guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/deploy-apache-cloudstack-ubuntu-24-04/" rel="noopener noreferrer"&gt;Deploy Apache CloudStack on Ubuntu 24.04: Build a Private AWS | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ubuntu</category>
      <category>cloud</category>
      <category>kvm</category>
    </item>
    <item>
      <title>SGLang vs vLLM: Install, Serve, and Benchmark on Bare Metal</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Fri, 07 Aug 2026 07:38:12 +0000</pubDate>
      <link>https://dev.to/jaksontate/sglang-vs-vllm-install-serve-and-benchmark-on-bare-metal-39le</link>
      <guid>https://dev.to/jaksontate/sglang-vs-vllm-install-serve-and-benchmark-on-bare-metal-39le</guid>
      <description>&lt;p&gt;Two open-source engines currently dominate self-hosted LLM inference: &lt;strong&gt;vLLM&lt;/strong&gt; and &lt;strong&gt;SGLang&lt;/strong&gt;. Both promise the exact same thing—feed them a Hugging Face safetensors model, and they will spin up an ultra-fast, OpenAI-compatible API endpoint.&lt;/p&gt;

&lt;p&gt;However, standard benchmarks comparing SGLang vs vLLM suffer from a glaring problem: amateurs benchmark these enterprise engines on a single, rented consumer GPU (like an RTX 4090). To understand real-world &lt;strong&gt;TTFT&lt;/strong&gt; (Time To First Token) and &lt;strong&gt;TPOT&lt;/strong&gt; (Time Per Output Token) metrics, you must analyze how these engines orchestrate memory and concurrency on bare metal GPU hosting architectures.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: Escaping the VRAM &amp;amp; Compilation Traps
&lt;/h2&gt;

&lt;p&gt;Before diving into performance numbers, you must address the catastrophic installation failures that plague both frameworks on Ubuntu 24.04.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;CRITICAL WARNING: The 0.9 VRAM Death Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Most official documentation tells you to set &lt;code&gt;--gpu-memory-utilization 0.9&lt;/code&gt; (vLLM) or &lt;code&gt;--mem-fraction-static 0.9&lt;/code&gt; (SGLang). If you are running an 80GB H100, this allocates 72GB. During CUDA Graph compilation, the engine requires temporary System RAM proportional to the GPU allocation. This immediately exhausts your host machine's RAM and triggers an OS-level OOM (Out-Of-Memory) kill. Always scale this parameter down to &lt;strong&gt;0.8&lt;/strong&gt; or &lt;strong&gt;0.85&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;SRE HIDDEN GEM: The &lt;code&gt;ninja-build&lt;/code&gt; &amp;amp; PyTorch Hell&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
SGLang utilizes FlashInfer to compile highly optimized CUDA kernels on first launch. If your Linux server lacks the &lt;code&gt;ninja-build&lt;/code&gt; package, the server will crash instantly with a &lt;code&gt;FileNotFoundError&lt;/code&gt;. Furthermore, standard pip installations often trigger PyTorch version conflicts. Bypass this dependency hell by pre-installing &lt;code&gt;ninja&lt;/code&gt; and fetching the latest FlashInfer wheel directly from their release index based on your specific CUDA version.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install critical build tools to prevent FlashInfer compilation crashes&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; python3-venv python3-pip git ninja-build build-essential

&lt;span class="c"&gt;# 2. Create isolated environments to prevent Python global contamination&lt;/span&gt;
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv /opt/llm_engine
&lt;span class="nb"&gt;source&lt;/span&gt; /opt/llm_engine/bin/activate

&lt;span class="c"&gt;# 3. Safely install SGLang bypassing dependency hell&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--upgrade&lt;/span&gt; pip
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"sglang[all]"&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;flashinfer &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;https://flashinfer.ai/whl/cu124/torch2.4/]&lt;span class="o"&gt;(&lt;/span&gt;https://flashinfer.ai/whl/cu124/torch2.4/&lt;span class="o"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# 4. Safely install vLLM&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;vllm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: Analyzing TTFT vs TPOT Performance (The Truth)
&lt;/h2&gt;

&lt;p&gt;When comparing SGLang vs vLLM, you must understand their architectural philosophies. vLLM uses &lt;strong&gt;PagedAttention&lt;/strong&gt;, which treats the KV Cache like OS virtual memory to eliminate fragmentation. SGLang uses &lt;strong&gt;RadixAttention&lt;/strong&gt;, which treats the KV cache like a compressed tree structure to maximize prefix sharing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pure Batch Throughput (vLLM Wins):&lt;/strong&gt; If you are processing 10,000 completely unique prompts (no shared context), vLLM's highly optimized C++ PagedAttention queue handles continuous batching flawlessly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Turn Chat &amp;amp; Agents (SGLang Annihilates):&lt;/strong&gt; While vLLM offers an &lt;code&gt;--enable-prefix-caching&lt;/code&gt; flag, its block-level storage struggles with complex conversational branching. In agentic workflows, multiple users share the exact same System Prompt. SGLang calculates it exactly once via Radix trees and its modern Rust-based router, delivering &lt;strong&gt;5x faster TTFT&lt;/strong&gt; and saving up to &lt;strong&gt;80% VRAM&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 3: Securing the 0.0.0.0 Exposure Vulnerability
&lt;/h2&gt;

&lt;p&gt;The most dangerous mistake engineers make is copying default launch commands from GitHub documentation directly into a production server.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;CRITICAL SECURITY ALERT: Unauthenticated Exposure&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Running &lt;code&gt;vllm serve --host 0.0.0.0&lt;/code&gt; or &lt;code&gt;sglang.launch_server --host 0.0.0.0&lt;/code&gt; binds your LLM engine directly to the public internet. These frameworks do not have built-in API-key authentication or rate limiting. Attackers will scan your IP, steal your GPU compute, and execute malicious Prompt Injections to hijack your agents. Never bind to &lt;code&gt;0.0.0.0&lt;/code&gt; without a Reverse Proxy!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Always bind the engine strictly to &lt;code&gt;127.0.0.1&lt;/code&gt; (localhost) and place a secure web server (like Caddy or Nginx) in front of it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# SAFE DEPLOYMENT: Bind strictly to localhost (127.0.0.1) with 0.8 memory fraction&lt;/span&gt;

&lt;span class="c"&gt;# SGLang Example:&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; sglang.launch_server &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--model-path&lt;/span&gt; Qwen/Qwen2.5-7B-Instruct &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--host&lt;/span&gt; 127.0.0.1 &lt;span class="nt"&gt;--port&lt;/span&gt; 30000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--mem-fraction-static&lt;/span&gt; 0.8

&lt;span class="c"&gt;# vLLM Example:&lt;/span&gt;
vllm serve Qwen/Qwen2.5-7B-Instruct &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--host&lt;/span&gt; 127.0.0.1 &lt;span class="nt"&gt;--port&lt;/span&gt; 8000 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--gpu-memory-utilization&lt;/span&gt; 0.8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 4: Multi-GPU &amp;amp; The ServerMO Bare Metal Advantage
&lt;/h2&gt;

&lt;p&gt;To serve large models (like Llama 70B or DeepSeek) efficiently, you must split model weights across multiple GPUs using Tensor Parallelism (&lt;code&gt;--tp 2&lt;/code&gt; or &lt;code&gt;--tp 8&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;However, if you run these workloads in Docker containers on multi-GPU setups without the &lt;code&gt;--ipc=host&lt;/code&gt; flag, the NVIDIA Collective Communications Library (NCCL) cannot utilize shared memory. This results in silent, catastrophic performance degradation.&lt;/p&gt;

&lt;p&gt;Deploying LLM inference on shared Cloud VMs introduces hypervisor latency and "noisy neighbor" I/O contention. To achieve true microsecond TTFT and exploit full NVLink speeds required by vLLM and SGLang, deploy on &lt;strong&gt;ServerMO USA Dedicated Bare Metal Servers&lt;/strong&gt;. Our infrastructure bypasses virtualization completely, offering dedicated PCIe Gen5 lanes and unmetered network bandwidth to ensure your inference engine operates at absolute peak theoretical throughput.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 SGLang &amp;amp; vLLM Inference FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Which is better for Multi-Turn AI Agents: SGLang or vLLM?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
SGLang is vastly superior for Multi-Turn AI Agents. While vLLM offers &lt;code&gt;--enable-prefix-caching&lt;/code&gt;, its block-level storage struggles with complex branching. SGLang's Radix tree architecture handles multi-turn agents and dynamic context natively, delivering 5x faster TTFT and saving up to 80% VRAM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does vLLM crash with OutOfMemoryError on an 80GB H100 GPU?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The crash is often caused by setting &lt;code&gt;--gpu-memory-utilization&lt;/code&gt; to &lt;code&gt;0.9&lt;/code&gt; or &lt;code&gt;0.95&lt;/code&gt;. During CUDA Graph capture, the engine allocates temporary System RAM proportional to the GPU memory. This exhausts the host machine's RAM, triggering an OS-level OOM kill. Always scale this down to &lt;code&gt;0.8&lt;/code&gt; for stable compilation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I fix FlashInfer compilation errors in SGLang on Ubuntu 24.04?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
SGLang relies on FlashInfer to compile CUDA kernels on first launch. If you lack the &lt;code&gt;ninja-build&lt;/code&gt; OS package, it will throw a &lt;code&gt;FileNotFoundError&lt;/code&gt;. Install it via &lt;code&gt;sudo apt install ninja-build&lt;/code&gt;. Also, ensure you fetch the latest FlashInfer wheel matching your CUDA environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does SGLang support Multi-GPU Tensor Parallelism like vLLM?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes, SGLang fully supports Tensor Parallelism (e.g., &lt;code&gt;--tp 2&lt;/code&gt; or &lt;code&gt;--tp 8&lt;/code&gt;). However, when running via Docker, you must include the &lt;code&gt;--ipc=host&lt;/code&gt; flag. Without it, the NVIDIA Collective Communications Library (NCCL) cannot use shared memory for inter-GPU communication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why should I run LLM Inference on Bare Metal instead of Cloud VMs?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Cloud VMs introduce hypervisor latency and "noisy neighbor" I/O contention, which severely degrades Time-Per-Output-Token (TPOT). Bare Metal GPU servers provide unthrottled, direct access to PCIe Gen5 lanes and NVLink interconnects, extracting 100% of the hardware's theoretical throughput.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full benchmark on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/blogs/sglang-vs-vllm-benchmark/" rel="noopener noreferrer"&gt;SGLang vs vLLM: Install, Serve, and Benchmark on Bare Metal | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to Install Caddy on Ubuntu 24.04: Production Reverse Proxy</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Fri, 07 Aug 2026 05:43:50 +0000</pubDate>
      <link>https://dev.to/jaksontate/how-to-install-caddy-on-ubuntu-2404-production-reverse-proxy-1j6o</link>
      <guid>https://dev.to/jaksontate/how-to-install-caddy-on-ubuntu-2404-production-reverse-proxy-1j6o</guid>
      <description>&lt;p&gt;Ditch Nginx complexity. Master the official Cloudsmith repository, unlock HTTP/3 with UFW, and build zero-downtime reverse proxies on ServerMO Bare Metal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: Escaping the Ubuntu APT Trap
&lt;/h2&gt;

&lt;p&gt;For years, Nginx has been the undisputed king of web servers. However, managing Nginx requires manually configuring &lt;code&gt;certbot&lt;/code&gt; for Let's Encrypt SSL, writing verbose server blocks, and battling complex WebSocket upgrade headers. Caddy changes everything. Written in Go, Caddy secures your sites with Automatic HTTPS by default and routes traffic using a minimal, human-readable &lt;code&gt;Caddyfile&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE INSTALLATION WARNING: The Default Repo Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Many amateur tutorials instruct you to simply run &lt;code&gt;sudo apt install caddy&lt;/code&gt; on Ubuntu 24.04. This is a massive mistake. The default Ubuntu repository often hosts severely outdated versions of Caddy that lack critical HTTP/3 performance optimizations and zero-day security patches. You must add the official Cloudsmith Debian Repository to ensure production-grade stability.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install prerequisites for adding external repositories&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; debian-keyring debian-archive-keyring apt-transport-https curl

&lt;span class="c"&gt;# 2. Add the official Caddy GPG signing key&lt;/span&gt;
curl &lt;span class="nt"&gt;-1sLf&lt;/span&gt; &lt;span class="s1"&gt;'[https://dl.cloudsmith.io/public/caddy/stable/gpg.key](https://dl.cloudsmith.io/public/caddy/stable/gpg.key)'&lt;/span&gt; | &lt;span class="nb"&gt;sudo &lt;/span&gt;gpg &lt;span class="nt"&gt;--dearmor&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /usr/share/keyrings/caddy-stable-archive-keyring.gpg

&lt;span class="c"&gt;# 3. Add the official Caddy Cloudsmith repository to your sources list&lt;/span&gt;
curl &lt;span class="nt"&gt;-1sLf&lt;/span&gt; &lt;span class="s1"&gt;'[https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt](https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt)'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/caddy-stable.list

&lt;span class="c"&gt;# 4. Update the package index and install the latest Caddy version&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;caddy &lt;span class="nt"&gt;-y&lt;/span&gt;

&lt;span class="c"&gt;# 5. Verify the installation (Ensure it displays v2.8+ or higher)&lt;/span&gt;
caddy version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 2: The HTTP/3 UFW Configuration
&lt;/h2&gt;

&lt;p&gt;Caddy manages its own HTTPS certificates via the ACME protocol. If your firewall is not configured precisely, the entire system will fail.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;SRE HIDDEN GEM: Unlocking HTTP/3 (QUIC) &amp;amp; Protecting Port 80&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Most basic tutorials tell you to only open TCP 443. Never block Port 80! Port 80 is strictly required for the ACME HTTP-01 challenge to renew Let's Encrypt certificates. Furthermore, Caddy supports HTTP/3 natively, which uses the QUIC protocol over UDP 443. To achieve lightning-fast, multiplexed streaming, you must explicitly open UDP 443 in your firewall.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Allow Port 80 (Required for Let's Encrypt HTTP Challenge and redirects)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 80/tcp

&lt;span class="c"&gt;# Allow Port 443 TCP (Standard HTTPS)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 443/tcp

&lt;span class="c"&gt;# Allow Port 443 UDP (SRE Secret: Required for HTTP/3 QUIC performance)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 443/udp

&lt;span class="c"&gt;# Reload the firewall to apply changes&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 3: Architecting the Reverse Proxy
&lt;/h2&gt;

&lt;p&gt;If you are running a Node.js, Python, or Docker application locally (e.g., on Port 8080), you should never expose that port directly to the internet. Caddy acts as a Reverse Proxy, intercepting traffic, encrypting it with HTTPS, and passing it securely to your local application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE WARNING: The Nginx X-Forwarded-For Anti-Pattern&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In Nginx, developers are forced to manually configure &lt;code&gt;X-Forwarded-For&lt;/code&gt; headers so the backend application can see the user's real IP address. Many mistakenly copy this behavior into their Caddyfile. Do not do this. Caddy automatically sets &lt;code&gt;X-Forwarded-For&lt;/code&gt;, &lt;code&gt;X-Forwarded-Proto&lt;/code&gt;, and &lt;code&gt;X-Forwarded-Host&lt;/code&gt; natively. Manually adding these headers in Caddy is an anti-pattern that can double-append headers and break your application logic.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Edit the configuration file (&lt;code&gt;/etc/caddy/Caddyfile&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Replace with your actual domain name pointing to your server's IP
api.yourdomain.com {

    # Enable Zstandard and Gzip compression for faster payload delivery
    encode zstd gzip

    # The SRE Reverse Proxy Block (No manual IP headers needed!)
    reverse_proxy 127.0.0.1:8080

    # Optional: Apply Enterprise Security Headers (Avoiding the HSTS preload trap)
    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "DENY"
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note on WebSockets:&lt;/em&gt; Unlike Nginx, which requires complex &lt;code&gt;Connection Upgrade&lt;/code&gt; directives, Caddy natively detects and proxies WebSocket connections automatically without any additional configuration!&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 4: Zero-Downtime SRE Reloads
&lt;/h2&gt;

&lt;p&gt;Once your Caddyfile is written, you must apply the changes. Never use &lt;code&gt;sudo systemctl restart caddy&lt;/code&gt; in a production environment. A restart kills the process, instantly dropping all active user connections and causing application downtime.&lt;/p&gt;

&lt;p&gt;Instead, use Caddy's built-in formatting and zero-downtime reload capabilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Format the Caddyfile beautifully&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;caddy &lt;span class="nb"&gt;fmt&lt;/span&gt; &lt;span class="nt"&gt;--overwrite&lt;/span&gt; /etc/caddy/Caddyfile

&lt;span class="c"&gt;# 2. Validate the configuration syntax before applying&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;caddy validate &lt;span class="nt"&gt;--config&lt;/span&gt; /etc/caddy/Caddyfile

&lt;span class="c"&gt;# 3. Perform a zero-downtime graceful reload&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl reload caddy

&lt;span class="c"&gt;# 4. Monitor logs to ensure Let's Encrypt successfully provisioned SSL&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; caddy &lt;span class="nt"&gt;-f&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 5: The ServerMO Bare Metal Advantage
&lt;/h2&gt;

&lt;p&gt;Caddy is an incredibly powerful web server, but because it runs on the Go runtime (which utilizes a Garbage Collector), it can consume slightly more memory under massive concurrent loads compared to Nginx. If you are deploying an API Gateway handling tens of thousands of HTTP/3 streams, running it on a shared Cloud VM will introduce "noisy neighbor" latency.&lt;/p&gt;

&lt;p&gt;To unlock the absolute peak performance of Caddy, deploy it directly on &lt;strong&gt;ServerMO Dedicated Bare Metal Servers&lt;/strong&gt;. Our infrastructure provides dedicated AMD EPYC CPU cores, meaning Caddy never fights for compute cycles during aggressive SSL handshakes. Combined with our &lt;strong&gt;10Gbps to 25Gbps Unmetered Networks&lt;/strong&gt;, you can push Caddy's HTTP/3 streaming to the absolute limit without ever worrying about cloud bandwidth throttling or exorbitant egress taxes.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Caddy Web Server FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does Caddy replace Nginx for Reverse Proxy performance?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes. While Nginx has a slight edge in raw static file throughput, Caddy offers superior operational efficiency. Caddy handles automatic HTTPS, native HTTP/3 (QUIC) streaming, and WebSocket upgrades out-of-the-box without the verbose configuration required by Nginx.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What ports does Caddy need open on Ubuntu UFW?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Caddy requires three specific ports: TCP 80 for ACME HTTP-01 certificate challenges, TCP 443 for standard HTTPS traffic, and UDP 443 to enable high-speed HTTP/3 streaming connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I pass the real client IP through a Caddy Reverse Proxy?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Unlike Nginx, you do not need to configure anything. Caddy automatically passes the real client IP via the &lt;code&gt;X-Forwarded-For&lt;/code&gt; header by default. Manually setting this in your Caddyfile is an anti-pattern and can duplicate headers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why did my Caddy Let's Encrypt certificate fail to provision?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Certificate failures usually occur for two reasons: either your domain's DNS A record hasn't fully propagated to your server's IP, or your server's firewall is blocking Port 80, which Let's Encrypt requires to validate domain ownership.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Read the full tutorial on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/install-caddy-reverse-proxy-ubuntu/" rel="noopener noreferrer"&gt;How to Install Caddy on Ubuntu 24.04: Production Reverse Proxy | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>devops</category>
      <category>caddy</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Real-Time RAG: Setup Redpanda &amp; Vector DB on Bare Metal</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Fri, 31 Jul 2026 10:50:07 +0000</pubDate>
      <link>https://dev.to/jaksontate/real-time-rag-setup-redpanda-vector-db-on-bare-metal-3io1</link>
      <guid>https://dev.to/jaksontate/real-time-rag-setup-redpanda-vector-db-on-bare-metal-3io1</guid>
      <description>&lt;p&gt;Bypass Kafka JVM latency limits. Master Redpanda C++ tuning, defeat catastrophic context injection attacks, and eradicate the AWS streaming cloud tax entirely on ServerMO Bare Metal.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: Escaping the JVM Streaming Bottleneck
&lt;/h2&gt;

&lt;p&gt;Standard RAG (Retrieval-Augmented Generation) architectures are inherently static—they read from dead PDF files and stale knowledge bases. However, modern enterprise AI demands &lt;strong&gt;Real-Time RAG&lt;/strong&gt;. If you are building an AI financial analyst, it must ingest live stock market tickers, evaluate them instantly, and generate a response in milliseconds.&lt;/p&gt;

&lt;p&gt;To stream millions of live events, developers traditionally default to Apache Kafka. &lt;strong&gt;This is a catastrophic architectural mistake for Real-Time AI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apache Kafka is written in Scala/Java and relies entirely on the JVM (Java Virtual Machine). Under heavy streaming loads, the JVM performs unpredictable "Garbage Collection" (GC). A multi-millisecond GC pause might be acceptable for basic logging, but in AI, it causes devastating tail-latency spikes, completely stalling the LLM's Time to First Token (TTFT).&lt;/p&gt;

&lt;p&gt;To fix this, elite Data Engineers deploy &lt;strong&gt;Redpanda&lt;/strong&gt;. Redpanda's &lt;strong&gt;thread-per-core C++ architecture&lt;/strong&gt; bypasses &lt;strong&gt;JVM Garbage Collection pauses&lt;/strong&gt;, enabling &lt;strong&gt;microsecond latency&lt;/strong&gt; for &lt;strong&gt;Real-Time RAG&lt;/strong&gt; pipelines directly hitting &lt;strong&gt;NVMe Bare Metal storage&lt;/strong&gt;. It is a single, ultra-fast binary that eliminates the operational nightmare of ZooKeeper entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 2: The SRE Hardware Tuning Protocol (rpk)
&lt;/h2&gt;

&lt;p&gt;Installing Redpanda is only half the battle. If you run it on default Linux kernel settings, you are suffocating your NVMe drives. Standard Linux relies on the page cache and generic I/O schedulers (like &lt;code&gt;mq-deadline&lt;/code&gt;), which introduce CPU bottlenecks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;SRE ARCHITECTURE WARNING: THE XFS VS ZFS CONFLICT&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
ServerMO frequently recommends ZFS for general data protection. However, &lt;strong&gt;you must NEVER run Redpanda on a ZFS filesystem!&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;Redpanda is explicitly designed to bypass the Linux kernel using Direct I/O (&lt;code&gt;O_DIRECT&lt;/code&gt;) to write straight to the NVMe flash. ZFS relies heavily on its own ARC (Adaptive Replacement Cache) and Copy-on-Write mechanisms. If you combine them, the two caching algorithms will fight each other, resulting in catastrophic throughput degradation. You must format your dedicated Redpanda Bare Metal drives strictly with &lt;strong&gt;XFS&lt;/strong&gt; or &lt;strong&gt;EXT4&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  SRE Hidden Gem: The &lt;code&gt;rpk iotune&lt;/code&gt; Magic
&lt;/h3&gt;

&lt;p&gt;To extract maximum IOPS, you must run the &lt;code&gt;rpk iotune&lt;/code&gt; command. This built-in SRE tool aggressively benchmarks your specific NVMe hardware, analyzes your CPU cores, and outputs a custom &lt;code&gt;io-config.yaml&lt;/code&gt;. It optimizes thread interrupt requests (IRQs) across your CPU and Mellanox NICs, ensuring that streaming data writes directly to the flash memory without touching the CPU's wait queues.&lt;/p&gt;

&lt;p&gt;Execute the following Bash script to securely import GPG keys, install Redpanda, profile your NVMe drives, and tune system governors:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="c"&gt;# Real-Time RAG: Redpanda Installation &amp;amp; SRE Hardware Tuning Script&lt;/span&gt;

&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-e&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Step 1: Securely Importing Redpanda GPG Keys &amp;amp; Repository ==="&lt;/span&gt;
&lt;span class="c"&gt;# Import GPG key manually (Avoid risky curl | bash pipes)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;curl &lt;span class="nt"&gt;-1sLf&lt;/span&gt; &lt;span class="s1"&gt;'[https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/gpg/pubkey-LATEST.gpg](https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/cfg/gpg/pubkey-LATEST.gpg)'&lt;/span&gt; | &lt;span class="nb"&gt;sudo &lt;/span&gt;gpg &lt;span class="nt"&gt;--dearmor&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; /usr/share/keyrings/redpanda-archive-keyring.gpg

&lt;span class="c"&gt;# Add Redpanda APT repository&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"deb [signed-by=/usr/share/keyrings/redpanda-archive-keyring.gpg] [https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/deb/](https://dl.redpanda.com/nzc4ZYQK3WRGd9sy/redpanda/deb/) stable any"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/redpanda.list

&lt;span class="c"&gt;# Update package list &amp;amp; install Redpanda&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;redpanda &lt;span class="nt"&gt;-y&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Step 2: Running Hardware-Specific NVMe Profiling (rpk iotune) ==="&lt;/span&gt;
&lt;span class="c"&gt;# Note: Ensure this command runs on an XFS or EXT4 partition (Do NOT use ZFS)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;rpk iotune

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Step 3: Applying SRE Hardware Optimizations &amp;amp; Starting Service ==="&lt;/span&gt;
&lt;span class="c"&gt;# Apply generated NVMe &amp;amp; CPU power governor optimizations&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;rpk redpanda tune all

&lt;span class="c"&gt;# Enable and start the Redpanda service&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; redpanda

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"=== Redpanda Installation &amp;amp; Tuning Complete! ==="&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 3: Architecting the Vector DB Pipeline
&lt;/h2&gt;

&lt;p&gt;Once Redpanda is streaming live data at microsecond latency, it must be embedded and ingested into a high-throughput &lt;strong&gt;Vector Database&lt;/strong&gt; (such as Milvus, Qdrant, or Pinecone). This database acts as the AI's "Live Memory."&lt;/p&gt;

&lt;p&gt;However, blindly querying the Vector DB for every single user prompt will introduce 100ms+ of latency per request. Elite architectures (like VoiceAgentRAG) employ a "Fast Talker / Slow Thinker" design.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;SRE HIDDEN GEM: SEMANTIC CACHING &amp;amp; THRESHOLD TUNING&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Do not hit the Vector DB for repetitive queries. Implement an in-memory &lt;strong&gt;Semantic Cache&lt;/strong&gt; (using Redis or FAISS). When a user asks a question, embed the query and check the cache first.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The AI Fact Check:&lt;/strong&gt; Many tutorials claim you should set the cosine similarity threshold to &lt;code&gt;&amp;gt;0.95&lt;/code&gt;. This is mathematically flawed. With modern models like OpenAI's &lt;code&gt;text-embedding-3-small&lt;/code&gt; or BGE-m3, natural human language similarity usually peaks between 0.70 and 0.85. If you set it to 0.95, the cache will only trigger if the user copies and pastes the exact same sentence verbatim. Set your threshold dynamically (e.g., &lt;code&gt;&amp;gt;0.85&lt;/code&gt;) to ensure the cache actually catches semantic variations and returns the context instantly in under 1ms.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 4: Defeating Context Injection (Security Alert)
&lt;/h2&gt;

&lt;p&gt;When you pipe live, unverified data streams directly into your Vector DB and LLM, you are opening your entire infrastructure to a devastating cyberattack.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🚨 &lt;strong&gt;CRITICAL SECURITY WARNING: CONTEXT INJECTION &amp;amp; AGENT HIJACKING&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Traditional Web Application Firewalls (WAFs) only look at network headers. They completely ignore adversarial payloads hidden inside valid data streams.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Threat:&lt;/strong&gt; An attacker submits data containing invisible HTML tags (e.g., &lt;code&gt;&amp;lt;img src=x onerror=.../&amp;gt;&lt;/code&gt;). Redpanda streams this, the Vector DB indexes it, and the LLM reads it. The LLM cannot distinguish between your System Prompt and the retrieved context. It executes the attacker's hidden payload, resulting in &lt;strong&gt;Tool-Calling Agent Hijacking&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The SRE Solution:&lt;/strong&gt; You must deploy a strict LLM Firewall / Data Sanitization layer &lt;strong&gt;before&lt;/strong&gt; data hits your Vector DB to strip all markup, validate input structures, and classify prompt-override attempts.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 5: Eradicating the Cloud Egress Tax (FinOps)
&lt;/h2&gt;

&lt;p&gt;If you attempt to build this Real-Time RAG architecture on AWS or GCP using Managed Kafka (MSK) or Confluent Cloud, your CFO will likely shut down the project within a month.&lt;/p&gt;

&lt;p&gt;To ensure data durability, cloud providers force you to replicate streaming data across 3 Availability Zones (Multi-AZ). &lt;strong&gt;Public clouds charge astronomical data transfer fees for Cross-AZ traffic.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For a high-throughput AI streaming pipeline, FinOps audits reveal that &lt;strong&gt;Egress and Cross-AZ bandwidth fees constitute over 60% of the entire infrastructure bill.&lt;/strong&gt; You are literally paying the cloud provider massive amounts of money just to move your own data from one server rack to another.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 6: The ServerMO Bare Metal Mandate
&lt;/h2&gt;

&lt;p&gt;To build a financially viable and technically superior Real-Time RAG pipeline, you must escape the public cloud trap. You cannot achieve true microsecond latency if your streaming data is choked by hypervisors and metered network interfaces.&lt;/p&gt;

&lt;p&gt;By deploying Redpanda and your Vector Databases directly onto &lt;strong&gt;ServerMO Dedicated Bare Metal Servers&lt;/strong&gt;, you achieve total hardware supremacy. Our enterprise infrastructure provides massive AMD EPYC CPU cores, raw NVMe Direct I/O access, and crucially, &lt;strong&gt;100Gbps Unmetered Networking&lt;/strong&gt;. Say goodbye to the 60% Cloud Egress Tax, eradicate JVM bottlenecks, and deliver true Real-Time AI intelligence natively on ServerMO.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-Time RAG &amp;amp; Streaming FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why is Redpanda faster than Apache Kafka for Real-Time AI?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Apache Kafka relies on the Java Virtual Machine (JVM). Under heavy AI streaming workloads, JVM Garbage Collection (GC) triggers multi-millisecond pauses, severely increasing latency. Redpanda is written in C++ using a thread-per-core architecture, entirely bypassing JVM GC pauses and delivering consistent microsecond latency.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Context Injection in RAG pipelines?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Context Injection is a critical security vulnerability where malicious instructions (like hidden HTML tags overriding system prompts) are embedded into live data streams. Traditional Web Application Firewalls (WAFs) cannot detect this. When the Vector DB passes this data to the LLM, it executes the attacker's payload, hijacking the AI Agent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does cross-AZ replication cost for streaming data?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In public clouds like AWS or GCP, Cross-AZ (Availability Zone) replication and data egress fees are astronomical. For heavy streaming pipelines, these bandwidth fees can account for over 60% of your entire infrastructure bill. Deploying on unmetered Bare Metal eliminates this Cloud Tax entirely.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do I need NVMe drives for Redpanda?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Redpanda is designed to bypass the Linux kernel page cache by utilizing Direct I/O (&lt;code&gt;O_DIRECT&lt;/code&gt;). By running the &lt;code&gt;rpk iotune&lt;/code&gt; command, Redpanda profiles your specific NVMe hardware and optimizes thread interrupts, allowing it to extract maximum IOPS directly from the physical SSD without CPU bottlenecks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I prevent RAG latency bottlenecks?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
RAG latency compounds across embedding, vector retrieval, and LLM generation. To prevent bottlenecks, you must optimize Time to First Token (TTFT) by reducing prompt sizes, deploying lightweight re-rankers, and utilizing Semantic Caching (like VoiceAgentRAG architectures) to bypass repetitive Vector DB queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why shouldn't I use ZFS with Redpanda?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Redpanda utilizes &lt;code&gt;O_DIRECT&lt;/code&gt; to bypass the Linux page cache and write directly to the NVMe disk. ZFS relies heavily on its own ARC (Adaptive Replacement Cache) and Copy-on-Write architecture. Using ZFS with Redpanda causes the two caching systems to conflict, destroying throughput. Always format Redpanda storage nodes with XFS.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/setup-redpanda-real-time-rag/" rel="noopener noreferrer"&gt;Real-Time RAG: Setup Redpanda &amp;amp; Vector DB on Bare Metal | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>storage</category>
      <category>redpanda</category>
    </item>
    <item>
      <title>Software RAID vs Hardware RAID for NVMe: The PCIe Bottleneck</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 23 Jul 2026 11:01:40 +0000</pubDate>
      <link>https://dev.to/jaksontate/software-raid-vs-hardware-raid-for-nvme-the-pcie-bottleneck-2hfl</link>
      <guid>https://dev.to/jaksontate/software-raid-vs-hardware-raid-for-nvme-the-pcie-bottleneck-2hfl</guid>
      <description>&lt;p&gt;For two decades, SysAdmins operated under a strict golden rule: &lt;em&gt;"Always use a dedicated Hardware RAID controller to protect your disks."&lt;/em&gt; This was an indisputable fact in the era of spinning HDDs and early SAS SSDs, where the RAID card efficiently offloaded parity calculations from the server's CPU.&lt;/p&gt;

&lt;p&gt;However, NVMe technology has shattered this rule. Today, inserting a hardware RAID controller (such as a traditional Broadcom MegaRAID or Dell PERC) into a modern NVMe environment creates the single greatest bottleneck in the data center.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: The PCIe Lane Starvation
&lt;/h2&gt;

&lt;p&gt;Why does Hardware RAID drastically reduce NVMe performance? An NVMe SSD does not rely on legacy storage protocols; it communicates directly over the PCIe bus. A single PCIe Gen 4 NVMe drive requires 4 PCIe lanes to achieve its 7 GB/s maximum throughput. If you connect 8 NVMe drives, they collectively demand 32 PCIe lanes.&lt;/p&gt;

&lt;p&gt;Unfortunately, a traditional Hardware RAID controller connects to the motherboard via a single x8 or x16 PCIe slot. By forcing the massive bandwidth of 8 NVMe drives through a tiny 16-lane funnel, you instantly cap the aggregate throughput by up to 50% and severely penalize small-block IOPS.&lt;/p&gt;

&lt;p&gt;By migrating away from hardware controllers and utilizing Linux Software RAID (&lt;code&gt;mdadm&lt;/code&gt; or ZFS) on Bare Metal, the NVMe drives connect directly to the motherboard. This utilizes the massive 128 PCIe lanes provided by modern AMD EPYC or Intel Xeon processors, completely bypassing the controller bottleneck.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 2: Debunking the Hardware Cache Myth
&lt;/h2&gt;

&lt;p&gt;Hardware RAID vendors aggressively market their products by highlighting their "Battery-Backed Cache" (BBU) or Non-Volatile Cache (NVDIR). They claim this caching layer prevents data loss during sudden power outages and accelerates write speeds. This is a marketing myth when applied to Enterprise NVMe.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cache Saturation:&lt;/strong&gt; A high-end RAID controller might possess 4GB or 8GB of onboard cache. A single NVMe drive writes at 7 GB/s. Under heavy database workloads, the hardware cache is saturated and flushed in less than a second, rendering it useless as a performance buffer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native Power Loss Protection (PLP):&lt;/strong&gt; Enterprise-grade NVMe drives have their own built-in PLP capacitors. If power is lost, the drive relies on its onboard capacitor to flush all in-flight data directly into NAND flash safely. You do not need a RAID card battery to protect your data.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Phase 3: VROC vs mdadm vs ZFS: The Showdown
&lt;/h2&gt;

&lt;p&gt;If Hardware RAID is obsolete for NVMe, which Software RAID solution should an enterprise adopt?&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature Metric&lt;/th&gt;
&lt;th&gt;Linux mdadm (Kernel)&lt;/th&gt;
&lt;th&gt;Intel VROC&lt;/th&gt;
&lt;th&gt;ZFS (OpenZFS)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Raw Performance (IOPS)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Highest (Zero Overhead)&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Moderate (Overhead from CoW)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hardware Lock-in&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;None (100% Hardware Agnostic)&lt;/td&gt;
&lt;td&gt;Locked to Intel CPUs &amp;amp; Dongles&lt;/td&gt;
&lt;td&gt;None (100% Hardware Agnostic)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;Expensive Licensing / Hardware Keys&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High-Speed Databases (RAID 10)&lt;/td&gt;
&lt;td&gt;Legacy Intel-only Environments&lt;/td&gt;
&lt;td&gt;Data Integrity, Snapshots &amp;amp; Storage&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;🔑 &lt;strong&gt;The VROC Reality:&lt;/strong&gt; Intel Virtual RAID on CPU (VROC) requires a physical hardware key (dongle) to be plugged into the motherboard to unlock enterprise features like RAID 5, and it strictly locks your infrastructure to Intel processors. Linux &lt;code&gt;mdadm&lt;/code&gt; decisively outperforms VROC by offering superior performance, zero licensing fees, and seamless compatibility across both AMD EPYC and Intel architectures.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 4: Disaster Recovery &amp;amp; Security Realities
&lt;/h2&gt;

&lt;p&gt;Beyond raw performance, the most critical reason Enterprise SREs migrate to Software RAID is to eliminate &lt;strong&gt;Vendor Lock-in&lt;/strong&gt; during Disaster Recovery.&lt;/p&gt;

&lt;p&gt;If a proprietary hardware RAID controller fails, your data is severely compromised. To recover the array, you must source the exact same model of RAID controller, frequently requiring the exact same firmware version. This dependency introduces catastrophic downtime risks.&lt;/p&gt;

&lt;p&gt;By utilizing Linux Software RAID (&lt;code&gt;mdadm&lt;/code&gt;), the RAID metadata is written directly to the NVMe drives using universally open standards. If the server's motherboard or CPU fails, you can physically move the NVMe drives into any other Linux Bare Metal server in the world, and mount the data array in seconds. This is genuine Disaster Recovery security.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 5: Deploying mdadm RAID 10 on Ubuntu
&lt;/h2&gt;

&lt;p&gt;It is highly recommended to avoid configuring RAID 5 or RAID 6 on NVMe drives unless strictly deploying for cold storage. The intensive parity calculations create massive Write Amplification, burning through the NVMe flash memory's TBW (Terabytes Written) lifespan. For performance databases, RAID 10 is the absolute gold standard.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;SRE CRITICAL FIX: The Continuous TRIM Trap &amp;amp; Chunk Size&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Many amateur tutorials advise adding the &lt;code&gt;discard&lt;/code&gt; flag to your &lt;code&gt;/etc/fstab&lt;/code&gt; mount options. &lt;strong&gt;Never do this for NVMe databases.&lt;/strong&gt; The &lt;code&gt;discard&lt;/code&gt; flag enables Continuous TRIM, meaning the OS halts NVMe queues to perform garbage collection every time a file is deleted, destroying your database I/O. Instead, rely on &lt;code&gt;fstrim.timer&lt;/code&gt; for scheduled background optimization.  &lt;/p&gt;

&lt;p&gt;Furthermore, the default &lt;code&gt;mdadm&lt;/code&gt; chunk size is 512KB. Databases (like MySQL/PostgreSQL) write in 8KB or 16KB pages. Writing 16KB of data into a 512KB chunk causes severe Write Amplification. Always explicitly set &lt;code&gt;--chunk=64&lt;/code&gt; or &lt;code&gt;--chunk=128&lt;/code&gt; when creating your array to align with database page structures.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Install the mdadm utility&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;mdadm &lt;span class="nt"&gt;-y&lt;/span&gt;

&lt;span class="c"&gt;# 2. Wipe any legacy RAID superblocks from your four NVMe drives&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;mdadm &lt;span class="nt"&gt;--zero-superblock&lt;/span&gt; /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1

&lt;span class="c"&gt;# 3. Create the High-Performance RAID 10 Array (Optimized Chunk Size)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;mdadm &lt;span class="nt"&gt;--create&lt;/span&gt; &lt;span class="nt"&gt;--verbose&lt;/span&gt; /dev/md0 &lt;span class="nt"&gt;--level&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10 &lt;span class="nt"&gt;--chunk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;64 &lt;span class="nt"&gt;--raid-devices&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4 /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1

&lt;span class="c"&gt;# 4. Format the array with an enterprise filesystem (e.g., XFS)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;mkfs.xfs &lt;span class="nt"&gt;-f&lt;/span&gt; /dev/md0

&lt;span class="c"&gt;# 5. Save the RAID layout to persist across reboots&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;mdadm &lt;span class="nt"&gt;--detail&lt;/span&gt; &lt;span class="nt"&gt;--scan&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/mdadm/mdadm.conf
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-initramfs &lt;span class="nt"&gt;-u&lt;/span&gt;

&lt;span class="c"&gt;# 6. Mount the array automatically via fstab (NO DISCARD FLAG)&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'/dev/md0 /mnt/database xfs defaults,nofail 0 0'&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; /etc/fstab

&lt;span class="c"&gt;# 7. SRE Pro-Tip: Enable Periodic TRIM (Instead of Continuous 'discard')&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; &lt;span class="nt"&gt;--now&lt;/span&gt; fstrim.timer

&lt;span class="c"&gt;# 8. SRE Pro-Tip: Disable legacy I/O schedulers for NVMe devices&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in &lt;/span&gt;0 1 2 3&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do &lt;/span&gt;&lt;span class="nb"&gt;echo &lt;/span&gt;none | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /sys/block/nvme&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;i&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;n1/queue/scheduler&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 6: The ServerMO Bare Metal Advantage
&lt;/h2&gt;

&lt;p&gt;Optimizing Software RAID is futile if you deploy it on shared cloud VMs where hypervisors artificially throttle NVMe access and cap IOPS. Hardware RAID cards are obsolete, and cloud storage block volumes are far too slow for demanding enterprise databases.&lt;/p&gt;

&lt;p&gt;To unlock the true throughput of Software RAID, you must deploy on &lt;strong&gt;ServerMO Dedicated Bare Metal Servers&lt;/strong&gt;. Our enterprise infrastructure bypasses all virtualization layers, connecting your Linux OS directly to the massive PCIe Gen5 lanes of AMD EPYC and Intel Xeon processors. Paired with our 100Gbps+ unmetered networking, ServerMO guarantees that your direct-attached NVMe storage runs at absolute maximum theoretical speeds without bottlenecks.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 NVMe Storage &amp;amp; RAID FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is Hardware RAID bad for NVMe SSDs?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes. Hardware RAID controllers introduce severe PCIe lane bottlenecks and ASIC processing overhead. A typical RAID card only has an x8 or x16 PCIe interface, instantly throttling the aggregate bandwidth of multiple Gen 4/Gen 5 NVMe drives. Software RAID allows direct motherboard connections, preserving maximum IOPS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intel VROC vs Linux mdadm: Which is better for NVMe RAID?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Linux &lt;code&gt;mdadm&lt;/code&gt; is widely preferred for robust enterprise environments. It is completely free, open-source, and works flawlessly across both AMD EPYC and Intel Xeon processors. Intel VROC requires physical hardware dongles (keys) and severely locks you into the Intel CPU ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the best RAID configuration for NVMe Database Servers?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
The optimal configuration is RAID 10 using Linux Software RAID (&lt;code&gt;mdadm&lt;/code&gt; or ZFS Mirrored VDEVs). Avoid RAID 5 or RAID 6 for NVMe databases, as the intensive parity calculations cause high CPU wait times and unnecessarily degrade the NVMe flash memory lifespan via write amplification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is the discard mount option bad for NVMe RAID arrays?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Adding &lt;code&gt;discard&lt;/code&gt; to &lt;code&gt;/etc/fstab&lt;/code&gt; triggers Continuous TRIM, meaning the OS sends a TRIM command for every single file deletion instantly. This blocks the NVMe I/O queues and destroys database performance. The SRE best practice is to omit &lt;code&gt;discard&lt;/code&gt; and instead enable &lt;code&gt;fstrim.timer&lt;/code&gt; for periodic, background TRIM operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is Hardware RAID safer than Software RAID during power loss?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Not with Enterprise NVMe. Data center NVMe drives come equipped with their own internal PLP (Power Loss Protection) capacitors, which flush in-flight data directly to NAND during a power failure. This makes the battery-backed cache (BBU) on legacy hardware RAID cards obsolete.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full benchmark guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/blogs/nvme-software-vs-hardware-raid/" rel="noopener noreferrer"&gt;Software RAID vs Hardware RAID for NVMe: The PCIe Bottleneck | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>storage</category>
      <category>database</category>
    </item>
    <item>
      <title>WekaFS vs Ceph on Bare Metal: Stop AI GPU Starvation</title>
      <dc:creator>Jakson Tate</dc:creator>
      <pubDate>Thu, 23 Jul 2026 10:46:58 +0000</pubDate>
      <link>https://dev.to/jaksontate/wekafs-vs-ceph-on-bare-metal-stop-ai-gpu-starvation-3mg3</link>
      <guid>https://dev.to/jaksontate/wekafs-vs-ceph-on-bare-metal-stop-ai-gpu-starvation-3mg3</guid>
      <description>&lt;p&gt;AI companies are spending millions of dollars on high-end NVIDIA H100 and A100 GPU clusters, only to watch them sit completely idle &lt;strong&gt;70% of the time&lt;/strong&gt;. This phenomenon is known as &lt;strong&gt;GPU Starvation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The computation speeds of modern tensor cores have exponentially outpaced traditional storage architectures. If you attempt to feed petabytes of unstructured training data (LLM corpora, computer vision images) to your GPUs using legacy NFS arrays or standard cloud block storage, the GPUs will process the data instantly and then stall, waiting for the storage layer to catch up. Traditional storage protocols traverse the heavy Linux kernel network stack, causing catastrophic microsecond delays.&lt;/p&gt;

&lt;p&gt;To saturate GPU compute capacity, infrastructure architects must deploy &lt;strong&gt;Distributed Parallel File Systems&lt;/strong&gt;. These systems stripe data concurrently across dozens of Enterprise NVMe drives, bypassing CPU bottlenecks and feeding datasets straight to the GPU memory. The two absolute titans in this space are &lt;strong&gt;WekaFS&lt;/strong&gt; and &lt;strong&gt;Ceph&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 1: WekaFS vs Ceph - The Enterprise Showdown
&lt;/h2&gt;

&lt;p&gt;When designing an AI storage fabric, you are forced to choose between the undisputed open-source king (Ceph) and the proprietary performance monster (WekaFS). Understanding their architectural differences is critical for scaling machine learning pipelines.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Architectural Metric&lt;/th&gt;
&lt;th&gt;Ceph (Open Source)&lt;/th&gt;
&lt;th&gt;WekaFS (Proprietary)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Core Architecture&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Kernel-reliant, Software-Defined Storage&lt;/td&gt;
&lt;td&gt;DPDK Kernel-Bypass (NeuralMesh)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Maximum IOPS &amp;amp; Throughput&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;High (Excellent for General Enterprise)&lt;/td&gt;
&lt;td&gt;Extreme (Highest in the Industry)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deployment Cost &amp;amp; License&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Free &amp;amp; Open-Source (No Vendor Lock-in)&lt;/td&gt;
&lt;td&gt;Expensive Proprietary Licensing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Block (RBD), File (CephFS), Object (RGW)&lt;/td&gt;
&lt;td&gt;Strictly Parallel File System &amp;amp; Object Tiering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ideal AI Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Large-scale dataset lakes &amp;amp; Hybrid Cloud&lt;/td&gt;
&lt;td&gt;Ultra-low latency GPU active training&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why is WekaFS so fast?
&lt;/h3&gt;

&lt;p&gt;WekaFS utilizes &lt;strong&gt;DPDK (Data Plane Development Kit)&lt;/strong&gt; and &lt;strong&gt;SR-IOV&lt;/strong&gt;. It literally rips control away from the Linux OS. Instead of the kernel processing network packets, WekaFS assigns dedicated CPU cores to poll the NVMe drives and network interface directly, slashing latency to absolute zero. Its NeuralMesh architecture effectively turns unused NVMe and CPUs into a massive, unified cache for the GPUs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💰 &lt;strong&gt;FINOPS WARNING: The WekaFS Licensing Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
While WekaFS DPDK speed is unparalleled, it comes with a massive financial burden. WekaFS charges expensive software licensing fees based on Terabytes/Year. For many AI startups and enterprises scaling to petabytes of data, the recurring software licensing cost of WekaFS will quickly dwarf the actual cost of buying the physical NVMe servers themselves.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why choose Ceph?
&lt;/h3&gt;

&lt;p&gt;Ceph handles petabytes of data at CERN and Bloomberg. It provides ultimate flexibility without licensing fees (&lt;strong&gt;Zero Vendor Lock-in&lt;/strong&gt;). While it may not beat WekaFS in raw microsecond latency out-of-the-box, a properly tuned All-NVMe Ceph cluster on a massive 400Gbps network with hundreds of nodes can achieve theoretical limits of 1 TiB/s (Terabyte per second) throughput. &lt;em&gt;(Note: Achieving 1 TiB/s requires immense hardware scale, usually hundreds of dedicated NVMe nodes; do not expect this metric on a small 5-node cluster.)&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 2: The Kernel SRE Hacks (Secure IOMMU &amp;amp; C-States)
&lt;/h2&gt;

&lt;p&gt;If you choose to deploy Ceph, out-of-the-box performance on NVMe drives will be abysmal. You must execute deep kernel-level tuning to stop the Linux OS from suffocating your drives.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🛡️ &lt;strong&gt;SRE SECURE GEM: The IOMMU Spinlock Trap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
When an NVMe drive pushes millions of IOPS, the Linux IOMMU (Input-Output Memory Management Unit) struggles to translate memory addresses fast enough. This creates massive CPU spinlock contention, effectively cutting your cluster's IOPS in half.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Security Trap:&lt;/strong&gt; Many amateur tutorials advise passing &lt;code&gt;intel_iommu=off&lt;/code&gt;. This completely disables IOMMU, removing Direct Memory Access (DMA) attack protection and breaking container isolation. This is a severe security risk in multi-tenant environments.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Secure SRE Fix:&lt;/strong&gt; On highly trusted Bare Metal servers, edit your GRUB configuration (&lt;code&gt;/etc/default/grub&lt;/code&gt;) and append strictly &lt;code&gt;iommu=pt&lt;/code&gt; (pass-through) to your &lt;code&gt;GRUB_CMDLINE_LINUX&lt;/code&gt; string. Update GRUB and reboot. This bypasses the performance overhead safely while maintaining baseline hardware security, doubling your random write performance.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Secondly, modern CPUs are designed to save power by entering deep sleep states (C-States). Waking a CPU core from a C6 state to process a Ceph storage request takes roughly &lt;strong&gt;0.133 milliseconds&lt;/strong&gt;. In the AI world, that is an eternity.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install CPU power management utilities&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;linux-tools-common linux-tools-generic &lt;span class="nt"&gt;-y&lt;/span&gt;

&lt;span class="c"&gt;# Force the CPU governor to maximum performance, preventing sleep cycles&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;cpupower frequency-set &lt;span class="nt"&gt;-g&lt;/span&gt; performance

&lt;span class="c"&gt;# Note: You should also enter your server's BIOS and disable "Autonomous Core C-State" &lt;/span&gt;
&lt;span class="c"&gt;# and set the Power Profile to "Maximum Performance".&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Phase 3: The 100Gbps RDMA Network Mandate
&lt;/h2&gt;

&lt;p&gt;A single modern enterprise PCIe Gen 4/Gen 5 NVMe SSD (like the Kioxia CM6) can push over 7 GB/s (which equates to roughly 56 Gbps). If you place 10 of these drives into a single storage node and connect it to a standard 10Gbps or even 25Gbps network, your network switch becomes a massive choke point.&lt;/p&gt;

&lt;p&gt;To build a high-performance AI storage array, you must deploy &lt;strong&gt;100GbE or 400GbE networking&lt;/strong&gt;. Furthermore, you must utilize &lt;strong&gt;RoCEv2 (RDMA over Converged Ethernet)&lt;/strong&gt; or &lt;strong&gt;InfiniBand&lt;/strong&gt;. RDMA allows your GPU compute nodes to read data directly from the storage node's NVMe memory, completely bypassing the CPU on both servers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Tuning Note:&lt;/strong&gt; Do NOT blindly increase your MTU to 9000 (Jumbo Frames) without testing. Depending on your Mellanox NIC firmware, TCP Segmentation Offload (TSO) often performs significantly better at the default MTU of 1500 for Ceph workloads.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Phase 4: The ReadWriteMany K8s Mandate
&lt;/h2&gt;

&lt;p&gt;When deploying storage into a Kubernetes cluster via Rook-Ceph for AI workloads, many architects mistakenly provision &lt;strong&gt;RBD (RADOS Block Device)&lt;/strong&gt;. This is a critical architectural error.&lt;/p&gt;

&lt;p&gt;RBD provisions block storage as &lt;strong&gt;ReadWriteOnce (RWO)&lt;/strong&gt;. This means an RBD image can only be mounted to exactly one node at a time. During distributed AI inference or training, multiple GPU pods across different physical servers need to read the exact same massive LLM weights concurrently. If you use RBD, you are forced to duplicate the 70GB model onto every single node.&lt;/p&gt;

&lt;p&gt;You must deploy &lt;strong&gt;CephFS&lt;/strong&gt;. CephFS acts as a shared distributed file system equipped with dedicated Metadata Servers (MDS). It natively supports &lt;strong&gt;ReadWriteMany (RWX)&lt;/strong&gt;, allowing hundreds of distributed GPU workers to load datasets from a single, high-speed source of truth simultaneously.&lt;/p&gt;




&lt;h2&gt;
  
  
  Phase 5: The ServerMO Bare Metal Advantage
&lt;/h2&gt;

&lt;p&gt;You cannot build a high-throughput NVMe storage cluster on shared public cloud VMs. Cloud providers heavily throttle network bandwidth, abstract NVMe access behind hypervisors, and charge extortionate egress fees when you move massive datasets.&lt;/p&gt;

&lt;p&gt;To unlock the true microsecond latency of WekaFS DPDK or an optimized Ceph NVMe cluster, you must deploy on &lt;strong&gt;ServerMO Dedicated GPU Servers&lt;/strong&gt;. Our Dedicated Bare Metal Servers provide raw, unvirtualized access to PCIe Gen5 lanes, Enterprise NVMe arrays, and dedicated 100Gbps+ unmetered networking, ensuring your AI accelerators are fed instantly and continuously.&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 AI Storage Architecture FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why does my AI Training cluster face GPU Starvation?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
GPU Starvation occurs when ultra-fast accelerators (like NVIDIA H100s) process data faster than the storage layer can provide it. Legacy NFS or slow cloud block storage causes the GPU to idle (wait for I/O). Bypassing this requires an All-NVMe parallel file system (WekaFS or Ceph) combined with a 100Gbps RDMA network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes WekaFS faster than Ceph for AI Workloads?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
WekaFS uses DPDK (Data Plane Development Kit) and SR-IOV to completely bypass the Linux Kernel network stack. Its NeuralMesh architecture routes data directly from NVMe drives to the GPU memory without CPU context switching, delivering unparalleled microsecond latency. However, this speed comes with massive per-TB annual licensing fees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CephFS vs RBD: Which is better for Machine Learning?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
For LLM training and distributed inference, CephFS is superior. AI workloads require multiple GPU nodes to read the same model weights simultaneously. CephFS provides multi-writer POSIX shared access (ReadWriteMany), whereas RBD is strictly for exclusive single-host block attachment (ReadWriteOnce).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why should I use &lt;code&gt;iommu=pt&lt;/code&gt; instead of &lt;code&gt;intel_iommu=off&lt;/code&gt; for Ceph OSDs?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
High-IOPS NVMe drives cause extreme CPU spinlock contention during IOMMU memory translation. While &lt;code&gt;intel_iommu=off&lt;/code&gt; completely disables translation (creating DMA security risks), using &lt;code&gt;iommu=pt&lt;/code&gt; (pass-through) bypasses the performance overhead safely while maintaining baseline hardware security.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can a 5-node Ceph cluster achieve 1 TiB/s throughput?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
No. While Ceph is mathematically capable of achieving 1 TiB/s (Terabyte per second), reaching that scale requires hundreds of dedicated NVMe nodes and a massive 400GbE (RoCEv2) spine-and-leaf network fabric.&lt;/p&gt;




&lt;p&gt;👉 &lt;strong&gt;Read the full benchmark guide on ServerMO:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://www.servermo.com/howto/wekafs-vs-ceph-bare-metal/" rel="noopener noreferrer"&gt;WekaFS vs Ceph on Bare Metal: Stop AI GPU Starvation | ServerMO&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>storage</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
