CS degree is kinda useless, right? I haven't slept the whole night applying and thinking about this...

  • velox_vulnus@lemmy.ml
    hexagon
    ·
    4 months ago

    So what do I do now? I've already spent two years jobless. I'm so tired. My laptop is also broken now, and I'm using my dad's potato PC with barely enough RAM to run a browser, disabling GUI and using TTY sometimes for heavier tasks. After last September, I've lost the energy to do anything meaningful. I've probably not written a single line of code, after contributing to open-source projects like a maniac, and getting burnt out.

    • unperson [he/him]
      ·
      edit-2
      4 months ago

      Try this if you have low RAM, I lived with it for months when I had a broken DIMM and had to make do with 4 GB. The difference is incredible.

      /etc/tmpfiles.d/zswap.conf

      #Type Path                              Mode UID GID Age Argument
      w /sys/module/zswap/parameters/zpool	- - - -	z3fold
      w /sys/module/zswap/parameters/compressor	- - - - lz4
      w /sys/module/zswap/parameters/enabled	- - - - 1
      

      /etc/sysctl.d/00-swappiness.conf

      vm.swappiness = 100
      

      Depending on your workload you may increase swappiness to 200 with good results.

      You need to set up some 8 GB of swap, it's mostly for accounting purposes and will barely get used so it can be anywhere. If you already have zram, disable zram, it's counter productive. Use the swapon command with no arguments to check if you have zram.

      • velox_vulnus@lemmy.ml
        hexagon
        ·
        4 months ago

        I think what you've configured is probably the way to go around in FHS-based distro - using config files. I am on Guix (btw), and I already have a swapfile partition configured when I set up the system configuration:

        system.scm

        (use-modules (gnu)
                     (guix packages)
                     (nongnu packages linux)
                     (nongnu system linux-initrd)
                     (...))
        
        (operating-system
          (...)
          (swap-devices (list
                                      (swap-space (target (file-system-label "swap")))))
          (...))
        

        Here's the size it was allotted:

        $ swapon
        NAME      TYPE      SIZE   USED PRIO
        /dev/sda2 partition 7.4G 724.5M   -2