<?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: reloading</title>
    <description>The latest articles on DEV Community by reloading (@reloading).</description>
    <link>https://dev.to/reloading</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%2F4095480%2F730bb945-4605-4f7f-aaf3-9da71eea432a.png</url>
      <title>DEV Community: reloading</title>
      <link>https://dev.to/reloading</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/reloading"/>
    <language>en</language>
    <item>
      <title>358 MB RSS, 52 MB live heap: where the rest went</title>
      <dc:creator>reloading</dc:creator>
      <pubDate>Wed, 26 Aug 2026 10:00:39 +0000</pubDate>
      <link>https://dev.to/reloading/358-mb-rss-52-mb-live-heap-where-the-rest-went-mn6</link>
      <guid>https://dev.to/reloading/358-mb-rss-52-mb-live-heap-where-the-rest-went-mn6</guid>
      <description>&lt;p&gt;I was debugging a Rust service that had about 52 MB of live allocations but was sitting at 358 MB RSS.&lt;/p&gt;

&lt;p&gt;I expected allocator fragmentation or retained pages. The actual cause was Transparent Huge Pages interacting with jemalloc and the allocation pattern of the workload.&lt;/p&gt;

&lt;p&gt;Changing THP from &lt;code&gt;always&lt;/code&gt; to &lt;code&gt;madvise&lt;/code&gt; dropped RSS from 358 MB to 87 MB, with no application changes.&lt;/p&gt;

&lt;p&gt;I wrote up the debugging process, including the allocator stats, &lt;code&gt;smaps_rollup&lt;/code&gt;, and the THP setting that finally explained it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://certstream.dev/blog/jemalloc-transparent-huge-pages-rss.html" rel="noopener noreferrer"&gt;https://certstream.dev/blog/jemalloc-transparent-huge-pages-rss.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>linux</category>
      <category>performance</category>
      <category>memory</category>
    </item>
  </channel>
</rss>
