• Valen
    link
    fedilink
    312 years ago

    You really need to index your tables. This has all the hallways of a Cartesian cross product.

    • @frezik@midwest.social
      link
      fedilink
      682 years ago

      In a database course I took, the teacher told a story about a company that would take three days to insert a single order. Thing was, they were the sort of company that took in one or two orders every year. When it’s your whole revenue on the line, you want to make sure everything is correct. The relations in that database were checked to hell and back, and they didn’t care if it took a week.

      Though that would have been in the 90s, so it’d go a lot faster now.

        • @frezik@midwest.social
          link
          fedilink
          302 years ago

          No idea, but I imagine it was something big like that, yes. I think it was in northern Wisconsin, so laker ships are a good guess.

        • @Treczoks@feddit.uk
          link
          fedilink
          182 years ago

          We have a company like that here somewhere. When they have one job a year, they have to reduce hours, if they have two, they are doing OK, and if they have three, they have to work overtime like mad. Don’t ask me what they are selling, though. It is big, runs on tracks, and fixes roads.

  • tiredofsametab
    link
    fedilink
    19 months ago

    I don’t want to see the EXPLAIN for that query. This person really needs to learn more about sql, I’d wager.

  • Presi300
    link
    fedilink
    English
    132 years ago

    I’ve actually done something similar with a 2GB ram machine… 2GB ram / 8GB zswap, actually ran way faster lol

    • @nbailey@lemmy.ca
      link
      fedilink
      English
      62 years ago

      Yeah it works surprisingly well. I installed Gentoo on a 2005 era laptop a few years ago and had to keep adding zswap until Rust could compile for Firefox. Iirc it took about 12G of zswap to get it working, but it wasn’t too bad overall.

      • Presi300
        link
        fedilink
        English
        22 years ago

        I actually ended up doing something like this on my main desktop lol, 16GB ram/ 32GB swap… I hate closing programs

    • 𞋴𝛂𝛋𝛆
      link
      fedilink
      English
      32 years ago

      I need it just for the initial load on transformers based models to then run them in 8 bit. It is ideal for that situation

    • @dan@upvote.au
      link
      fedilink
      142 years ago

      You should be able to fit a model like LLaMa2 in 64GB RAM, but output will be pretty slow if it’s CPU-only. GPUs are a lot faster but you’d need at least 48GB of VRAM, for example two 3090s.

      • @PolarisFx@lemmy.dbzer0.com
        link
        fedilink
        6
        edit-2
        2 years ago

        Amazon had some promotion in the summer and they had a cheap 3060 so I grabbed that and for Stable Diffusion it was more than enough, so I thought oh… I’ll try out llama as well. After 2 days of dicking around, trying to load a whack of models, I spent a couple bucks and spooled up a runpod instance. It was more affordable then I thought, definitely cheaper than buying another video card.

        • @dan@upvote.au
          link
          fedilink
          42 years ago

          As far as I know, Stable Diffusion is a far smaller model than Llama. The fact that a model as large as LLaMa can even run on consumer hardware is a big achievement.

          • @barsoap@lemm.ee
            link
            fedilink
            2
            edit-2
            2 years ago

            Both SD 1.5 and SDXL run on 4g cards, you really want fp16 though.

            In principle it should be possible to get decentish performance out of e.g. an RX480 by using the (forced) 32-bit precision to do bigger winograd convolutions (severely reducing the number of fmas needed) but don’t expect AMD to write kernels for that, ROCm is barely working on mid range cards in the first place.

            Meanwhile, I actually ended up doubling my swap because 16G RAM are kinda borderline to merge SDXL models. OOM might kick in, it might not, and in any case your system is going to lock without earlyoom.

          • @PolarisFx@lemmy.dbzer0.com
            link
            fedilink
            2
            edit-2
            2 years ago

            I had couple 13B models loaded in, it was ok. But I really wanted a 30B so I got a runpod. I’m using it for api, I did spot pricing and it’s like $0.70/hour

            I didn’t know what to do with it at first, but when I found Simply Tavern I kinda got hooked.

    • Bloody Harry
      link
      fedilink
      182 years ago

      wait, didn’t some tech youtubers like LTT try using cloud storage as swap/RAM? afaik they failed because of latency

      • @Veltoss@lemmy.world
        link
        fedilink
        132 years ago

        So is pretty much all of the cloud services the average user already subscribes to. People still use them though.

        • @CanadaPlus@lemmy.sdf.org
          link
          fedilink
          42 years ago

          Agreed. This is especially bad, though, because if it’s compromised they basically have hardware-level access to your machine. Unless you’re using encrypted swap, and I’m not sure how standard that is.

          • @DaPorkchop_@lemmy.ml
            link
            fedilink
            32 years ago

            Well, assuming you’ve already gone through the effort to write a custom kernel module to offload your swap pages to Google Drive, it doesn’t seem like that much of a stretch to have it encrypt the data before transmitting it.

      • @kevincox@lemmy.ml
        link
        fedilink
        52 years ago

        Obviously you should set up device mapper to encrypt the gdrive device then put the swap on the encrypted mapper device.

      • @russjr08@outpost.zeuslink.net
        link
        fedilink
        English
        152 years ago

        They don’t to my knowledge, I believe that’s mounted through rclone which just usually sets the filesystem size to 1PB so that it doesn’t have to try to query what the actual limit is for the various providers (and your specific plan).

      • @Vent@lemm.ee
        link
        fedilink
        14
        edit-2
        2 years ago

        Once upon a time, Google offered unlimited drive storage as part of some GSuite tiers. They stopped offering it a while ago and have kicked most/all legacy users off of it in the past few months. It was glorious while it lasted 😢

        • icedterminal
          link
          fedilink
          English
          32 years ago

          At one point they offered unlimited storage for Play Music only. You could literally upload your entire collection. They changed it later to consume your Drive storage. Cheap enough plans so I subscribed. Then they killed off Play Music. I’m still salty about that.

        • @Uniquitous@lemmy.one
          link
          fedilink
          92 years ago

          Guess they ran everyone out of business that they needed to, so now the premium features get yanked and your choice of alternatives is curtailed. Hooray for enshittification.

          • @dan@upvote.au
            link
            fedilink
            82 years ago

            It’s not that, it’s that people were abusing it by using it for things like Plex with 100TB+ of data, which cost Google more than the revenue they got as a result. Blame the people that abused the policy. They’re not a charity and can’t keep an offer if they lose money as a result. Keep in mind that Google Drive data has several replicas and is also backed up to cold storage on LTO tapes, so people abusing the storage policy is actually pretty expensive for them .

            They do still have unlimited data in some cases, for example with custom plans for large companies (like 50k+ employees).

      • @TheSaus@lemmy.ml
        link
        fedilink
        12 years ago

        Yea where do you get that? I can’t see anything on their pricing page, only goes up to 2tb

      • @Veltoss@lemmy.world
        link
        fedilink
        672 years ago

        Once we have super fast reliable internet we’ll likely have the whole computer as a service. We’ll just have access terminals basically and a subscription with a login, except for the nerds who want their own physical machine.

        • @danc4498@lemmy.world
          link
          fedilink
          English
          32 years ago

          Honestly, cloud gaming is very good… when it is good. Sometime it suck. But when it’s good it’s incredible how much it feels like gaming locally.

        • Cethin
          link
          fedilink
          English
          102 years ago

          RAM as a service can’t happen. It’s just far too slow. The whole computer can though. It’s RAM can be local so it can access it quickly, then it just needs to stream the video over, which is relatively simple if creating some amount of latency to deal with.

          • @averagedrunk@lemmy.ml
            link
            fedilink
            312 years ago

            They’ve been reinvented repeatedly. Citrix, terminal servers, thin clients, cloud desktops, web apps, remote app delivery…

            Most people (not necessarily here) need a web browser and an office program. Most people are well suited to terminals or something like a Chromebook.

            I need actual hardware for my job and hobbies, but even I have a mini PC set up like a gaming console so that if I want to play games on my bedroom TV I don’t have to hook up my Steam Deck or gaming laptop. I just stream them.

          • @Zron@lemmy.world
            link
            fedilink
            82 years ago

            You have to know that some dinosaur at ibm is screaming about how they gave up the centralized computer and is salivating over gigabit fiber so he can charge everyone 15 bucks a month to use an ibm mainframe.

            Stadia almost didn’t suck, I bet we’re 10 years from phones just being hand terminals that tap into a local server and desktops won’t be far behind.

        • @FUsername@feddit.de
          link
          fedilink
          4
          edit-2
          2 years ago

          Given the digital literacy of many “regular people” (e.g. my father, and seemingly every other of my friends), the idea is appealing. Especially, as most of them don’t care about privacy. Give them decent availability, and they will throw money at you. And if you also give them support, I will, too.

        • @fartsparkles@sh.itjust.works
          link
          fedilink
          8
          edit-2
          2 years ago

          Given how so many of us communicate, work, and compute using cloud platforms and services, we’re basically already there.

          How many apps are basically just a dumb client using a REST API?

      • Cethin
        link
        fedilink
        English
        372 years ago

        It’ll never be fast enough. An SSD is orders of magnitude slower than RAM, which is orders of magnitude slower than cache. Internet speed is orders of magnitude slower than the slowest of hard drives, which is still way too slow to be used for anything that needs memory relatively soon.

        • @barsoap@lemm.ee
          link
          fedilink
          6
          edit-2
          2 years ago

          A SATA SSD has ballpark 500MB/s, a 10g ethernet link 1250MB/s. Which means that it can indeed be faster to swap to the RAM of another box on the LAN that to your local SSD.

          A Crucial P5 has a bit over 3GB/s but then there’s 25g ethernet. Let’s not speak of 400g direct attach.

          • @DaPorkchop_@lemmy.ml
            link
            fedilink
            102 years ago
            • modern NVMe SSDs have much more bandwidth than that, on the order of > 3GiB/s.
            • even an antique SATA SSD from 2009 will probably have much lower access latency than sending commands to a remote device over an ethernet link and waiting for a response
            • @barsoap@lemm.ee
              link
              fedilink
              12 years ago

              Show me an SSD with 50GB/s, it’d need a PCIe6x8 or PCIe5x16 connection. By the time you RAID your swap you should really be eyeing that SFP+ port. Or muse about PCIe cards with RAM on them.

              Speaking of: You can swap to VRAM.

              • @DaPorkchop_@lemmy.ml
                link
                fedilink
                32 years ago

                My point was more that the SSD will likely have lower latency than an Ethernet link in any case, as you’ve got the extra delay of data having to traverse both the local and remote network stack, as well as any switches that may be in the way. Additionally, in order to deal with that bandwidth you’ll need to kit out not only the local machine, but also the remote one with expensive 400GbE hardware+transceivers, plus switches, and in order to actually store something the remote machine will also have to have either a ludicrous amount of RAM (resulting in a setup which is vastly more complex and expensive than the original RAIDed SSDs while offering presumably similar performance) or RAIDed SSD storage (which would put us right back at square one, but with extra latency). Maybe there’s something I’m missing here, but I fail to see how this could possibly be set up in a way which outperforms locally attached swap space.

                • @barsoap@lemm.ee
                  link
                  fedilink
                  12 years ago

                  Maybe there’s something I’m missing here

                  SFP direct attach, you don’t need a switch or transcievers, only two QSFP-DD ports and a cable. Also this is a thought exercise not a budget meeting. Start out with “We have this dual socket EPYC system here with full 12TB memory and need to double that”. You have *rolls dice* 104 free PCIe5 lanes, go.

          • Cethin
            link
            fedilink
            English
            72 years ago

            Bandwidth isn’t really most of the issue. It’s latency. It’s the amount of time from the CPU requesting a segment of memory to receiving it, which bandwidth doesn’t effect.

            • @barsoap@lemm.ee
              link
              fedilink
              1
              edit-2
              2 years ago

              Depends on your workload and access pattern.

              …I’m saying can be faster. Not is faster.

              • Cethin
                link
                fedilink
                English
                12 years ago

                Yeah, but the point of RAM is fast random (the R in RAM) access times. There are ways to make slower memory work better for this by predicting what will be needed (grab a chunk of memory because accesses will probably need things with closer locality than pure random), but it can’t be fixed. Cloud memory is good for non-random storage or storage that isn’t time critical.

    • @slacktoid@lemmy.ml
      link
      fedilink
      English
      362 years ago

      It will crash as soon as it needs to touch the swap due to the relatively insane latency difference.

  • @dan@upvote.au
    link
    fedilink
    89
    edit-2
    2 years ago

    Hopefully that swap is on an SSD, otherwise that query may not ever finish lol
    Once you’re deep into swap, things can get so slow that there’s no recovering from it.

    • Dran
      link
      fedilink
      892 years ago

      Unironically that’s how zram works

        • Dran
          link
          fedilink
          42 years ago

          Is that not how it works though? Lol

      • Josh F.
        link
        fedilink
        212 years ago

        Doesn’t it compress the contents that it’s storing to help kind of get the best of both worlds?

        You get faster storage because it’s in ram still, but with it being compressed there’s also “more” available?

        I could be completely mistaken though

        • Ew0
          link
          fedilink
          English
          152 years ago

          You are correct, although zram uses more cpu power since it compresses things. It’s not really an issue if you’re not using a potato :=)

          • @Still@programming.dev
            link
            fedilink
            112 years ago

            even if you are using a potato it probably doesn’t have much ram so slightly slowing it to make things run smoother is a very popular choice

  • UFO
    link
    fedilink
    272 years ago

    I dunno why I didn’t realize you can add more swap to a system while running. Nice trick for a dire emergency.

  • clb92
    link
    fedilink
    32
    edit-2
    2 years ago

    I’d be lying if I said I hadn’t done something similar before.

    • AggressivelyPassive
      link
      fedilink
      292 years ago

      Wrote my master thesis this way - didn’t have enough ram or knowledge, but plenty of time on the lab machine, so I let it do its thing over night.

      Sorry, lab machine ssd.