<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>SRE on Lin's Blog</title><link>https://coder.tw/en/categories/sre/</link><description>Recent content in SRE on Lin's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Mon, 19 Oct 2026 22:19:33 +0800</lastBuildDate><atom:link href="https://coder.tw/en/categories/sre/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenSearch Memory Alert Fires, Then Recovers: Is It Really Out of Memory?</title><link>https://coder.tw/en/posts/opensearch-memory-alert-old-generation/</link><pubDate>Mon, 19 Oct 2026 22:19:33 +0800</pubDate><guid>https://coder.tw/en/posts/opensearch-memory-alert-old-generation/</guid><description>&lt;p&gt;I manage close to a hundred OpenSearch clusters. A while ago, the heap alert started firing, but only on a few clusters, not all of them. The alert fires when heap usage goes above 75%. On those few clusters, it would recover by itself a few minutes later, and then fire again.&lt;/p&gt;
&lt;p&gt;At first I was worried that a node was in trouble, so I checked the cluster for problems:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cluster status&lt;/strong&gt;: Green, no unassigned shards&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Writes are healthy&lt;/strong&gt;: Fluentd&amp;rsquo;s buffer was not piling up and it was not retrying constantly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No OOM kills&lt;/strong&gt;: the pod restart count did not increase, and &lt;code&gt;Last State&lt;/code&gt; was not OOMKilled&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All three were fine, so I opened the heap metric. Heap usage was a sawtooth: it kept climbing, dropped, then climbed again. The alert fired right when it reached the peak, and recovered a few minutes later when it dropped.&lt;/p&gt;
&lt;p&gt;My first thought was to raise the 75% threshold. But since not every cluster fired, it did not look like a threshold problem alone. What confused me more: the other clusters had the same sawtooth, but they dropped at around 60%, while this one climbed to 80% before dropping. Was its configuration different? Was it busier and short on memory?&lt;/p&gt;
&lt;p&gt;To answer these questions, I first had to understand how the JVM reclaims memory, especially Young GC.&lt;/p&gt;</description></item></channel></rss>