So, a quick review of an experiment I ran this week. (I also posted this at the brazilian Linux community)

Since RAM prices are VERY high, I wondered if Intel’s Optane memory would be a good intermediate substitute between my SSD (a WD Green that doesn’t even hit 150 MB/s on btrfs with LUKS) and having more RAM.

I did some research and saw the prices were very low, so why not buy one? Basically, the 16GB M10 modules are the Optane-only ones, so technically they would be good for this kind of task.

It arrived, I installed it on the motherboard, partitioned it as a swap, added it to fstab, and the 13.4 GiB of swap was there, with zswap configured using zswap.max_pool_percent=90 zswap.accept_threshold_percent=95, and zstd as the compression algorithm. The machine is running Artix with XFCE, a Xeon E5 2667 v4 CPU, 16 GB of RAM, and an RTX 3050 6GB.

I decided to play Victoria 3, and it was smooth. I also compiled a few Java projects, it ran smoothly as well. Then, since I didn’t have anything more intimidating for my RAM, I downloaded an open LLM model to test the memory pressure, just the file size is larger than my combined VRAM + RAM, and it was the Qwen-AgentWorld-35B-A3B-UD-Q4_K_S.

It ran smoothly. Then I played a video in FreeTube and opened LibreWolf, asked it some questions, and it handled the token generation at 20 tk/s in llama.cpp without any issues. It had occasional slight hiccups (much smaller than when the swap was on my SSD), but considering I was using all of that (as shown in the image) as swap space, I think it honestly withstood the memory pressure. I tested again with lz4 as the compression algorithm and got an OOM when loading the model, so every bit of compression seems to matter as well.

So, I think it might be worth it for anyone who has a swap file on a entry level SATA SSD or an HDD, it’s a good middle ground. But if you have an expensive NVME SSD, then idk if it’s very worthwhile.

I did notice a good improvement in the PC. I don’t think it was that useful, but at this price, it’s basically free performance.

  • potatoguy@mbin.potato-guy.spaceOP
    link
    fedilink
    arrow-up
    28
    ·
    15 hours ago

    A line of memory from Intel that’s like NAND, but it’s not NAND. It’s 3D Xpoint, very good at random reads or sequential reads.

    sudo hdparm -t /dev/nvme0n1p1
    
    /dev/nvme0n1p1:
     Timing buffered disk reads: 2682 MB in  3.00 seconds = 893.33 MB/sec
    
    sudo hdparm -t /dev/sda
    
    /dev/sda:
     Timing buffered disk reads: 670 MB in  3.01 seconds = 222.89 MB/sec
    

    Edit: when the swap was at my main drive, the sequential reads were like 140 MB/s

    • Overspark@piefed.social
      link
      fedilink
      English
      arrow-up
      16
      ·
      11 hours ago

      One of the main advantages of Optane doesn’t easily show in a benchmark: it doesn’t have to do any cleanup. Normal SSD’s cheat all the time by caching writes in DRAM and an SLC portion of the NAND. Usually that works fine and you won’t notice, but if you keep writing then at some point performance will plummet dramatically. Also, the SSD’s need a breather every now and then to rewrite that cached data to it’s final place, during which time performance is also worse.

      Optane doesn’t need any of that. You can write to it at max speed 24/7 and it’ll just take it and keep going, at ridiculously low latency. Perfect for handling large non-stop data streams, or workloads that need a guaranteed low latency (both for reading and writing). It’s a real shame the concept failed, the tech was fantastic.

    • ∟⊔⊤∦∣≶@lemmy.nz
      link
      fedilink
      arrow-up
      20
      ·
      15 hours ago

      This is why I didn’t bother going a web search, this is a much better more concise answer than I would have got. I totally understand now