What are your favourite, or least favourite but necessary, cost-cutting methods?

I feel I am spending too many resources on unnecessary stuff.

Edit: I feel the need to reduce both – the resources, to host multiple things on one system, and cost, to buy/pay for multiple systems. Currently, I have 2 ARM VPSes and 1 old MacBook Air as a home server.

  • Anafroj@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    2
    ·
    11 months ago

    My favorite cost cutting tip is to avoid big webapps running on docker, and instead do with small UNIX utilities (cron instead of a calendar, text files instead of note taking app, rsync instead of a filehosting dropbox-like app, simple static webserver for file sharing, etc). This allows me to run my server on a simple Raspberry Pi, with less than 500mb of used RAM in average, and mininal energy consumption. So, total cost of the setup:

    • Raspberry Pi : 77€ x 2 = 144€ (I bought two to have a backup if the first one fails)
    • MicroSD 64gb : 13€ x 2 = 26€ (main and backup)
    • average energy consumption : 0.41€ (2kWh) per month

    With that, I run all services I need on a single machine, and I have a backup plan for recovery of both hardware and software.

    Getting used to a UNIX shell and to UNIX philosophy can take some time, but it’s very rewarding in making everything more simple (thus more efficient).

    • lud@lemm.ee
      link
      fedilink
      English
      arrow-up
      6
      ·
      11 months ago

      cron instead of a calendar

      What do you mean by that?

      Do you use crontab to save events?

      • Anafroj@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        8
        ·
        edit-2
        11 months ago

        Basically, yes. You can configure most cron programs to mail task output to you (it’s usually done by setting the MAILTO variable in the crontab, provided sendmail is available on your system).

        I use that to do things like:

        0 9 11 10 * echo 'lunch with John Doe at 12:20'
        

        It sends me a mail, and I can see the upcoming events with crontab -l. If it’s not a recurring event, I then delete the rule.

    • MigratingtoLemmy@lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      The usage for curl is quite interesting. Personally, perhaps I’d like a simple GUI where I can select the date and time and the message for the reminder.

      I use nfs or samba for filesharing, but a webserver works well too.

      What is your opinion on OCI container orchestration tools? Specifically Podman. I am of the opinion that containerisation is a most excellent idea because it uses hardware to the fullest extent without polluting the base system. Also the “use like cattle” philosophy. For example: I would be much more comfortable having the GUI for cron in a container.

  • julianwgs@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    11
    ·
    11 months ago
    • Use sqlite instead of Postgres, MariaDB
    • Avoid enterprise software (Kubernetes, Elastic Search)
    • Only use projects with efficient programming languages such as Go, Rust, etc.
    • Try to run things bare metal
    • Lookout for projects which name themself minimal or light-weight

    I use a Raspberry Pi 2 to self host a Dashboard written in Rust (Axum), a RSS reader called yarr and a music streaming server Navidrome. The latter two are written in Go and very resource efficient. The electricity bill should be under a Euro a month (6.4W max power consumption).

  • Curly722@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 months ago

    I see the question has been understood in two ways: cost in computer resources and money. Which one did you mean?

    • Anafroj@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      11 months ago

      That’s the same thing. :) If you reduce computing load, you reduce the need for costly hardware and you reduce the need for energy, thus you reduce the amount of money needed to build and run your setup. There’s a saying in (software) engineering : “reducing energy consumption and increasing performances requires the same optimizations”. Make your code faster (by itself, not by buffing up hardware) and it consumes less energy. Make your application simpler, and it will run faster, and it will consume less energy. It’s not an absolute truth (it sometimes happen that you make your code faster and it consumes more energy), but it’s true most of the time.

      • Curly722@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        I guess that’s true and I didn’t think of it that way. I took it as buying one device over the other to run multiple vms in one machine vs running them in multiple single machines. I’m in that head space now as I’m playing that optimization game myself.

  • rambos@lemm.ee
    link
    fedilink
    English
    arrow-up
    4
    ·
    11 months ago

    Im quite new in selfhosting, but I highly recommend power meter for home server if you dont have one. Its easy to tell the difference after any change in your setup. I was surprised with numbers when I was testing different PSUs on DIY PC. All PSUs were overkill (550-750W) for my tiny server (they are not made for that low power), but some cheap models were better than more expensive PSU. I was meassuring from 22-28 W iirc on idle. Its only 6W difference, but thats like 25%. I dont use VPS because I have no need for that and even cheap ones are more expensive than running my home server. Some servers can run at <10W and raspberry pi use even less power