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

  • Gorb [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    22
    ·
    edit-2
    13 days ago

    I work in a CS job and I’m noticing companies don’t really hire permanent staff they prefer to get boatloads of temporary resource from agencies and consultancies. My team is 4 people big and the 4th person took us like 3 years of begging to get approval for hiring. Yet we onboard entire armies of contractors and throw them out 6 months later year on year.

    Maybe the consultancies are hiring. But its a miserable job to have. If you end up in a consultancy/agency we may end up passing by eventually haha

    • velox_vulnus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      16
      ·
      13 days 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]@hexbear.net
        link
        fedilink
        English
        arrow-up
        12
        ·
        edit-2
        13 days 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.mlOP
          link
          fedilink
          English
          arrow-up
          6
          ·
          13 days 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
          
          • unperson [he/him]@hexbear.net
            link
            fedilink
            English
            arrow-up
            4
            ·
            edit-2
            13 days ago

            The size is allright, but the zswap config is crucial.

            I can’t figure out how to do it in guix with any certainty, perhaps you can enable it manually once to test and then research it better if you feel that it’s worth it. Like this, as root:

            modprobe zswap
            echo z3fold > /sys/module/zswap/parameters/zpool
            echo lz4 > /sys/module/zswap/parameters/compressor
            echo 1 > /sys/module/zswap/parameters/enabled
            sysctl vm.swappiness=100
            

            The 1 > enabled must be written after the other two. If you don’t have sysfs mounted at /sys, check with the mount command where it is.

            A couple of mailing list threads that may help you do it “properly” in guix:

            https://lists.gnu.org/archive/html/guix-devel/2023-02/msg00077.html https://lists.gnu.org/archive/html/guix-devel/2018-03/msg00332.html

            • velox_vulnus@lemmy.mlOP
              link
              fedilink
              English
              arrow-up
              2
              ·
              13 days ago

              Okay, so from my understanding, zram, zswap and normal swap are not one and the same, right? Isn’t zswap a kernel argument, whereas zram a service?

              • unperson [he/him]@hexbear.net
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                13 days ago

                Yes, more or less, they are closely related:

                In regular swap, when you’re low on memory the kernel chooses some memory pages (low priority processes and least recently used) and writes them on disk on a file or partition. When the process that owns those pages need them back, the kernel goes fetch them one at a time. Since memory pages are 4KiB the speed on this depends on the 4k random access speed of your disk.

                You can have more than one swap, and the order they are used depends on their priority, or on the order they were enabled in if you didn’t specify any priority.

                zram is a kind of swap space that, instead of writing to disk, compresses the pages and writes them back in RAM. You set an uncompressed size for it and if the pages don’t compress well (usually encrypted on already-compressed data) then it will occupy the same amount of RAM. Since you can’t tell in advance what the compressed size will be and there’s no mechanism to stop it from filling up, you must be conservative on the size of zram. When the zram gets full all new pages will go to the next swap in priority order. This causes a problem where there’s old data you don’t care about taking RAM space in zram that cannot be reclaimed, and then your workload is going to regular swap which is slow.

                zswap is a layer on top of swap, the technical name is “frontswap”. For it to work you need to already have a swap configured. Before memory pages are written down on the swap file, they are compressed, and if the compression ratio is good enough the pages go to RAM instead of to the swap file. You set a compressed size for the zswap (by default, 20% of your total RAM) and when this limit gets full the least recently used pages are written to disk. The compression is so fast that you barely notice a hiccup while it’s happening, it feels like you magically have 50% more RAM than before.

                Answering your question, zswap is configured by kernel parameters, and now that you mention it it might work to put the parameters on the kernel cmdline instead of editing sysfs, this means configuring the boot loader and adding zswap.enabled=1 zswap.compressor=lz4 zswap.zpool=z3fold to the kernel cmdline.

                • velox_vulnus@lemmy.mlOP
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  13 days ago

                  I was troubled why zswap.enabled=1, zswap.max_pool_percent=50 and vm.swappiness=100 worked, but not zswap.compressor=lz4 and zswap.zpool=z3fold. Turns out that the kernel available in the substitute server has it disabled. I guess I’ll use lzo and zsmalloc for now.

                  • unperson [he/him]@hexbear.net
                    link
                    fedilink
                    English
                    arrow-up
                    3
                    ·
                    13 days ago

                    Huh, when I set it up zsmalloc wasn’t finished and never deallocated. But it seems that today it’s the right choice! Thanks.

          • unperson [he/him]@hexbear.net
            link
            fedilink
            English
            arrow-up
            3
            ·
            13 days ago

            zswap has the same purpose than zram but a better design: it sends to disk the pages that cannot be compressed, and when it gets full it writes them back least recently used first. zram on the other hand keeps uncompressible pages around, and when it gets full all new pages go to disk and it makes the situation worse when you’re low on RAM.

            • asante [comrade/them]@hexbear.net
              link
              fedilink
              English
              arrow-up
              2
              ·
              13 days ago

              woah thanks! i always thought zram was a better solution than zswap but i’ll give zswap a try when i get time.

              am i right that you can create zswap block devices and mount them like with zram? (eg. mounting /var/tmp)

              • unperson [he/him]@hexbear.net
                link
                fedilink
                English
                arrow-up
                3
                ·
                edit-2
                13 days ago

                am i right that you can create zswap block devices and mount them like with zram? (eg. mounting /var/tmp)

                zswap is a “front swap”, it needs a backing swap to function that’s crucial to the design. It automtically goes in front of all the swaps you have enabled.

                You could probably put the backing swap on a loop device on a tmpfs, but I don’t know how it will handle the loopback. It’s a better idea to put it on disk. It can be a slow or write-limited disk, it will not get used much. You definitely should not use zram and zswap at the same time.

                • asante [comrade/them]@hexbear.net
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  13 days ago

                  damn. when i do try out zswap i’ll try and do this. but i do a lot of compiling and i prefer not to do all those reads and writes on my hard drive, so i will be sticking with zram for now.

                  thanks for the advice! it was hard for me to understand the differences at first when i first started looking at them so your comments are helpful.

      • Gorb [they/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        11
        ·
        edit-2
        13 days ago

        The only sector thats hiring and growing is data science/data engineering. Its the grift i hopped on after my last company axed like 90% of the staff and so far its showing no signs of slowing down.

        If you can do sql and python its definitely something to look at since the field is occupied entirely by head in the clouds nincompoops who shouldn’t be allowed near a computer so looking better than the competition should be easier.

        I can’t really say anything for anywhere outside the UK though I’m only familiar with the job market here but machine learning ai bollocks is global.

        Oh and make sure to lie, like lots of lies its what i do when applying for jobs. I’ve only ever been caught out once

        • Adlach@lemmygrad.ml
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 days ago

          I know Python and SQL and I’ve worked for five years in ETL. Still can’t get a callback. What’s a good lie to tell? I’m not above it.

          • Gorb [they/them]@hexbear.net
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            11 days ago

            I look at the job posting and read the tech requirements and tell them I know all of those and just add them to my CV. Went into java/php and python jobs saying i had 5 years experience when I had 0 minutes experience.

            I also grossly exaggerate my role in certain companies or sometimes just steal stuff that i never actually touched but know enough about i can say i lead.

            For example i wrote some bug fixes for a taxi booking system, this becomes I lead a taxi booking system build from the ground up solo and gathered the requirements from the customer.

            So far no ones caught me out cos i learn quickly enough and never ask questions just sit and observe until I’m confident enough. Did have one interview where it was a genuinely very clever person who knew i was bullshitting but most senior devs either don’t seem to know or care.

            Try and lie about things you can explain within reason cos i tried telling people i know kafka and that didn’t work out so well