paritybit.ca

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 9e1fcb6d3eb4f8864e58458100e6f39569bb8bf1
parent d8595c96fff1b1e7f6b253a3c88bd7182a6765de
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sun, 26 Apr 2020 19:04:18 -0400

Publish new blog post

Diffstat:
Mpages/blog.md | 1+
Apages/blog/how-much-ram-is-enough.md | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpages/home.md | 4++--
Mpublic/feeds/sitewide-feed.xml | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mpublic/sitemap.xml | 1+
5 files changed, 142 insertions(+), 2 deletions(-)

diff --git a/pages/blog.md b/pages/blog.md @@ -20,6 +20,7 @@ href="https://social.paritybit.ca/@jbauer">Mastodon</a>. ### 2020 <ul> + <li>2020-04-26 <a href="blog/how-much-ram-is-enough">I Ran Out of RAM... Again</a></li> <li>2020-04-25 <a href="blog/why-i-blog">Why I Blog and #100DaysToOffload</a></li> <li>2020-04-11 <a href="blog/decommissioning-my-rackmount-server">Decommissioning My Rackmount Server</a></li> <li>2020-04-07 <a href="blog/housecleaning">Doing Some House Cleaning</a></li> diff --git a/pages/blog/how-much-ram-is-enough.md b/pages/blog/how-much-ram-is-enough.md @@ -0,0 +1,68 @@ +## I Ran Out of RAM... Again + +[//]: # "" + +[//]: # "main.min.css" + +[//]: # + +<div class="byline"> +<b>Written By:</b> Jake Bauer | + <b>Posted:</b> 2020-04-26 | + <b>Last Updated:</b> 2020-04-26 +</div> + +I ran out of RAM yesterday. That is, I filled up all 16GB that I have installed +in my computer and it became completely unresponsive to the point where I had to +press the reset button. Technically, it's completely my fault that it happened. + +I was running a very RAM-hungry program (a certain well-known game called +Minecraft) and I disabled the out-of-memory program killer that I use, earlyoom, +so that it wouldn't kill my game as I was playing it. The game uses about +10-12GB on its own due to being heavily modded which left little headroom before +earlyoom noticed and killed it for using too much memory. Although I'm able to +play the game while having programs like Riot and Firefox open at the same time, +my RAM utilization sits at a precarious 95%, as it was for most of last night. + +As I was playing though, this thought slowly faded into the back of my mind. +Then, I had the bright idea to watch a video in the background to distract me +while I was performing a few mindless in-game chores. I clicked on a link, the +tab opened, and everything locked up. I glanced at my status bar and saw the RAM +utilization indicator bar completely full; the number next to it read 99%. + +When I was installing my operating system and since I only have a 250GB drive, I +opted to forgo a swap partition thinking that I had enough RAM to spare and that +I'd much rather have the extra gigabytes available for storage. While doing my +regular tasks like browsing the internet, using IRC, email, news reader, and +chat clients, and listening to music, my RAM usage rarely climbs above 30%. +Usually, it's just games or really intensive compilations which use a lot of RAM +but it rarely goes higher than about 70%. On the other hand, however, there are +some games which love to eat RAM. Notably, heavily modded versions of Minecraft, +Rimworld, and Cities Skylines. + +Since I don't have swap, when I run out of RAM my computer locks up because it's +unable to swap the memory currently used by inactive programs out to disk which +means the active programs can't get the memory they need to continue working. +The OOM killer built into the Linux kernel is also very slow to act and +struggles to bring the system back into a usable state to the point where it's +much easier to perform a hard reset than to wait the tens of minutes required +hoping that my system will recover. Running a program like earlyoom or having a +swap file or a swap partition does prevent this from happening except that +running earlyoom wouldn't allow me to play Minecraft for very long before it +gets killed, I can't have a swap file since I'm running btrfs on the 4.19 kernel +(I run Debian stable and support for swap files did not come until kernel 5.0), +and I didn't configure my system with a swap partition when installing and it's +a royal pain in the butt to add one now with my encrypted LVM partition scheme. + +This series of events, which I have experienced at least half a dozen times now, +tempts me to get another 16GB of RAM just so I never have to worry about it +happening again. Is it worth it? Well… no, not really. For the work that I do, +it's kind of overkill to spend another $100-$120 on RAM which will go unused for +about 98% of the time I'm using my computer. Next time, I'll just configure my +system with swap and hopefully the available OOM killer implementations will be +a little more refined so that this rarely happens, if ever, again. + +_This is my second post for the +[#100DaysToOffload](https://social.paritybit.ca/tags/100DaysToOffload) +challenge. You can learn more about this callenge over at +https://100daystooffload.com._ diff --git a/pages/home.md b/pages/home.md @@ -17,6 +17,8 @@ rel="me" href="https://social.paritybit.ca/@jbauer">on Mastodon</a>. src="/img/feed-icon.png" width="15" height="15" alt="Click for RSS Feed"/> </a> </div> +2020-04-26 <a class="feed-item" href="blog/how-much-ram-is-enough">I Ran Out of RAM... Again</a> + 2020-04-25 <a class="feed-item" href="blog/why-i-blog">Why I Blog and #100DaysToOffload</a> 2020-04-11 <a class="feed-item" href="blog/decommissioning-my-rackmount-server">Decommissioning My Rackmount Server</a> @@ -35,8 +37,6 @@ rel="me" href="https://social.paritybit.ca/@jbauer">on Mastodon</a>. 2019-12-31 <a class="feed-item" href="projects/borderlands-3-dps-calculator">Borderlands 3 DPS Calculator</a> -2019-12-30 <a class="feed-item" href="blog/automating-publishing">Automating the Publishing of Articles</a> - ### What is a Parity Bit? It is a bit (in the 1's and 0's sense) used in checking for errors in digital diff --git a/public/feeds/sitewide-feed.xml b/public/feeds/sitewide-feed.xml @@ -7,6 +7,76 @@ <description>The feed that covers all notable additions, updates, announcements, and other changes for the entire paritybit.ca website.</description> <item> + <title>I Ran Out of RAM... Again</title> + <link>https://www.paritybit.ca/blog/how-much-ram-is-enough</link> + <guid>https://www.paritybit.ca/blog/how-much-ram-is-enough</guid> + <pubDate>Sun, 26 Apr 2020 19:03:54 -0400</pubDate> +<description><![CDATA[<h2>I Ran Out of RAM... Again</h2> + +<p>[//]: # ""</p> + +<div class="byline"> +<b>Written By:</b> Jake Bauer | + <b>Posted:</b> 2020-04-26 | + <b>Last Updated:</b> 2020-04-26 +</div> + +<p>I ran out of RAM yesterday. That is, I filled up all 16GB that I have installed +in my computer and it became completely unresponsive to the point where I had to +press the reset button. Technically, it's completely my fault that it happened.</p> + +<p>I was running a very RAM-hungry program (a certain well-known game called +Minecraft) and I disabled the out-of-memory program killer that I use, earlyoom, +so that it wouldn't kill my game as I was playing it. The game uses about +10-12GB on its own due to being heavily modded which left little headroom before +earlyoom noticed and killed it for using too much memory. Although I'm able to +play the game while having programs like Riot and Firefox open at the same time, +my RAM utilization sits at a precarious 95%, as it was for most of last night.</p> + +<p>As I was playing though, this thought slowly faded into the back of my mind. +Then, I had the bright idea to watch a video in the background to distract me +while I was performing a few mindless in-game chores. I clicked on a link, the +tab opened, and everything locked up. I glanced at my status bar and saw the RAM +utilization indicator bar completely full; the number next to it read 99%.</p> + +<p>When I was installing my operating system and since I only have a 250GB drive, I +opted to forgo a swap partition thinking that I had enough RAM to spare and that +I'd much rather have the extra gigabytes available for storage. While doing my +regular tasks like browsing the internet, using IRC, email, news reader, and +chat clients, and listening to music, my RAM usage rarely climbs above 30%. +Usually, it's just games or really intensive compilations which use a lot of RAM +but it rarely goes higher than about 70%. On the other hand, however, there are +some games which love to eat RAM. Notably, heavily modded versions of Minecraft, +Rimworld, and Cities Skylines.</p> + +<p>Since I don't have swap, when I run out of RAM my computer locks up because it's +unable to swap the memory currently used by inactive programs out to disk which +means the active programs can't get the memory they need to continue working. +The OOM killer built into the Linux kernel is also very slow to act and +struggles to bring the system back into a usable state to the point where it's +much easier to perform a hard reset than to wait the tens of minutes required +hoping that my system will recover. Running a program like earlyoom or having a +swap file or a swap partition does prevent this from happening except that +running earlyoom wouldn't allow me to play Minecraft for very long before it +gets killed, I can't have a swap file since I'm running btrfs on the 4.19 kernel +(I run Debian stable and support for swap files did not come until kernel 5.0), +and I didn't configure my system with a swap partition when installing and it's +a royal pain in the butt to add one now with my encrypted LVM partition scheme.</p> + +<p>This series of events, which I have experienced at least half a dozen times now, +tempts me to get another 16GB of RAM just so I never have to worry about it +happening again. Is it worth it? Well… no, not really. For the work that I do, +it's kind of overkill to spend another $100-$120 on RAM which will go unused for +about 98% of the time I'm using my computer. Next time, I'll just configure my +system with swap and hopefully the available OOM killer implementations will be +a little more refined so that this rarely happens, if ever, again.</p> + +<p><em>This is my second post for the +<a href="https://social.paritybit.ca/tags/100DaysToOffload">#100DaysToOffload</a> +challenge. You can learn more about this callenge over at +https://100daystooffload.com.</em></p>]]></description> +</item> +<item> <title>Why I Blog and #100DaysToOffload</title> <link>https://www.paritybit.ca/blog/why-i-blog</link> <guid>https://www.paritybit.ca/blog/why-i-blog</guid> diff --git a/public/sitemap.xml b/public/sitemap.xml @@ -3,6 +3,7 @@ <url><loc>https://www.paritybit.ca</loc></url> <url><loc>https://www.paritybit.ca/home</loc></url> <url><loc>https://www.paritybit.ca/blog</loc></url> + <url><loc>https://www.paritybit.ca/blog/how-much-ram-is-enough</loc></url> <url><loc>https://www.paritybit.ca/blog/why-i-blog</loc></url> <url><loc>https://www.paritybit.ca/blog/decommissioning-my-rackmount-server</loc></url> <url><loc>https://www.paritybit.ca/blog/housecleaning</loc></url>