In the author's Nvdimm run Vdbench and its own test program found: The different cache mode has a huge impact on system performance, the following data vividly illustrates this:
Write-through mode:
Writestook 47.227898 Megabytes per second
Readstook 1873.360718 Megabytes per second
Write-combing mode:
Writestook 1747.500977 Megabytes per second
Readstook 96.834496 Megabytes per second
Write-back mode:
Writestook 1581.937622 Megabytes per second
Readstook 1854.365479 Megabytes per second
From the above can be seen the different cache mode on the system performance is very large, then the actual application of the best use of the cache mode? The answer is in the negative.
Corresponding data integrity requirements of high write applications, such as power-off does not lose the data: must use Uncache mode, whether the strongest Un-cache mode, or Write-combing/write-through, to ensure that the file system write back before the data must fall to physical memory;
In the case of high data consistency requirements, if the demand for read performance is higher than the write performance requirements, you can use the Write-through mode, but pay attention to this time read is the cache, write performance requirements than read performance of the application, you can use write-combing mode, However, it is important to note that the data is first written to Write-comingbuffer, so you also need sfence/lock/interrupt/uncache and other instructions to brush write-comingbuffer data back.
The Write-back mode is the best choice for data consistency without too much requirement.
This article is from the "Store Chef" blog, so be sure to keep this source http://xiamachao.blog.51cto.com/10580956/1882852
Comparison of Reading and writing performance under different NVDIMM modes