allocating memory/cache on Optane SSD or Optane M2 module

12 views
Skip to first unread message

Qichang Liang

unread,
Jan 16, 2019, 4:05:46 AM1/16/19
to pmem
From previous emails, I understand that Optane SSD and Optane M2 module are block devices and seen as system as a drive.

However, suppose if I want to use these devices to store a large piece of contiguous data (instead of on RAM or on hard disk) that is too large to fit onto RAM but I want faster access than HD, what is the best way to do so?

Andy Rudoff

unread,
Jan 16, 2019, 7:15:36 AM1/16/19
to pmem
Hi,

The answer is the same as any other storage.  Use the standard storage APIs (open/close/read/write/mmap/msync).  read/write give you buffer-based APIs, and mmap/msync give you memory-mapped (paging) based access.  It will be faster than HDDs or NAND SSDs, but the APIs are all the same.  Of course, the basic storage APIs are pretty simple -- if you need transactional updates or other database like features, you'll want to use a library designed to provide those features on top of storage.

Hope that helps,

-andy
Reply all
Reply to author
Forward
0 new messages