Last active
November 11, 2024 17:40
-
-
Save moderation/f9f06429f1ad26a97f72b47a08e35ca1 to your computer and use it in GitHub Desktop.
Alternate updated versions of the excellent diagram at https://transactional.blog/how-to-learn/disk-io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="642px" height="492px" viewBox="-0.5 -0.5 642 492"> | |
<style type="text/css"> | |
text { font-family: 'Berkeley Mono'; font-size: 12px; } | |
</style> | |
<defs></defs> | |
<g> | |
<g> | |
<g> | |
<g> | |
<g> | |
<rect x="160" y="0" width="120" height="30" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="220" y="19" fill="rgb(0, 0, 0)" text-anchor="middle">Application Memory</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="280" y="0" width="120" height="30" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="340" y="19" fill="rgb(0, 0, 0)" text-anchor="middle">Page Cache</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="400" y="0" width="120" height="30" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="460" y="19" fill="rgb(0, 0, 0)" text-anchor="middle">Disk Cache</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="520" y="0" width="120" height="30" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="580" y="19" fill="rgb(0, 0, 0)" text-anchor="middle">Disk Storage</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="60" width="100" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="74" fill="rgb(0, 0, 0)">write()</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="80" width="100" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="94" fill="rgb(0, 0, 0)">O_DIRECT</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="100" width="100" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="114" fill="rgb(0, 0, 0)">+ O_SYNC</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="180" width="140" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="194" fill="rgb(0, 0, 0)">O_DIRECT + O_DSYNC</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="120" width="100" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="134" fill="rgb(0, 0, 0)">fsync()</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 333.63 70 L 223 70" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 338.88 70 L 331.88 73.5 L 333.63 70 L 331.88 66.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="70" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 89.5 L 223 89.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="90" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 90 L 400 90" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 453.63 89.55 L 400 90" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 458.88 89.51 L 451.91 93.07 L 453.63 89.55 L 451.85 86.07 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 109.5 L 223 109.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="110" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 110 L 400 110" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 110 L 400 110" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 110 L 571.88 113.5 L 573.63 110 L 571.88 106.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 130 L 343 130" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 130 L 571.88 133.5 L 573.63 130 L 571.88 126.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="340" cy="130" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="0" y="160" width="120" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="2" y="174" fill="rgb(0, 0, 0)">Data Integrity</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="0" y="40" width="120" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="2" y="54" fill="rgb(0, 0, 0)">File Integrity</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="200" width="100" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="214" fill="rgb(0, 0, 0)">fdatasync()</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 210 L 343 210" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 210 L 571.88 213.5 L 573.63 210 L 571.88 206.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="340" cy="210" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 189.5 L 223 189.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="190" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 190 L 400 190" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 190 L 400 190" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 190 L 571.88 193.5 L 573.63 190 L 571.88 186.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="300" width="130" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="314" fill="rgb(0, 0, 0)">fsync()</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="0" y="280" width="120" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="2" y="294" fill="rgb(0, 0, 0)">macOS Only</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="320" width="100" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="334" fill="rgb(0, 0, 0)">fcntl(F_FULLSYNC)</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="360" width="150" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="374" fill="rgb(0, 0, 0)">F_NOCACHE + O_DSYNC</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 330 L 343 330" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 330 L 571.88 333.5 L 573.63 330 L 571.88 326.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="340" cy="330" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 369.5 L 223 369.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="370" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 370 L 400 370" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 453.63 370 L 400 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 458.88 370 L 451.88 373.5 L 453.63 370 L 451.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 453.63 309.97 L 343 309.51" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 458.88 310 L 451.87 313.47 L 453.63 309.97 L 451.9 306.47 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="340" cy="309.5" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="220" width="140" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="234" fill="rgb(0, 0, 0)">sync_file_range (btrfs,zfs)</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="240" width="140" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="254" fill="rgb(0, 0, 0)">sync_file_range (ext4,xfs)</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 453.63 230 L 343 230" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 458.88 230 L 451.88 233.5 L 453.63 230 L 451.88 226.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="340" cy="230" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 250 L 343 250" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 250 L 571.88 253.5 L 573.63 250 L 571.88 246.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="340" cy="250" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="0" y="400" width="120" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="2" y="414" fill="rgb(0, 0, 0)">Windows Only</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="420" width="130" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="434" fill="rgb(0, 0, 0)">NO_BUFFERING</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 429.5 L 223 429.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="430" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 430 L 400 430" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 453.63 430 L 400 430" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 458.88 430 L 451.88 433.5 L 453.63 430 L 451.88 426.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="460" width="130" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="474" fill="rgb(0, 0, 0)">FlushFileBuffers</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 572.63 470 L 342 470" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 577.88 470 L 570.88 473.5 L 572.63 470 L 570.88 466.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="339" cy="470" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 640 30 L 0 30" fill="none" stroke="#cccccc" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 640 150 L 0 150" fill="none" stroke="#cccccc" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 640 270 L 0 270" fill="none" stroke="#cccccc" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 640 390 L 0 390" fill="none" stroke="#cccccc" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 640 490 L 0 490" fill="none" stroke="#cccccc" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="340" width="140" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="354" fill="rgb(0, 0, 0)">F_NOCACHE + O_SYNC</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 349.5 L 223 349.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="350" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 350 L 400 350" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 453.63 350 L 400 350" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 458.88 350 L 451.88 353.5 L 453.63 350 L 451.88 346.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<rect x="20" y="440" width="130" height="20" fill="none" stroke="none"></rect> | |
</g> | |
<g> | |
<g transform="translate(-0.5 -0.5)"> | |
<switch> | |
<text x="22" y="454" fill="rgb(0, 0, 0)">+ WRITE_THROUGH</text> | |
</switch> | |
</g> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 449.5 L 223 449.98" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<ellipse cx="220" cy="450" rx="3" ry="3" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)"></ellipse> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 280 450 L 400 450" fill="none" stroke="rgb(0, 0, 0)" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="2 6"></path> | |
</g> | |
</g> | |
<g> | |
<g> | |
<path d="M 573.63 450 L 400 450" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
<path d="M 578.88 450 L 571.88 453.5 L 573.63 450 L 571.88 446.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10"></path> | |
</g> | |
</g> | |
</g> | |
</g> | |
</g> | |
<switch> | |
<g></g> | |
<a transform="translate(0,-5)" xlink:href="https://www.drawio.com/doc/faq/svg-export-text-problems"> | |
<text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text> | |
</a> | |
</switch> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment