Credit to @ryanc@infosec.exchange

I just did the graphic

top 50 comments

sorted by: hot top controversial new old
[–] 2 points 2 hours ago

I don't really need swap until I need to compile blender... Need somewhere around 64Gb (with compression) to deal with the peaks

  • source
  • [–] 4 points 3 hours ago*

    Once tortured myself with having to go through...

    The Android build system. Booo, scary.

    I only wanted a LineageOS boot image built. The recommended specs list 64GiB RAM. Figured wouldn't apply to me until I tried to build a target literally called "nothing". It just used up all of the RAM and OOMed about 2 minutes in, building the "build cache" or whatever the fuck it needs to do to "warm up".

    After a few fucktons of swapspace, turning off some of my daemons, some sysctl fuckery (there were options for limiting process virtual memory size IIRC? I put it all the way up) and taskset -p 0-15:1 (use logical CPUs 0, 2, 4...), I had my laptop allocating 50 something GiB. I have 16GB (decimal) physical RAM installed and I consider that already way too much for my usual needs.

    After about half an hour of the build system build systeming, it just stopped doing that then built the kernel in 4 minutes with everything else in some time too.

    Yes, I have tried just running make directly. That just resulted in an image that did nothing but toggle on and off an empty (no percentage) charging circle via power button.

  • source
  • [–] 8 points 6 hours ago

    Swap and zram saved my R and Python Dana analysis script a couple of times.

  • source
  • [–] 10 points 6 hours ago

    "I'm not a friggin bear, I don't hibernate!"

  • source
  • [–] 6 points 6 hours ago (4 children)

    My built-in Devil's Advocate has to ask if that's really true? Have you got a citation newer than 2 decades old? Frankly, i find it difficult to believe that anyone wouldn't like to use electron software, for the simple reason that making your SSD suffer is fun.

    Edit: in 30 years of administering Linux and (previously) Solaris sytems i've never once had to change HDDs or SSDs, so claims of torture are, i opine, exaggerated. i'll also claim that keeping electron software out of the filesystem is not good for your hygiene.

  • source
  • hideshow 4 child comments
  • [–] 3 points 4 hours ago (2 children)

    That’s some really great luck you have, over the 15 years or so I have been running my Linux server I have had to replace the SSD twice(likely due to gentoo and compiling everything all the time) and had 2 hdds in my raid cluster need replacement. Here’s hoping my NAS has your luck

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 4 hours ago* (1 child)

    To be clear: what i wrote is not actually something real, it was a joke i made by modifying a comment from a thread on github gist, i am actually surprised it wad credible enough that someone would reply seriously xD

    https://gist.github.com/joshenders/c4960cec9c63a7b7d68ffa9543356c43

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 9 minutes ago

    Definitely bit the onion on this one, it did seem remarkable lol though I just pulled a 16 year old drive out of my Son’s PC(that was technically still working however slowly) hence the semi plausibility on my end lol

  • source
  • parent
  • [–] 2 points 3 hours ago

    I manage a cluster that makes heavy use of SSDs in RAID10 configuration. Those things are constantly degrading and having to be swapped out. I've started a drawer of faulted drives that I don't have the heart you throw out.

  • source
  • parent
  • [–] 7 points 6 hours ago (3 children)

    Everyone defending swap like crazy in the comments... so let me give a counter argument specifically for desktop:

    Many years ago I stopped using swap on all my computers (I exclusively use linux) and the reason is: every time anything regarding interactivity went to swap, my system would freeze and literally become unusable for a really long time until I killed something. Since I got tired if that behaviour I decided I prefer for random shit to die but my computer still be usable.

    It wasn't very often, but I don't get OOM killer often either (as in I don't remember the last time it happened and I use linux every day for both work and fun), and the freezing situation was way more annoying, to the point I sometimes ended up cold switching off the computer. I'm surprised on how many people run out of memory constantly. I guess you all are just using linux for servers and have crazy processing of infinite data...

  • source
  • hideshow 3 child comments
  • [–] 3 points 6 hours ago (1 child)

    Were you using a HDD for swap? It's nearly unnoticeable on an NVMe drive.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 6 hours ago

    yep it was HDD, but with the low amount of times I have any OOM issue, I'm way more worried about NVMe flash burning than a random process being killed once every blue moon.

    In fact I didn't mention, but since the advent of flash drives what I've done is trying to locate heavy disk writing apps and find alternatives for them, amid disabling many logs.

    For swap, it hunts me to think some automatic process I don't have control over will burn those sweet erase cycles without me noticing just because someone programmed it poorly. I'm way more happy knowing I have some control over it.

  • source
  • parent
  • [–] 9 points 10 hours ago (3 children)

    swapfile gang

    .rw------- root root 4.0 GB Mon Jun  1 04:10:37 2026 ο€– /var/swap
    
  • source
  • hideshow 3 child comments
  • [–] 2 points 7 hours ago

    And here I am using swap for my self hosted services, some of which use ridiculous amount of ram.

  • source
  • [–] 24 points 13 hours ago* (6 children)

    Yes, swap partitions are shit.

    The real hotness is swap drives.

    Just the use that your old 64GB SSDs were waiting for!

    (Fun fact: in Linux, if you have multiple swap partitions mounted, the kernel will automatically use striping (like RAID) in order to read and write from them as fast as possible. If you have multiple small SSDs used for swap, the read/write speed from swap can actually become pretty fast.)

  • source
  • hideshow 6 child comments
  • [–] 4 points 8 hours ago (3 children)

    How many SSDs do you need for it to match the speed of RAM? Can I use this to make cheap RAM?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 4 points 5 hours ago

    You're going to run into issues with your motherboard's SATA or NVME (or PCIE) controller throughput well before you get close to actual RAM speeds.

    Once you reach that bottleneck, the speed won't increase anymore when you add more drives. The motherboard architecture just doesn't support accessing any kind of storage device at that speed.

  • source
  • parent
  • [–] 2 points 6 hours ago

    I did a (very) quick search and they should just sum up, so for example a raid of 2 sata SSD with 64gb that can reach 500MB/s will have a total speed of 1GB/s,
    DDR3 ram can get up to 17GB/s so we would need 34 drives to get DDR3 speeds (not very fast BUT you would be the person with most ""RAM"" in the city without being a data center)

  • source
  • parent
  • [–] 44 points 16 hours ago (8 children)

    > linuxmemes

    > macos screenshot

    ΰ² _ΰ² 

  • source
  • hideshow 8 child comments
  • [–] [S] 19 points 15 hours ago (6 children)

    Shit did I botch it? I made this on my phone and the toot I copied the script from was just text. Wanted to make it look more interesting so I found this site that let you make the windows. I just went with what I thought looked best.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 3 points 9 hours ago (2 children)

    Is this tongue in cheek i swear I cannot tell any longer.

    Some swap is beneficial

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (2 replies)
  • load more comments (1 reply)
    [–] 36 points 15 hours ago (3 children)

    I used to be this guy. We have huge amount of memory in our storage server. Why would we need swap? Well, once the system started killing programs I read up on swap and how the system handles its caches, especially ZFS ARC.

    Short version is that while the system can evict its caches syncronously, it can only async notify ZFS that it should also shrink its caches, but the out-of-memory killer will start killing before ZFS and its kernel counterpart can start to free up memory.

    A tiny bit of swap completely solved this, since swapping is sync for the kernel and the OOM killer will wait for it.

  • source
  • hideshow 3 child comments
  • [–] 31 points 16 hours ago (4 children)

    No

    15.5/15.5 GB RAM used, plus 16.8/465GB swap

    It turns out the computer mostly freezes once you go past 200% RAM used.

  • source
  • hideshow 4 child comments
  • [–] 1 point 6 hours ago (3 children)
  • 16GB are my usual breakfast, I'll fill that quickly after booting... I'm happy that I got 64GB, though even that is often used up, thus I sometimes wish for 128Gb though (and for running somewhat capable local LLMs 512GB would be even better...).

    Bottomline: ypu can basically never have enough RAM...

  • source
  • parent
  • [–] 1 point 6 hours ago* (1 child)

    Trying to ray-trace a 512,000x256,000 image using Chunky. I had to split it into 16 parts to reduce the RAM to a sane amount (in 2018, it may have been optimised since).

    I was trying to find the limit for a single png, and I think I found it.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 53 points 18 hours ago (4 children)

    There are good use cases for swap. I work with very performance sensitive memory hogging applications that tend to process in bursts as incoming batched data arrives. We also have a lot of required background "security" applications.

    Having the idle applications move out to swap so that a significant amount of free RAM to allow for the active, real-time applications to expand into is a major boon. RAM is expensive now, so it's become even more critical to not waste it.

    But even in self-hosting at home I take advantage of it since I have a limited number of servers with limited RAM and a bunch of applications and/or docker containers running, many of which don't need to be active at all times, but if they were all active, would have trouble with the limited RAM. Swap allows for inactive applications to free up RAM for the active ones and leave enough available at all times to allow an application to quickly spin up new jobs.

    Anyway, sure, for a simple desktop computer without a bunch of junk background applications running for "security" or whatever, and an overabundance of RAM installed, it's probably not useful. But for high performance, memory hungry applications with lots of background stuff running, it can be a big help.

    That said, there are use cases where the opposite is useful and using a RAM drive is better than writing to disk for cache and temporary logs when you have enough RAM. My opnsense router for instance uses a RAM drive to store cache and logs (logs are mirrored to the NAS for long term storage, so just the local copy is lost on reboot). That system has enough RAM and I'd rather reduce disk wear, and I don't plan to add too many other applications to that server that it would run low.

  • source
  • hideshow 4 child comments
  • load more comments (4 replies)
    load more comments
    view more: next β€Ί