Here is the thing, I have 4 RPi’s of different generations (all the way from Zero W to 4B 4GB) that I use to host services at home for personal use.

Lately, I have realized I am running out of RAM to host more services, not to mention not enough switch ports to connect to.

Now I know the obvious solution is to get a more powerful setup (maybe a thin client) but electricity isn’t cheap and I am not particularly in the best shape financially speaking to shell out $300+ on a decent client to host my services.

Any suggestions?

  • bastion@feddit.nl
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 months ago

    If you don’t already use it, zram swap is great for providing a little bit extra oomph. If your server doesn’t have a lot of compressed data in memory, it can literally more than double your effective ram.

      • bastion@feddit.nl
        link
        fedilink
        English
        arrow-up
        4
        ·
        9 months ago

        Zram swap is basically this: Turn all of your free ram into a swapdisk. Compress all access to that swapdisk.

        So, it’s not using you storage, buy your memory. Most stuff in memory is usually highly uncompressed - so it compresses really well.

        Instead of getting the additional space from disk, it’s getting it from compression.

        • admin@lemmy.mohammadodeh.comOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 months ago

          Can you please explain to me the difference? How does a swapdisk compare to RAM? I don’t mind googling it but I highly doubt I’ll get a straightforward ELI5 style answer from there.

          I would really appreciate it if you can elaborate, if you have the time that is.

          Thank you.

          • bastion@feddit.nl
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            9 months ago

            There are two types of computer memory that fundamentally matter on the consumer level:

            • memory, as in RAM, which is like short-term memory in people, or how much you can think about at once. It is blanked when the computer restarts. It is very fast.
            • drive storage, as in hdd or ssd space. This is like long-term memory or overall knowledge capacity, and persists across boots. It is comparatively slow.

            Solid state disk storage, and in particular some SD cards, can be vulnerable to excessive writes.

            Ram, however, is not impacted by the number of uses.

            A swap file works like this: When memory gets full, you move the least-used parts onto the swap file.

            A normal swapfile is on-disk. When memory gets close to full, the system moves some onto the (much much slower, like 10-1000x) on-disk swapfile.

            Zram swap creates a compressed swapfile out of your free memory. A file in linux does not have to be on a hard disk/ssd, it just has to look and quack like a file. When memory gets close to full, the system copies some onto the in-memory compressed file. This is very fast, but uses some cpu. It doesn’t touch your drive storage.