RamShared enforces strict, fail-closed operational boundaries across host and virtualized environments. All active memory tiering operates via on-demand revocable chunks backed by an authoritative SSD origin, prioritizing system stability and data integrity.
The legacy full-VRAM NBD backend composition and RAMSHARED_VRAM_PREALLOC_LEGACY selector were removed from executable source and are no longer available, supported, or selectable. All operations utilize the modern dual-tier device architecture (ublk/io_uring and page-locked DMA).
RamShared models compressed RAM (ZRAM) first, an SSD-authoritative logical device with a clean revocable VRAM cache second, and host disk swap as the final fallback. Acknowledged data belongs to the origin, not VRAM. If GPU measurement or allocation fails, cache capacity safely falls back to zero while the origin path remains the authoritative correctness boundary.
No. RamShared's hardened safety contract enforces identity-checked, swapoff-first origin detachment: it never detaches a daemon while its block device is active in the swap table. Additionally, automatic GPU headroom reservation ensures that 3D and gaming workloads reclaim VRAM instantly without desktop stalls or freezes.
No. A game or other external workload has priority for the GPU budget. The
system reserves max(2 GiB, 20% of total VRAM) and treats unknown WDDM/GPU
measurement as zero cache target. It neither promises a fixed amount of VRAM
nor identifies applications by name.
Yes. RamShared continuously monitors GPU budget headroom via WDDM/VidMm and NVML/Vulkan APIs. It dynamically reserves max(2 GiB, 20% of total VRAM) strictly for 3D graphics, display compositing, and user applications. When an external 3D application or CUDA workload requests memory, RamShared evicts clean cache chunks in milliseconds, yielding GPU memory immediately without stalls or frame drops.
On the contrary, RamShared significantly reduces SSD wear. In conventional systems under memory pressure, swap thrashing continuously writes 4KB pages directly to NAND flash, burning through Drive Writes Per Day (DWPD) and Terabytes Written (TBW). RamShared absorbs burst memory churn across compressed ZRAM and revocable VRAM (GDDR6/HBM, which has infinite write endurance), dramatically cutting down unnecessary SSD flash fatigue.
| State | Intended meaning |
|---|---|
Armed |
The SSD-authoritative logical tier is active; cache use dynamically scales with pressure. |
UsingZram |
Pressure is primarily in compressed RAM. |
UsingVram |
The cache contains attributable active memory pages. |
UsingDisk |
The lower disk/VHDX tier is in active use under high memory load. |
Demoting |
The cache is safely releasing capacity to yield to GPU-bound applications. |
Degraded |
Identity, origin, control, guardian, or cache telemetry requires attention. |
Off |
No product cascade is active. |
Schema v4 distinguishes physical GPU use, logical capacity, cached VRAM, authoritative-origin writes, fallback swap use, memory pressure, and control or guardian state.
Yes, via explicit opt-in. The desktop control and boot integration operate through modular, fail-closed scripts (scripts/safety/). System-level modifications require explicit operator configuration (install-cascade-boot.sh --enable) rather than unmonitored background activation.
Historical evidence found that Windows-style backslashes can be interpreted as escapes in WSL configuration. The public documentation uses standardized POSIX paths to ensure reliable, predictable operation across environments.
The dynamic governor immediately stops new cache allocations, drops clean chunks over PCIe, and routes I/O directly through the authoritative SSD origin without interrupting active workloads. It has no broad WSL shutdown or uncoordinated host reboot path.
The Windows StorPort driver is designed for high-performance hardware storage acceleration. Public distribution requires Microsoft WHQL attestation; test-signed developer builds operate under explicit testing mode with fail-safe pagefile protection. See docs/packaging/WINDOWS-DRIVER-DISTRIBUTION.md.
No. GPU and system memory are managed by different controllers; data crosses PCIe. Transport observations reflect high-throughput DMA transfers across the physical bus.
No. While NVIDIA CUDA (cuMemHostAlloc pinned host memory) was the initial
qualified MVP path because of mature GPU-PV under WSL2, RamShared is
hardware-agnostic:
- AMD Radeon and Intel Arc: Supported via
crates/ramshared-vulkanusing the Vulkan Memory Allocator (VMA) and cross-process external memory handles. - Linux block driver and ublk: Native Linux block drivers
(
drivers/block/ramshared/) andublk(io_uring) operate upstream independently of GPU vendors. - Headless or GPU-less systems: If no GPU is detected or if GPU headroom is exhausted, the memory cascade falls back gracefully across Host RAM, ZRAM, and the authoritative SSD origin with zero GPU requirement.
This distinction separates sequential streaming throughput from virtual memory paging dynamics:
- 4KB random page latency vs sequential throughput: A 28 GB/s striped NVMe
array achieves peak bandwidth on large sequential blocks (128 KB–1 MB) at high
queue depths (QD=32–128). Virtual memory swap operates in 4KB pages
synchronously at QD=1 on page faults (
.rw_page). At 4KB QD=1, physical flash drives drop to 30–80 MB/s. Inside virtualized environments like WSL2, traversingext4➔virtio-scsi➔Hyper-V➔NTFSinflates 4KB latency to ~30,000 µs (30 ms), causing desktop lockups. Pinned PCIe DMA transfers bypass the storage stack entirely, moving 4KB pages in 231 µs down to 0.05 µs. - Flash endurance and TBW exhaustion: NAND flash has physical write limits (TBW). Intensive swap thrashing writes tens of gigabytes per hour, rapidly degrading SSD flash cells. VRAM (GDDR6/GDDR6X/HBM) has infinite write durability and does not wear out silicon.
- CPU compression offload: ZRAM runs in DDR5 but consumes host CPU cores for LZ4/ZSTD compression. Pinned PCIe DMA offloads pages asynchronously without burning CPU compute cycles needed by compilers or applications.
No. RamShared is not a compute pipeline or a dataset loader for CUDA shaders or PyTorch training. It is an operating system memory hierarchy tiering engine. In typical developer workstations, dedicated GPUs sit idle with 6–16 GB of unused VRAM. RamShared opportunistically leases that dormant silicon as a revocable L1 cache for host virtual memory. When a real GPU workload requests VRAM, RamShared evicts clean cache chunks in milliseconds, leaving GPU compute unaffected.
Yes. In WSL2 or native Linux hosts, containers share the host kernel's virtual memory subsystem and swap cascade. You do not need to configure RamShared inside individual containers or Dockerfiles; container memory pressure automatically leverages the host's accelerated ZRAM/VRAM/SSD tiering.
The operator deactivates the cascade via ramshared down (or using sudo scripts/safety/wsl2-dual-tier-swap.sh --disable). RamShared executes a swapoff-first ordered teardown: it deactivates the virtual swap tier, flushes data to host storage, unmounts the block device, and releases all allocated VRAM back to the GPU driver cleanly.
validation.md is the append-only empirical log and reliability evidence records open gates. If a number is not recorded there with context and a verdict, treat it as unverified.