Suggestions for using Optane memory?

My laptop has a 512GB SSD and a 32GB Optane memory installed. In Windows this is apparently used to make the SSD even faster. Now, that Windows is off the laptop, the Optane memory sits around basically idle.

Are there any easy suggestions how to put it to good use? I am not sure that I want to go on an adventure path and but BCache to work of mess around with ZFS…

Would it be advisable just to mount /var on the Optane?

AFAIK, you can not use Optane as Cache in Linux, it is not supported in
kernel yet, you need to use it as an usual disk drive (you can find that
setting in your BIOS)

The Optane memory shows up like a regular, small, 32GB SSD. That would work just fine. My other question is: Which directory(ies) would best be served from there. Arguably, it could be /var and swap. But I wonder if anybody has better ideas.

How about striping two volumes with software RAID 0 ? :wink:

Linux software RAID works not only with identical drives, but also with partitions…

You could use that RAID partition as an ultra fast swap or OS partition (maybe).

If used for data make sure you’ve got some decent backup solution running.

Not sure if it is possible, but, 32gb is large enough for the Base OS and some swap. In such a setup, you’d have the fastest OS operation possible. You would need to verify that you can boot from the Optane.

1 Like

You can use your Optane memory with a caching solution under linux. As @miguelinux said, in your bios you can enable your Optane memory to work as a normal nvme disk, instead of a RAID unit under Intel’s RST. I have 32gb as well. You can use it as root, normally. You can use it as a swapfile on that nvme disk. Or you can use it as a caching solution with bcache.

I have a Samsung 970 nvme and use it as root. I’m using the Optane memory as a cache for my HDDs with bcache. Optane’s 3D Xpoint offers so-so transfer speed, but awesome random I/O, which is perfect for compilation of small files or compilation units. Whenever I’m compiling stuff in my HDDs, bcache is using the Optane memory. CL offers bcache in bundle:

sudo swupd bundle-add bcache-tools

Some guides on how to use bcache:
https://wiki.archlinux.org/index.php/Bcache
https://wiki.ubuntu.com/ServerTeam/Bcache
https://www.tech-g.com/2017/08/10/bcache-how-to-setup/

EDIT: I see you don’t want to mess with bcache and zfs… I’m using xfs. Maybe you can enable L2ARC caching in zfs and use memory and the optane drive with it?

2 Likes

Thank you for the very useful suggestions. Maybe I should give bcache a try. I currently have the Optane setup as swap and an extra partition for /var. That was the laziest option :slight_smile: But it does feel like a bit of waste, especially for the swap as it is rarely used.

It feels like an Intel-sponsored Linux distro ought to have better support for Intel sponsored technology :laughing: At least documentation.

Anyhow, I will report back when I get around to trying this out. I fear it might take a little while as the setup is probably a little more manual and “longer” than just using the installer and moving the /var directory to its own partition and adding swap to fstab.

I’d like to second this idea, this is how I use my optane and it’s really nice.

1 Like

How do you install Clear Linux into a bcache backing device? It seems that the installer wants to work with disk-partitions and not /dev/bcache0.

So, here is how far I got:

  1. Create a bcache backing device on one partition and a caching device on the Optane memory.
  2. Format the backing partition to XFS.
  3. Use swupd os-install to copy things to the new XFS partition
  4. Mount the boot partition onto /boot in the new XFS partition and run clr-boot-manager update
  5. unmount it all
  6. attach/register the backing and caching devices

and so far it all looks good - sort of. I can reboot Clear Linux from USB, do modprobe bcache, register the bcache devices (backing and caching) mount them, etc.

Except, when I boot into this, I get a kernel panic as the kernel does not seem to know how to mount the bcache backing partition. How do I configure the kernel-boot to recognize and use the backing partition?

nice discussion. i’ve a more basic challenge perhaps. i have a 16GB intel optane in my laptop. i want to use it with linux as a normal SSD, but it does not appear as a drive during installation process. pls help me configure the bios or whatever else i need to in order to achieve this. i have win 10 on the laptop now but i do not want or need win 10 at all.

the drive does appear in my bios as a raid 0 drive but i see no where i can change that setting. pls ask whatever details you need. thank you.