<?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>Ramdisks on Andrew Quinn&#39;s TILs</title>
    <link>https://til.andrew-quinn.me/tags/ramdisks/</link>
    <description>Recent content in Ramdisks on Andrew Quinn&#39;s TILs</description>
    <image>
      <title>Andrew Quinn&#39;s TILs</title>
      <url>https://til.andrew-quinn.me/papermod-cover.png</url>
      <link>https://til.andrew-quinn.me/papermod-cover.png</link>
    </image>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 26 Jun 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://til.andrew-quinn.me/tags/ramdisks/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Save your disk, write files directly into RAM with /dev/shm</title>
      <link>https://til.andrew-quinn.me/posts/save-your-disk-write-files-directly-into-ram-with-dev-shm/</link>
      <pubDate>Thu, 26 Jun 2025 00:00:00 +0000</pubDate>
      
      <guid>https://til.andrew-quinn.me/posts/save-your-disk-write-files-directly-into-ram-with-dev-shm/</guid>
      <description>&lt;p&gt;Given my interest in extending the life of my SD cards and hard drives
as much as possible,
I&amp;rsquo;m surprised I haven&amp;rsquo;t come across &lt;code&gt;/dev/shm&lt;/code&gt; before.
In a word
it&amp;rsquo;s a world-accessible RAM scratchpad, which seems baked right into POSIX,
so that virtually every &lt;del&gt;Unix&lt;/del&gt; EDIT: &lt;em&gt;Linux&lt;/em&gt;
system already has it mounted as a
&lt;code&gt;tmpfs&lt;/code&gt; by default:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;
&lt;table style=&#34;border-spacing:0;padding:0;margin:0;border:0;&#34;&gt;&lt;tr&gt;&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34; id=&#34;hl-0-1&#34;&gt;&lt;a style=&#34;outline:none;text-decoration:none;color:inherit&#34; href=&#34;#hl-0-1&#34;&gt;1&lt;/a&gt;
&lt;/span&gt;&lt;span style=&#34;white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f&#34; id=&#34;hl-0-2&#34;&gt;&lt;a style=&#34;outline:none;text-decoration:none;color:inherit&#34; href=&#34;#hl-0-2&#34;&gt;2&lt;/a&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td style=&#34;vertical-align:top;padding:0;margin:0;border:0;;width:100%&#34;&gt;
&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ mount | grep &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/dev/shm&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tmpfs on /dev/shm type tmpfs &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;rw,nosuid,nodev,inode64&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://xkcd.com/1053/&#34;&gt;Today&amp;rsquo;s lucky 10,000, indeed&lt;/a&gt;.
It gets mentioned often in Hacker News comments, but surprisingly I couldn&amp;rsquo;t
find any actual articles talking about it.
The existence of &lt;code&gt;/dev/shm&lt;/code&gt; is a boon for me mostly because it means I never
have to worry about whether &lt;code&gt;/tmp&lt;/code&gt; is &lt;em&gt;really&lt;/em&gt; RAM-based again.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
