Can Intel Optane memory compensate for less RAM?

79

7

I currently have a laptop that is about two years old, and has 8 GB of RAM. I use my laptop for internet browsing, productivity applications, and programming, including data science within Spyder or RStudio. I'm running Windows 10.

I usually sit around 65% memory usage, or 5 GB roughly.

I recently purchased, but haven't yet received, a laptop which has 4 GB of standard RAM, and 16 GB of Intel Optane memory. The laptop was marketed as having 20 GB of memory, but after reading more about Optane memory, it seems that it serves more as a low-latency cache than as RAM.

For the purpose of running several memory-intensive programs simultaneously (e.g. browser with many tabs, data science IDEs) which average 5 GB of RAM usage, will decreasing RAM from 8 GB to 4 GB but adding 16 GB of Optane memory cause a performance slowdown?

Here's a snapshot of my current memory profile if it's helpful:

mem profile

Update: if you're curious, I was able to cancel the order without issue. The answers helped me realize that the new purchase would have most likely been slower than my current laptop.

N4v

Posted 2019-01-01T17:11:10.667

Reputation: 863

What kind of harddrive do your laptops have, SSD? Optane does wonders for older drives, but a lot less for SSD systems. – Mast – 2019-01-07T09:20:04.070

@Mast, The laptop has a HDD. – N4v – 2019-01-10T14:42:26.923

Answers

108

Intel Optane "memory" is a misnomer. It is just a cache memory card that can turn a simple hard disk into a hybrid disk, by adding a RAM cache that can work at the speed of an SSD disk.

Optane memory isn’t a random-access computer memory, or RAM. Instead, it's meant to work as a cache memory bridge between RAM and storage, allowing for faster data transfer between the memory, storage, and processor. As such, it's magnitudes faster than a spinning hard drive and can work at the speed of a budget SSD. And like SSD, it doesn’t erase itself when powered off.

Conclusion: You did make a mistake by falling for a commercial hype. In addition, 4 GB of RAM is ridiculously low in our current state of hardware and software. I would advise canceling the order for this laptop, if you still can.

harrymc

Posted 2019-01-01T17:11:10.667

Reputation: 306 093

Although I don't completely agree with the first part of Harry's answer, I do agree with the overall message. In your case, I would imagine the laptop will not have the performance you were tricked into believing it has. Optane is not a replacement for traditional RAM. – BloodPhilia – 2019-01-01T17:52:27.890

2@BloodPhilia: What part don't you agree with? – harrymc – 2019-01-01T17:54:09.850

The part about it turning your conventional drive into a hybrid disk. I know what you mean but I think the description is slightly oversimplified. Optane does a lot more than just cache (part of your) storage data. – BloodPhilia – 2019-01-01T17:56:10.313

7

Good answer. +1. Additionally, I would like to suggest this article, which compares access speeds to human reference scale, from 1 clock cycle -> 1 second, RAM -> 4 minutes and Optane -> 7 hours. This really shows how much scale difference there is between for example L1 cache and disk access speeds...

– agtoever – 2019-01-01T18:33:30.307

@harrymc, Thanks. If we a take a simple example where I have Chrome open with many tabs, would it be generally correct to say that more RAM will always outperform less RAM + Optane? Could there be any scenarios in which 4 GB RAM + Optane would outperform 8 GB RAM? – N4v – 2019-01-01T22:59:57.927

9

It's not actually a misnomer, since there's a version that uses DDR4 interface and replaces actual RAM https://arstechnica.com/gadgets/2018/05/intel-finally-announces-ddr4-memory-made-from-persistent-3d-xpoint/

– phuclv – 2019-01-02T01:53:17.350

54 GiB of RAM isn't ridiculously low, but it's quite falling behind the average. – iBug – 2019-01-02T04:46:48.247

@N4v: Scenarios where 4GB RAM + 20 GB Optane is more efficient will always involve disk accesses. Chrome with many opened tabs will need RAM. Without enough RAM, Windows will swap memory out to disk/Optane, where for performance see the link in the comment above by agtoever. – harrymc – 2019-01-02T06:57:36.353

7@iBug It is. For a new device, which is what this question is about. Especially if, as in this case, the older laptop had twice as much RAM. – Kakturus – 2019-01-02T08:16:12.400

43Advertising that laptop as having 20GB of RAM isn't 'commercial hype', it's a blatant lie. – patstew – 2019-01-02T19:39:22.520

3While I agree with the conclusion, most of the details seem to stem from a few misunderstandings. Optane is best described as a Type of memory with properties somewhere between DDR# (traditional RAM) and NAND Flash Memory. (e.g. an SSD). It can be used for anything, just as any storage can used for anything. – NoLongerContributingToSE – 2019-01-02T20:39:53.257

Another benefit of Optane i think is it do not wear out like a SSD do on writes. – CodeMonkey – 2019-01-03T07:55:09.520

1

"It is just a cache memory card that can turn a simple hard disk into a hybrid drive". This is incorrect. This is how the first generation of Optane was marketed and used. With current motherboard chipsets, we have IMDT, which shows RAM like performance for Random Access Read (at low queue depth) dominated workloads. http://www.lmdb.tech/bench/optanessd/imdt.html The OP's use case does fall under that work load. However that technology has to my knowledge only been made available to Fedora based OS. How it would fare as a scratch disk for Win10 is another question entirely.

– Aron – 2019-01-04T08:45:29.693

1@phuclv Even saying that is slightly misleading, though, since Optane RAM is less performant than normal DDR# RAM in everyday desktop use and only works on Xeon systems anyway, not to mention that it isn't out yet and is likely to be prohibitively expensive for anyone that just wants to put it in their home PC once it is. – Abion47 – 2019-01-04T18:44:00.427

@Aron: Does that work by memory-mapping the PCIe device into the kernel's virtual address space, alongside DRAM? Similar to NVDIMMs hooked up to the memory bus, but going over PCIe instead. I wrote an answer on this question that mentions the other fun things that the Optane trademark is used for, like their NVDIMMs for persistent memory. But I wasn't sure if IMDT could work with the consumer Optane SSDs, and whether it would be mapped Write-Back cacheable or what. If so, that's kinda neat. I'm a CPU architecture geek, not a sysadmin (any more).

– Peter Cordes – 2019-01-07T08:10:30.793

@PeterCordes I won't pretend to know the details. But I imagine it would not be the case. Optane write speeds are significantly slower than DRAM, which would mean naïve performance would suffer greatly with such an architecture. Additionally simple Memory Mapping wouldn't require a whole new motherboard chipset. I imagine that is implemented on the MMU with some kind of heuristics to page active read write pages into the DRAM. – Aron – 2019-01-07T08:26:31.413

@patstew It's not sure it is a lie. It could be some quite normal tech incompetence also. Remember tech guys and advertising guys are rarely the same people. – mathreadler – 2019-01-07T10:11:11.693

@mathreadler If you sell someone a car over the internet and tell them it's a Lamborghini even though it's really a Lada, it's no defence to say 'I didn't know that there's a difference, I don't know much about cars'. You've still lied by asserting something false when you had no idea whether or not it's true. – patstew – 2019-01-07T15:03:16.360

Many people would say that lying is knowingly telling something else than the truth. It is quite reasonable an advertiser or salesguy dont know technical stuff. In fact if you ever worked in technology you would know this happens a Lot. – mathreadler – 2019-01-07T17:12:09.060

30

The other answers cover the gist of the situation but I'd like to add some context.

For a long time, RAM has been often called 'memory' in laptops targeted at the layperson. This is usually helpful and hasn't caused issues, until recently. The same companies that started this practice are now lumping Optane cache and RAM under the same name 'memory' with the intention of tricking you into thinking that the laptop has more RAM than it actually has. Optane technology is still relatively new and unknown so this deception is very easy to fall for. Looking deeper into a product listing will usually reveal the truth.

Optane cache doesn't, and wasn't meant to, replace RAM. They both help speed up a computer, but operate differently and in different situations. Having Optane won't alleviate the heavy slowdown of only having 4GB of RAM when normal use requires at least 5GB.

You've fallen victim to intentionally deceptive marketing. I recommend purchasing a different laptop (with 8GB or more of RAM) to satisfy your use case. Perhaps one from a more upfront manufacturer.

sm9sn1

Posted 2019-01-01T17:11:10.667

Reputation: 410

9

Only 4 GB? I hate to break it to you, but to the full extent of my knowledge (which isn't much) Intel Optane is not like memory aka RAM; it's like an SSD that takes the applications you use most and puts them on a faster drive so they load faster.

So an Intel Optane drive might eliminate the need for an SSD (please feel free to correct me on this). Your manufacturer probably put an Optane drive in your laptop and marketed it as RAM because 20 GB of Intel Optane is cheaper than 20 GB of RAM*, but maybe you can manually change the RAM to 8 GB for about $80.

*24 GB of laptop RAM $182
24 GB of laptop RAM

4 GB of laptop RAM and 16 GB of Intel Optane memory $87
laptop RAM
Intel Optane memory

rpi-noob

Posted 2019-01-01T17:11:10.667

Reputation: 108

8

In this context (budget consumer gear), Optane is pretty clearly just referring to a small/fast NVMe-connected SSD using 3D XPoint memory (instead of NAND flash), giving it a very high write endurance. (So it won't wear out if used as swap space).

This is still going to suck for many workloads, because it still takes a page-fault and many microseconds to access, vs. ~70 nanoseconds for a DRAM access (cache miss); it's not directly memory-mapped on the CPUs memory bus. Also, out-of-order execution / HW prefetch / other memory-parallelism can keep ~10 cache misses in flight per physical core, but a page fault is serializing. No useful work can be happening (in this thread) while the OS is servicing a page fault, so there's no opportunity for OoO exec to hide any of that hard page fault latency. (But even 70ns is too long to fully hide anyway. Still, having multiple misses in flight to different lines goes a long way toward mitigating it for some workloads.)


Using a cripplingly-small amount of RAM and depending on a fast SSD for swap space / pagefile is not the only use-case for this kind of Optane. (And probably not even a good use-case). As https://www.tweaktown.com/articles/8119/intel-optane-memory-matters/index.html describes, it's main use-case is as a transparent cache for a magnetic hard drive. I think Intel provides Windows drivers to make this happen. You can buy SATA hard drives that have rotational magnetic storage with some flash built-in as a buffer / cache for frequently-accessed parts of the disk. Optane HW + drivers can do this for any disk.

Optane NVMe apparently has very good random read performance at low queue depth (wait for one read to finish before starting another, which unfortunately does happen when a program has to read one block before it can figure out what to do next, and software prefetching isn't helping). So it should be great at speeding up program start times, and bootup.

Not particularly amazing for large contiguous writes of big files; hopefully the driver software knows to bypass the Optane cache and go straight to the underlying magnetic disk for that. Intel's main Optane page links to https://www.intel.ca/content/www/ca/en/products/memory-storage/optane-memory/optane-16gb-m-2-80mm.html which shows their 16GB M.2 Optane has 900MB/s sequential read, but only 145MB/s sequential write. The 32GB version is faster, at 1350 MB/s read, 290 MB/s write. But again, those aren't what Optane is best at. It's sequential and random read IOPS are both 240k IOPS, with 7 µs read latency.


Intel has something called IMDT (Intel Memory Drive Technology) which is a hypervisor that creates the illusion of a larger main memory address space for the operating system. Some pages will be mapped to the actual DRAM main memory while others are mapped to the SSD memory. When a page mapped to the SSD is accessed, a page fault occurs caught by IMDT, which will cause the page to be brought from the SSD to main memory (potentially evicting a page from memory to the SSD). IMDT will try to prefetch pages into DRAM to alleviate the inferior bandwidth and latency of the SSD. It will also try to keep the hottest pages in main memory so that they can be accessed with minimal penalty (the only penalty may come from the additional paging layers due to virtualization.) The OS is mostly oblivious to this mapping and works normally. This kind of memory system is called software-defined memory (SDM). The nice paper titled "Evaluation of Intel Memory Drive Technology Performance for Scientific Applications" provides a performance evaluation of IMDT and compares it against a system that has the same amount of DRAM main memory. I've not thoroughly read the paper, but it appears that IMDT can migrate pages between NUMA nodes to get them closer to the node where they are mostly needed.

That said, IMDT is only supported on server-grade Intel processors. It's intended to create cost-effective, power-efficient servers with a potentially small impact on performance.

http://www.lmdb.tech/bench/optanessd/imdt.html has some benchmarks with an Optane DC P4800X SSD. (The high-end data-centre version, not consumer stuff. Much higher sustained write capability.)

I haven't looking into this, so I'm not sure if it's relevant at all for how Windows could take advantage of a consumer Optane SSD.


The Optane brand name is (somewhat confusingly) also used for a much more interesting exotic thing:

3D XPoint Non-volatile DIMMs, aka "Optane DC Persistent Memory". https://www.anandtech.com/show/12828/intel-launches-optane-dimms-up-to-512gb-apache-pass-is-here. Apache Pass is the name of the first-generation Optane DC PM. Refer to this for information on future generations.

Intel has their own mostly-marketing page for it here, with some links to tech details. The "DC" stands for Data-Centric, apparently.

This is non-volatile storage that plugs in to a DDR4 DIMM slot, and appears as actual physical memory. Apparently it's only fully supported by next-generation Xeons (not the current Skylake-X aka Skylake Scalable Processor series).

There are other kinds of NVDIMM, e.g. battery-backed regular DRAM (optionally with flash to dump the data to for long-term power off, so they only need a supercapacitor instead of a chemical battery). https://en.wikipedia.org/wiki/NVDIMM has some details.

https://www.electronicdesign.com/industrial-automation/why-are-nvdimms-suddenly-hot has some more general info on NVDIMMs (and JEDEC standardization of them, and how OS + applications can cooperate to let applications talk directly to a region of memory mapped NV storage, ensuring commit ordering and so on). The main point is that they actually blur the line between RAM and storage (in a computer-architecture sense, not in the strictly-marketing sense of the deceptive laptop ad you saw that claimed 4+16GB.)


The OS can let a process map this non-volatile physical memory into their own virtual address space so they can access storage directly with user-space loads and stores to memory addresses, without any system calls, letting the CPU hardware continue out-of-order execution while there are outstanding reads/writes. (There are software libraries to let developers take advantage of this, including the ability to flush() and make sure that data is actually written to persistent storage.

This mapping can even be write-back cacheable, so usage of the data benefits fully from L3/L2/L1d cache until it's time to write it back (if modified). For read-mostly data, this kind of Optane really could justifiably be called 4+16GB of RAM. (Of course, the current data-centre use-case for Optane NVDIMMs would use much larger DIMMs, like 512GB.)

(It's not like an mmaped file on a normal disk where you just map the OS's page-cache for the file, and the OS takes care of doing I/O in the background to sync dirty RAM pages with the storage device.)

Making sure some data has actually reached NV storage before others (to allow crash recovery like a filesystem or database journal) is essential. With system calls, this is where you'd use POSIX fsync or fdatasync. But since the application has the storage truly memory-mapped, this is where library function calls come in.

In x86 asm, we're accessing storage with normal loads/stores, but we care about when data is actually written back to the NVDIMM (where it's safe from power loss), not when it's visible to other cores or to cache-coherent DMA (as soon as it commits from the store buffer to L1d cache), so x86's normal memory-ordering rules don't completely take care of everything. We need special instructions to flush selected cache-lines from the CPU's cache. (For use by the NV storage libraries.)

The clflush asm instruction has existed for a while, but NV storage is a major reason why Intel added clflushopt in Skylake (although it has other use-cases, too), and is adding clwb in Ice Lake (write-back without eviction).

Dan Luu wrote an interesting article a while ago about the benefits of taking the OS out of the way for access to storage, detailing Intel's plans at that point for clflush / clwb and their memory-ordering semantics. It was written while Intel was still planning to require an instruction called pcommit (persistent commit) as part of this process, but Intel later decided to remove that instruction: Deprecating the PCOMMIT Instruction has some interesting info about why, and how things work under the hood.

(This got way off topic into x86 NV storage low level details. I should find somewhere else to post most of this section, but I think it )


There are also Optane DC SSDs, as a PCIe x4 card or 2.5". The 750GB version does up to 2500 MB/s sequential read, 2200 MB/s sequential write, and 550000 IOPS random read or write. Read latency is slightly worse than the M.2 NVMe, at 10 µs.

This is what you want if you for a database server or something (if you can't use NVDIMM), but it wouldn't make your 4GB laptop much faster (for most typical use cases) than the 16GB Optane they sell it with. Swap space thrashing often produces a lot of dependent reads as a page has to be paged in and accessed before the code that page-faulted can continue on to whatever it was going to do next. If memory is really tight, the OS doesn't have spare pages to aggressively prefetch into, so you'd expect low queue depths which the consumer Optane is optimized for. (Low latency.)


The Intel Optane SSD offers a nice performance-power-cost trade-off. SSDs basically don't consume power when not accessed. In contrast, the static power consumption (mostly due to refresh) in DRAM chips is significant. So the amount of DRAM in a system should ideally match the working set of the typical workload. The system you've purchased was designed for a typical workload that requires about 4GB of main memory or less. In this case, if the system had 8GB of main memory instead, it will unnecessary consume more power, which would reduce the battery life. However, the Optane SSD allows you to occasionally run workloads that require slightly more main memory with minimal performance degradation (compared to NAND-based SSDs or HDDs).

DRAM memory currently costs about USD 4.5$ per 1GB while Intel Optane SSD costs about USD 2$ per 1GB. So a 16GB Optane SSD is more expensive than a 4GB DRAM module, but cheaper than an 8GB DRAM module. So if you take out the Optane SSD and add 4GB more memory, you'll get a cheaper system, which is also faster on average for typical workloads with larger than 4GB working sets. But hard page fault handling, page prefetching, and page swapping would be slower from the HDD. That's why the 8GB system will probably be slower than the 4GB DRAM + 16GB Optane SSD system if the typical workload requires less than (or about) 4GB of memory.

Your laptop is great if you're just going to use it for Internet browsing or text editing. The Optane SSD helps with boot-time, provides quick access to the most frequently accessed files, and can be used as an additional secondary storage. So although you're paying more 16GB Optane SSD than 4GB of DRAM, you're getting certain, unique benefits for that. But some of the other applications you mentioned, such as RStudio, require a minimum of 4GB memory. If you'll typically use a browser and RStudio at the same time (and maybe other apps), then you should a get a system with at least 8GB of memory. Optane SSD is till good to have though.

Peter Cordes

Posted 2019-01-01T17:11:10.667

Reputation: 3 141

3

Others have covered many aspects of this very well and I think you already know that Intel Optane is in no way comparable to RAM.

In a Von Neumann architecture, "RAM" refers to the primary storage in a computer, whic is directly access by the processor. An Intel Optane drive belongs to the category of "secondary storage" because it is more like a disk rather than RAM.

Strictly speaking, in modern computers RAM is the only primary storage because it's the only thing that's connected directly to the processor. We classify Intel Optane disks because it's not connected directly to the processor, but an I/O bus (or the disk controller). This heavily limits the potential of an Optane drive and ultimately disqualifies it from being comparable to RAM.

If you have an Optane disk, better pick it up and sell it, the buy a real NVMe SSD which is usually faster. I'm running on an HP EX920 and all its I/O specs (sequential / 4K) are higher than the Optane drive.

iBug

Posted 2019-01-01T17:11:10.667

Reputation: 5 254

Optane's main advantage is low-queue-depth random read IOPS. That's a very common workload for desktops when starting a program, for example. That's what Optane is for. https://www.tweaktown.com/articles/8119/intel-optane-memory-matters/index.html has a graph (but they don't show what SATA or NVMe SSDs they're comparing against.) Usually writes can be buffered, but programs often have to wait for reads. (And sometimes the next read doesn't happen until the first read finishes, e.g. loading new code that can't run until it's loaded, or simply lack of I/O parallelism in the software.)

– Peter Cordes – 2019-01-07T06:39:07.437

@PeterCordes My EX920 (1TB) can run for up to 16k IOPS for 4 KiB Q1T1 read and 40k IOPS for 4 KiB Q1T1 write, somewhat lower than half of results I've found online (40k read). But I'm still a firm advocate of real SSDs (970 EVO is my favorite, but I couldn't afford when I went for this EX920). – iBug – 2019-01-07T07:02:47.280

2

I recently purchased, but haven't yet received, a laptop which has 4 GB of standard RAM, and 16 GB of Intel Optane memory. The laptop was marketed as having 20 GB of memory

If this is true, you should ask your money back, you have been scammed.

Optane is Intel's marketing word for a combination of a solid state drive with 3D XPoint memory (which is little more than twice as fast as NAND, but also much more expensive) and some more or less intrusive driver/tool combination that interfere with your operating system's normal mode of operation -- much like the very similar stuff that Samsung has been distributing for years with their Evo disks (comes as optional install via Samsung Magician).

It is by no means a replacement for RAM, not only because the memory itself is much slower, but also because when used for virtual memory, you have the interrupt latency and processing cost of page faults (which uses actual processor cycles). Also, data has to go over a bus which -- although pretty fast -- is still significantly slower with significantly higher latency compared to ordinary RAM, plus you share bandwidth with other transfers on the bus.

So... if you have a poor harddisk, Optane (or any SSD for that matter) may be a viable strategy for caching data. But as a drop-in replacement or extension for real RAM, no way.

Damon

Posted 2019-01-01T17:11:10.667

Reputation: 4 002