For years I’ve had a dream of building a rack mounted PC capable of splitting its resources to host multiple GPU intensive VMs:

  • a few gaming VMs
  • a VM for work that can run Davinci Resolve and Blender renders
  • an LLM server
  • a Stable Diffusion server
  • media server

Just to name a few possibilities…

Everytime I’ve looked into it, it seemed like the technology just wasn’t there yet. I remember a few years ago Linus TT took a shot at it, but in the end suggested the technology (for non-commercial entities) just wasn’t in a comfortable spot yet.

So how far off are we? Obviously AI focused companies seem to make it work, but what possibilities exist for us self-hosters who might also want to run multiple displays in addition to the web gui LLM servers? And without forking out crazy money for GPU virtualization software licenses?

  • TCB13@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    5 months ago

    The technology has “been there” for a while, it’s trivial do setup what you’re asking for, the issue is that games have anti cheat engines that will get triggered by the virtualization and ban you.

    • socphoenix@midwest.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      Which games do that? Running pasthrough gpu on windows for destiny and halo at least gave me 0 issues for years

      • You999@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        Anything using vanguard such as valorant and league of legends, battleye such as pubg, destiny 2, and rainbow 6 siege, and easy anti cheat such as fortnight blocks virtual machines. Vanguard is especially bad because it will not allow to run the game with Intel-VT/AMD-V enabled even if you are running bare metal as of its last update.

        • umbrella@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 months ago

          this just makes me wanna install bare-metal goody-2-shoes windows and cheat using a 5$ arduino

      • Dark Arc@social.packetloss.gg
        link
        fedilink
        English
        arrow-up
        0
        arrow-down
        1
        ·
        5 months ago

        I’m surprised, I was pretty sure anything with Battleye flat out rejected virtualization.

        I thought Destiny used Battleye but I must be mistaken on one of these points.

  • Byter@lemmy.one
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    I’ve also wanted to do this for a while, but there were always a few too many barriers to actually spin up the project. Here’s just a brain dump of things I’ve seen recently.

    vGPUs continue to be behind a license. But there is now vgpu_unlock.

    L1T just showed off PCIe “fabric” from Liqid that can switch physical devices between machines.

    Turning VMs on and off isn’t as slick as either of the above, but that is doable today. You’ll just have to build all the switching automation yourself. That could just be a shell script running QEMU/libvirt commands, at a minimum.

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    You’re not really describing your use-case here. Are you just trying to run a server that does all your rendering for you so you can play games elsewhere? Yes, that’s totally possible.

    If you’re trying to describe a business…no, it’s not possible, scalable, or profitable.

    I’m curious as to what your intentions are here though.

    • brownmustardminion@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      I have a workstation I use for video editing/vfx as well as gaming. Because of my work, I’m fortunate to have the latest high end GPUs and a 160" projector screen. I also have a few TVs in various rooms around the house.

      Traditionally, if I want to watch something or play a video game, I have to go to the room with the jellyfin/plex/roku box to watch something and am limited to the work/gaming rig to play games. I can’t run renders and game at the same time. Buying an entire new pc so I can do both is a massive waste of money. If I want to do a test screening of a video I’m working on to see how it displays on various devices, I have to transfer the file around to these devices. This is limiting and inefficient to me.

      I want to be able to go to any screen in my house: my living room TV, my large projector in my studio room, my tablet, or even my phone and switch between:

      • my workstation display running on a Window 10 VM
      • my linux VM with youtube or jellyfin player I use as a daily driver
      • a fedora or Windows VM dedicated to gaming, maybe SteamOS
      • maybe a friend comes over for a LAN party and we both can game without having to set up a 2nd rig
      • I want to host an LLM or stablediffusion server without having to buy a new GPU with enough VRAM to run SDXL
      • just_another_person@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        arrow-down
        2
        ·
        5 months ago

        What you’re describing is mostly a networking issue. I’m also pretty suspect about your setup and wishes. You definitely don’t work for a large VFX studio, and you’re not using this as described for CAD work. I’m going to guess this entire setup is for your anime and incest rendering farm.

        This is a ridiculous question for anyone with this amount of hardware in their home already that’s using it on a daily basis to actually work. You would also not be “running renders” if this was hardware provided by a company you work for.

        Whatever is being asked here is for a shady ass person. Don’t help them.

            • brownmustardminion@lemmy.mlOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              5 months ago

              I’m not the one making wild accusations about somebody wanting to selfhost a gpu server to edit…incest porn or whatever it is you’re on about.

              No idea what lie you think I’m telling. 🤷‍♂️

        • KairuByte@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          5 months ago

          … what?

          Them: “I want a centralized place to handle all my graphics stuff, so I can access graphically intensive things from any device.”

          You: “Must be incest renders because you already have hardware and say you use it for work.”

          So according to you, contractors don’t exist, iPhones can play PC games, and anyone wanting to split PC resources between multiple use cases is shady.

          What’s ridiculous is that you seem to think extreme paranoia is a normal thing in everyday life.

  • LrdThndr@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    5 months ago

    I bought a cheap used Dell R710 on Facebook marketplace for like $100 or so, as well as an ups, rack, 10g switch, etc, from various other sellers. All told, I’ve got about $500 in my server setup.

    Installed proxmox on it. It’s “free” if you don’t buy a license. You just have to put up with a little nag screen when you open the control panel but it still works 100%, much like winrar.

    Works great.

    Edit: just realized this is in c/selfhosted AND I misunderstood the post. I’m gonna leave it here just on the off chance it’s useful to somebody, but I acknowledge it’s not what you’re looking for.

    • Lupec@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      Btw just in case you aren’t aware, the nag can be done away with. I don’t have a link off the top of my head but it’s out there.

  • Decipher0771@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    5 months ago

    I’ve been doing exactly that at home for a couple years now. First with Parsec, now Sunshine/Moonlight.

    Host is Proxmox on Ryzen 5800x, 64gm RAM GPU is 2070 Super, with VGPU patched drivers from https://gitlab.com/polloloco/vgpu-proxmox

    When I’m gaming I’ll dedicate the full 8Gb to my windows Vm, otherwise I split it in 2 or 4Gb chunks to Jellyfin or my home camera monitoring. 8gb can’t split very many ways, and most things require at least 2 to run.

    Locally at home I can run 1440p 60fps rock solid over wifi on any device, from my phone/old laptop/apple tv/raspberry pi. Remote I can do 1080p60, but a bit more hit or miss depending on my network connection.

    Experimenting with LLMs I’ve done through the same windows VM, or to a ubuntu dev VM. Works the same way. I’m thinking of transitioning my gaming VM to Linux too.

    The amount of VRAM is the hard limitation to get past, the virtualization tech itself has been there for a while.

    But to be perfectly honest……it really was just a “let’s see if I could do this” type task, direct GPU pass though is more straightforward and it’s not really worth splitting 8Gb these days. Unless you get a card with significantly more VRAM passthrough is much less work.

      • Decipher0771@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        Yeah unfortunately. 20xx is last generation supported so far via the patch, not sure if support for later cards is coming or not.

    • Lem453@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      This is really amazing! In theory, can you can use 2gb with 4 different VMs?

      • Decipher0771@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        Sure, but you’ll get diminishing returns most likely as consumer hardware doesn’t really have the resources to scale that way very well if all the VMs are running demanding apps simultaneously.

        Even for something like 4 VMs that just do NVenc, there are limits for how many streams the GPU can do. I think there’s another patch that lets you raise that, but at some point you’ll run out of resources quick. Even powerful consumer gear isn’t really designed to be used by more than one user/app and it starts to show the more you virtualize and split those resources.

  • yggstyle@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    As others have expressed- were already there. Understand though that the reason this hasn’t caught on mainstream is the entire purpose of what you are asking is simple: it runs counter to the standards of commercial capitalism. We are talking about efficiency, self hosting, doing more with less, and cutting strings.

    That said- understand that what you are undertaking is not dissimilar from building infrastructure in a company. You are building and expanding to meet your needs. Your needs are unique so there isn’t a ‘turn key’ solution that will fit perfectly… so you need to try things and see what works.

    As far as things you are talking about specifically: you are going to ultimately be dipping your toes into the virtualization world… so xcp-ng and proxmox are good choices. If you can get your hands on older copies and uh… source a key or two: esxi is also very beginner friendly but won’t be able to upgrade thanks to their new pricing model. You seem like you are aware of the YouTube sphere so let me recommend 2GuysTech and the series on different hypervisors.

    Once you decide on a hypervisor it’s as ‘simple’ as building a PC to meet your needs. If you have one already I’d start there to get a feel for how much you can pull out of it to determine how much you may need. You can probably split up a single GPU or just pass it through (cost vs performance.). LLMs are power / resource hungry so that may require it’s own GPU.

    If power is cheap by you you can look into older server hardware but honestly this can be a messy space to dabble in (noise, heat, power costs.)

    From there play with services that fit your needs.

    It’s very doable and there are some easier paths to take… certainly- but again the thing about homelabs is it’s very custom. This is why the community (in general) is willing to help. We all have had to forge the same path.

    • jet@hackertalks.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      100% ^^^ This.

      You could do everything with openstack, and it would be a great learning experience, but expect to dedicate about 30% of your life to running and managing openstack. When it just works, it’s great… when it doesn’t… ohh boy, its like a CRPG which will unlock your hardware after you finish the adventure.

      • Takumidesh@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        5 months ago

        Can this solution deliver 3+ streams of high resolution (1440p or higher and 144fps) low latency video with no artifacting and near native performance and responsiveness?

        Gaming has a high requirement for high fidelity and low latency I/O, no one wants to spend all this money on racks and thin clients, the then get laggy windows and scrolling, artifacts, video compression, and low resolution.

        That’s the problem at hand with a gaming server, if you want to replace a gaming desktop with a vm in a rack, you need to actually get the I/O to the user somehow, either through dedicated cables from the rack, fiber, or networking, the first is impractical, it involves potentially 100ft long runs of multiple display port, HDMI, USB, etc, and is very rigid in its application, the second is very expensive, shooting the price up to thousands of dollars per seat for display port/USB over fiber extenders, and the third option I have yet to see a vnc/remote solution that can deliver near native video performance.

        I should reiterate, the op wants to do fidelity sensitive tasks, like video editing, they don’t just need to work on a spreadsheet.

        • jet@hackertalks.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          edit-2
          5 months ago

          Yes, for some definition of ‘low latency’.

          Geforce now, shadow.tech, luna, all demonstrate this is done at scale every day.

          Do your own VM hosting in your own datacenter and you can knock off 10-30ms of latency.

          However you define low latency there is a way to iteratively approach it with different costs. As technology marches on, more and more use cases are going to be ‘good enough’ for virtualization.

          Quite frankly, if you have a all optical network being 1m away or 30km away doesn’t matter.

          Just so we are clear, local isn’t always the clear winner, there are limits on how much power, cooling, noise, storage, and size that people find acceptable for their work environment. So there is some tradeoff function every application takes into account of all local vs distributed.

          • yggstyle@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            arrow-down
            1
            ·
            5 months ago

            This. Exactly. Many solutions exist but need to be selected based on scale and personal needs.

  • Sethayy@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    I currently have a setup exactly like this, with a threadripper 2950x, an RX 6600, and a 2070 super.

    Let me know if you have any questions in the specifics, but its 100% possible

    Best part of this setup is being able to connect to both via sunshine on many displays at once

    • brownmustardminion@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      5 months ago

      I’m curious in a more in depth breakdown of your setup if you don’t mind. What is latency like and how are you handling switching?

      • Sethayy@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        5 months ago

        I have a rack server in the garage with a gaming PC in it, 2 PSU’s and the 2 GPU’s mentioned, all running on Debian (which I soon plan to swap to nixos).

        The AMD GPU’s is passed through to a windows VM with 8 gigs or so of ram, for VR development in the garage usually, but sometimes is streamed as well.

        The second Nvidia GPU goes to my linux machine on Ubuntu just for ease of patched nvidia drivers, a couple virtual monitors with an xconfig like this, and is my daily driver with 16 gigs of RAM.

        Both use Virtio drivers for disk, network, and anything else I’m forgetting, Pcie passthrough via KVM/QEMU on the host.

        I’d say the latency hangs around 5ms when streaming both at once, and never comes close to saturating the gigabit connection, but I’m sure some optimisations could be done somewhere along the line.

        Clients run on anything from an Xbox series X to a random PC, hopefully soon an orange pi (worried about latency though).

        When I have a workload requiring both GPU’s I just keep 2 moonlight windows open and use the keybinds to unfocus the mouse then alt+tab to swap between them.

        I don’t have any complaints, although one time when my thermal setup was worse I left 2 copies Subnautica running for my wife and I to at Nitrox together, and it did start to drop in fps on the Linux machine once we picked it up after an hour or 2 running the games AFK.

        Edit to add I’m mostly using this for gaming right now, but its handled everything (within reason) that I’ve tossed at it, but I’m planning on soon setting up this sometime soon also across a couple other PC’s, but as of right now the VM’s feel as if they’re entirely distinct PC’s from an external perspective

  • Trincapinones@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 months ago

    I’ve recently tried to do that using sunsine and different linux gaming distros and it was awful, the VM was working great for a few minutes and then suddenly crashes and I have to hard stop it.

    All the people that I’ve seen talking about it on the internet are using Windows VMs so I guess that I’m doing something wrong or the only way to do it is through a Windows VM, which I’ll not even try.

        • MrPasty@lemmy.sebbem.se
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          4 months ago

          Hey, sorry I didn’t reply until now but life has been pretty hectic and I also kinda borked my streaming VM right at the same time as I wrote that. I ran Nobara Linux for a while with KDE on Xorg and it actually worked pretty well. Then I decided I wanted to give Bazzite a try but I didn’t like the whole immutable thing. I went back to Nobara just to find that Steam Remote Play straight up didn’t work and I couldn’t know if I had failed to set up something properly or Valve just broke it while I was “away”. A couple of days ago I decided to just abandon Remote Play for the time being and deployed Games on Whales and it seems very promising so far. Much easier than fiddling with VM:s and GPU passthrough and Sunshine/Moonlight has never failed me.

          • Trincapinones@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            4 months ago

            No worries, LOL we followed exactly the same steps with the same problems, in fact, I was procrastinating documenting my problems in my Logseq and I think I’ll copy your explanation because it’s exactly my case in everything xd thanks ^^