nbdkit-vram-plugin(1)

๐Ÿ“ฆ
version 1.48.1 ยท 5 versions
, in fedora 44

โœจ nbdkit-vram-plugin โœจ

okay bestie, welcome to the nbdkit manual, page nbdkit-vram-plugin(1) ๐Ÿ’– this one is genuinely unhinged in the best way โ€” we're turning your GPU's Video RAM into an actual network block device. no cap.


๐ŸŒธ NAME ๐ŸŒธ

nbdkit-vram-plugin โ€” use GPU Video RAM as a network block device ๐ŸŽ€


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

nbdkit vram -f [device=NAME|N] [SIZE]

nbdkit vram --dump-plugin

๐Ÿ’… DESCRIPTION ๐Ÿ’…

So nbdkit-vram-plugin is a plugin for nbdkit(1) and what it does is take the Video RAM from an OpenCL-capable graphics card (aka your GPU ๐Ÿ‘‘) and use it as a block device. it's giving "my graphics card is a hard drive now" and honestly? iconic.

You currently must run the plugin in the foreground (that's the nbdkit -f option, bestie, don't skip it).

Video RAM is volatile. like, the moment nbdkit exits or the machine gets turned off, the disk AND every single thing on it is deleted. gone. poof. ๐Ÿ’€ no recovery, no notes.


๐Ÿ” Checking for compatible GPUs ๐Ÿ”

To check that OpenCL is installed and can actually see your GPU, run clinfo(1):

$ clinfo --list
Platform #0: AMD Accelerated Parallel Processing
 +-- Device #0: gfx1101
 `-- Device #1: gfx1036

and then the full version:

$ clinfo
Number of platforms    1
  Platform Name        AMD Accelerated Parallel Processing
  Platform Vendor      Advanced Micro Devices, Inc.
  Platform Version     OpenCL 2.1 AMD-APP (3649.0)
...
Number of devices      2
 Device Name           gfx1101
 Device Vendor         Advanced Micro Devices, Inc.
 Device Vendor ID      0x1002
 Device Version        OpenCL 2.0
...
 Global memory size    17163091968 (15.98GiB)
...
 Device Name           gfx1036
 Device Vendor         Advanced Micro Devices, Inc.
 Device Vendor ID      0x1002
 Device Version        OpenCL 2.0
...
 Global memory size    33247174656 (30.96GiB)

If your system has more than one device (look at you, fancy ๐Ÿ’…), use the device parameter and pass either the device name or the index (and yes, we count from 0, like real ones). For example:

$ nbdkit -f vram device=gfx1101

$ nbdkit -f vram device=0

Wanna see which devices the plugin itself can see? run:

$ nbdkit vram --dump-plugin
...
vram_num_devices=2
vram_device_index=0
vram_device_name=gfx1101
...
vram_device_index=1
vram_device_name=gfx1036

๐Ÿ“ Setting video RAM size ๐Ÿ“

By default the plugin will try to use as much of the video RAM on the device as it possibly can โ€” maximalist energy, we love it. But if you wanna limit the RAM to a smaller amount, use the optional size parameter, like:

$ nbdkit -f vram 10G

๐Ÿ“ Video RAM is lazily allocated ๐Ÿ“

The plugin allocates video RAM on demand, as you fill it up with data. it's not reserving everything upfront, it's doing the bare minimum until it has to. relatable.

Which means: if other people are using the GPU (say you're running a game at the same time, gamer bestie ๐ŸŽฎ), it is possible to run out of space. When that happens, writes will return ENOSPC "No space left on device" errors. sad but true.

If you wanna cap the maximum amount of video RAM that will ever get used, use the optional size parameter.

And if you trim the block device (peep blkdiscard(8) and fstrim(8)), the video RAM gets given back to the system. recycling queen ๐ŸŒˆ

Currently you cannot limit the video RAM used independently of the virtual size of the disk (because it's not a good idea). that's just how it is, bestie.


๐Ÿงš Integrated graphics ๐Ÿงš

Integrated graphics GPUs (the ones where the GPU is part of the CPU) usually use system RAM as video RAM. So there's literally no point using this plugin with integrated graphics. Instead, use nbdkit-memory-plugin(1) to use system RAM as a RAM disk. different tool, different vibe ๐Ÿซถ


๐Ÿ’œ PARAMETERS ๐Ÿ’œ

  • device=NAME โ€” pick your GPU by its OpenCL name.
  • device=N โ€” or pick it by device index (counting from 0, always from 0).

To list the devices that OpenCL knows about, use the clinfo(1) command.

If you're sitting there like "which device name or index do I even use ๐Ÿ˜ญ", just go consult the output of nbdkit vram --dump-plugin.

  • [size=]SIZE โ€” limit the size of the video RAM disk. If you omit it, the plugin will try to use all available video RAM on the device.

Heads up: this may get rounded up by the plugin (currently to a multiple of 64K).

The size= prefix may be omitted in most cases. See "Magic parameters" in nbdkit(1).


๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

Various environment variables are passed through to OpenCL and to the OpenCL driver. Please go consult the documentation for your GPU โ€” it knows things we don't.


๐ŸŽ€ FILES ๐ŸŽ€

  • $plugindir/nbdkit-vram-plugin.so โ€” the plugin itself, the moment ๐Ÿ’…

Use nbdkit --dump-config to find the location of $plugindir.


โญ VERSION โญ

nbdkit-vram-plugin first appeared in nbdkit 1.46. a modern icon, honestly.


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

nbdkit(1), nbdkit-plugin(3), nbdkit-memory-plugin(1), clinfo(1), radeontop(1), blkdiscard(8), fstrim(8).


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Richard W.M. Jones

This plugin was heavily inspired by vramfs, a FUSE module written by Alexander Overvoorde (https://github.com/Overv/vramfs). giving credit where credit is due, as we should ๐Ÿซถ


Copyright Red Hat


๐Ÿ“œ LICENSE ๐Ÿ“œ

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of Red Hat nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

and that's the whole page bestie ๐Ÿ’… this was nbdkit version 1.48.1, dated 2026-08-29 โ€” like and subscribe, stay hydrated, and remember: your VRAM is temporary, but the vibes are forever ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from