3

I found out from the Docs that, given 100% usage of disk cache by orientdb, it uses a maximum size of 70% for read cache and 30% for write cache (http://orientdb.com/docs/last/plocal-storage-disk-cache.html#interaction-between-read-and-write-caches).

Reading more about the read cache, it's divided by 3 queque: a1in, a1out and am which their respectively maximum sizes are 25%, 50% and 75% of the read cache size (http://orientdb.com/docs/last/plocal-storage-disk-cache.html#queue-sizes).

It is clear that, in stable condition with the read cache full, it needs more than 70% of disk cache for the read cache. How is this handled? Some space is took from the write cache or simply more space from the start is given to the read cache?

Also, I would like to be sure that:

  1. the "disk cache" involved is the RAM included with a common disk (HDD or SDD) and not the RAM of the machine;
  2. the default space of disk cache used by orientdb is 100%, as written in the first link (possible to change with storage.diskCache.bufferSize parameter)

Thanks everyone!

michelepatrassi
  • 1,711
  • 12
  • 26
  • 1
    "It is clear that, in stable condition with the read cache full, it needs more than 70% of disk cache" I am creator of disk cache, so my question is why do you think so ? – Andrey Lomakin Apr 14 '16 at 08:21
  • 1
    "the "disk cache" involved is the RAM included with a common disk (HDD or SDD) and not the RAM of the machine;" That is not true, for example Western Digital Black 500GB 7200rpm 32MB, has 32 MB cache that is defenitelly not enough to speed up random io operations. – Andrey Lomakin Apr 14 '16 at 08:26
  • Disk cache more 70%: I written above the % about the Read Cache, the total it's 150% (also in the example is considered a read cache with 4 pages pointers as 100% and, at the end of the example, 6 pages pointers are stored (so 150%). – michelepatrassi Apr 14 '16 at 13:40
  • 1
    Disk cache in disk: so how is that condition you said (with 32MB cache) managed? Speaking clearly, if the cache mechanism is mainteined, where it is physically done?Thank u – michelepatrassi Apr 14 '16 at 13:44

1 Answers1

0

It is clear that, in stable condition with the read cache full, it needs more than 70% of disk cache.

Not all queues in read cache contain loaded data. The a1out queue which consumes 50% of disk cache size contains only information about pages which were loaded in a1in queue. So this queue contains so called "ghost entries" which in reality do not affect disk cache memory consumption. This queue is needed to provide additional statistical data overcome disadvantages of simple LRU cache.

Some space is took from the write cache or simply more space from the start is given to the read cache

Write cache and read cache share the same memory space, but part of the space exclusively belongs to write cache.

the "disk cache" involved is the RAM included with a common disk (HDD or SDD) and not the RAM of the machine;

We use RAM of server and do not use HDD buffer.

The default space of disk cache used by orientdb is 100%

It is used on 100% in case of high load of data, otherwise 15% now (not 30% as it is stated in documentation) is used only for write cache so is not used without presence of high data load.

Andrey Lomakin
  • 595
  • 2
  • 12