diff --git a/docs/CM_FAQs.adoc b/docs/CM_FAQs.adoc index 229a9844f..ed7ccbca5 100755 --- a/docs/CM_FAQs.adoc +++ b/docs/CM_FAQs.adoc @@ -58,6 +58,28 @@ Will Chronicle Map work in *Docker* environments “out-of-the-box”. For examp ===== Answer While Chronicle Map has not been tested with *Docker*, we are not aware of any reason why it would not if you use Chronicle Map for IPC (https://en.wikipedia.org/wiki/Inter-process_communication). In other words, if you distribute data between two or more instances of the same map, then the same memory mapped file which holds your map data would have to be available to all the instances of Chronicle Map. We assume this would have to be in the same docker. Alternatively, you could replicate the data between your maps using Chronicle Map Enterprise. +== What are the performance benefits of Disk vs RAM? + +===== Question + +Should we specify faster RAM or a faster disk to Chronicle improve read/write performance. + +===== Answer + +Chronicle recommends lots of high-speed RAM. This is because Chronicle uses the page cash and RAM is in effect a cache to the disk. + +There are two cases where having a high-speed disk will give you a real benefit: + +====== 1. Data rate +If the rate of data that you are writing exceeds the disk write speed. In most applications this is unlikely to occur. + +====== 2. Page cache miss +When you get a page cache miss. For Chronicle queues which write and read messages lineally across memory, we mitigate this situation with the use of the Chronicle pre-toucher. The pre-toucher ensures that the page is loaded into the page cache before being written into the queue. + +For Chronicle Map, it is somewhat more complicated because Chronicle Map reads and writes your entries with random access across both the memory and disk. In this situation, if the entire map can be held within the page cash, then a read, or write, to the map will not have to access the disk. The operating system will work in the background ensuring that entries written to the page cache are propagated to the disk, but this is done via the operating system and is not on the critical path. + +It follows that if you have quite a few maps, especially large maps, and your page cash is not large enough to hold all of these maps, then a read, or write, to a random entry may cause a cache miss. This in turn would cause a disk read or write. If you were going to install high-speed SSDs, Chronicle recommends that you use them to store the Chronicle maps and leave the slower cheap disks for the Chronicle queues. In addition, you should avoid using network attached storage, as this usually offers worst performance than local disks. + ''' <<../ReadMe.adoc#,Back to ReadMe>>