@@ -563,6 +563,25 @@ operation.
563
563
564
564
Number of bytes read by the operation from the disk to the cache.
565
565
566
+ Data read from disk into the cache includes everything needed
567
+ to execute the query. If the data is already in the cache,
568
+ then the number of bytes read from disk could be ``0``.
569
+
570
+ The number of bytes read from disk includes more than the
571
+ queried documents:
572
+
573
+ * WiredTiger reads in units of pages and a page may contain one or
574
+ several documents. If a document is in a page, all documents in that
575
+ page are read into the cache and included in the ``bytesRead`` value.
576
+
577
+ * If the cache requires page management (such as eviction or rereads),
578
+ the ``bytesRead`` value includes data read from disk
579
+ in these operations.
580
+
581
+ * If the index is not in the cache or the index in the cache is stale,
582
+ WiredTiger reads several internal and leaf pages from disk to
583
+ reconstruct the index in cache.
584
+
566
585
.. data:: system.profile.storage.data.timeReadingMicros
567
586
568
587
.. versionadded:: 4.2 (*Also available starting in 4.0.9*)
@@ -577,6 +596,17 @@ operation.
577
596
Number of bytes written by the operation from the cache to the
578
597
disk.
579
598
599
+ WiredTiger typically doesn't require the query to write to disk.
600
+ Data modified by the query is written to an in-memory cache that
601
+ WiredTiger flushes to disk as part an eviction or checkpoint
602
+ operation. In such cases, ``bytesWritten`` shows as 0.
603
+
604
+ If the thread running the query requires forced page management
605
+ (such as eviction), WiredTiger writes the page contents to disk.
606
+ This flush likely includes data unrelated to changes made by the
607
+ query itself, which can cause ``bytesWritten`` to show
608
+ a higher value than expected.
609
+
580
610
.. data:: system.profile.storage.data.timeWritingMicros
581
611
582
612
.. versionadded:: 4.2 (*Also available starting in 4.0.9*)
0 commit comments