บทเรียนที่ 1asynchronous และ batched I/O: ใช้ io_uring, liburing, AIO, และ batching write เพื่อลด blockingเรียนรู้การลด blocking โดยส่ง asynchronous และ batched I/O ครอบคลุม io_uring, liburing, POSIX AIO, batching write และวิธีปรับเปลี่ยน call path เพื่อให้ thread ทำงานต่อเนื่องขณะรอ I/O เสร็จสิ้นในพื้นหลัง
ออกแบบ I/O call pattern แบบ non-blockingใช้ io_uring และ liburing submission queueรวม small write เป็น segment ใหญ่จัดการ completion event และ error pathเปรียบเทียบ io_uring กับ legacy AIO APIบทเรียนที่ 2queue depth และ client-side throttling: จำกัด outstanding request, token bucket, และ backpressure mechanismเข้าใจว่า queue depth และ client throttling กำหนด latency และ throughput อย่างไร ส่วนนี้ครอบคลุม safe limit, token bucket design, backpressure signal และวิธีหลีกเลี่ยง overload collapse ใน shared storage system
เลือก safe queue_depth สำหรับแต่ละประเภทอุปกรณ์implement token bucket rate limiterออกแบบ backpressure signal ให้ callerประสาน limit ข้าม client หลายตัวmonitor tail latency ภายใต้ throttlingบทเรียนที่ 3ปรับแต่ง I/O scheduler และ block layer: เปลี่ยน scheduler, elevator tuning, กำหนด queue_depth ที่เหมาะสม, blk-mq และ multiqueue settingปรับแต่ง block layer และ I/O scheduler ให้ตรงกับ workload คุณจะเรียนรู้การเลือก scheduler, ปรับ queue_depth, กำหนดค่า blk-mq multiqueue และตรวจสอบการปรับปรุงด้วย benchmark ที่สมจริง
เปรียบเทียบ mq-deadline, none, และ BFQ schedulerกำหนด queue_depth สำหรับ SSD และ HDDกำหนดค่า blk-mq multiqueue parameterแยก noisy neighbor ที่ block layerbenchmark การเปลี่ยน scheduler อย่างปลอดภัยบทเรียนที่ 4การใช้ SSD เฉพาะทางเทียบกับ HDD และเข้าใจ alignment, overprovisioning, และพฤติกรรม TRIM/reclaimเข้าใจเมื่อใดควรใช้ SSD เทียบกับ HDD และวิธีติดตั้งอย่างถูกต้อง หัวข้อรวมถึง alignment, overprovisioning, พฤติกรรม TRIM และ reclaim และการออกแบบ mixed-tier สำหรับประสิทธิภาพที่คุ้มค่า
เลือก SSD หรือ HDD สำหรับ workload แต่ละประเภทรับประกัน partition และ filesystem alignmentวางแผน SSD overprovisioning capacityกำหนดค่า TRIM, discard, และ reclaim อย่างปลอดภัยออกแบบ hybrid SSD–HDD storage tierบทเรียนที่ 5กลยุทธ์ caching และ buffering: application-level cache (LRU), Linux page cache tuning, ใช้ tmpfs, และ write-back เทียบ write-throughเข้าใจกลยุทธ์ caching และ buffering จาก application ถึง kernel ส่วนนี้อธิบาย LRU cache, Linux page cache tuning, การใช้ tmpfs และข้อแลกเปลี่ยนระหว่าง write-back และ write-through สำหรับความทนทานและ latency
ออกแบบ application LRU cache ที่มีประสิทธิภาพปรับแต่ง Linux page cache และ dirty ratioเมื่อใดควรใช้ tmpfs สำหรับ transient hot dataข้อแลกเปลี่ยน write-back เทียบ write-throughหลีกเลี่ยง double caching ข้ามชั้นบทเรียนที่ 6การเปลี่ยนแปลง storage layout: แยก hot data, cold data, และ log ไปยังอุปกรณ์หรือ partition ต่างหากเรียนรู้การแยก hot, cold, และ log data ข้ามอุปกรณ์หรือ partition ครอบคลุม workload analysis, layout pattern, migration strategy และวิธีวัด latency, throughput, และการปรับปรุง contention หลังเปลี่ยนแปลง
ระบุ hot เทียบ cold data จาก workload traceวาง log บนอุปกรณ์ low-latency เฉพาะทางแยก random และ sequential I/O workloadpartitioning scheme สำหรับ mixed media arrayวัดผลกำไรจากการ reorganize layoutบทเรียนที่ 7การควบคุม concurrency และ I/O pattern: batching small write, coalescing fsync, group commit, และ non-blocking design patternเรียนรู้รูปแบบ concurrency ส่งผลต่อ storage behavior อย่างไร ครอบคลุม batching small write, coalescing fsync, group commit และ non-blocking design pattern ที่ลด contention และปรับปรุง throughput
รวม tiny write เป็น aligned blockรวม fsync call ข้าม sessionimplement group commit ใน log systemevent-driven non-blocking server designหลีกเลี่ยง thundering herd บน shared fileบทเรียนที่ 8ข้อแลกเปลี่ยนความน่าเชื่อถือ: ความเสี่ยงข้อมูลสูญหายกับ async/disabled barrier, cache consistency กับ NAS, และทดสอบ durability guaranteeวิเคราะห์ข้อแลกเปลี่ยนความน่าเชื่อถือจาก IO tuning ที่ก้าวร้าว คุณจะเรียนรู้ความเสี่ยงของ async barrier, cache inconsistency กับ NAS, วิธีทดสอบ durability guarantee และการบันทึก failure mode ที่รองรับ
ความเสี่ยงการปิด barrier และ write cacheNAS cache consistency และ stale readออกแบบ durability และ crash testบันทึก data loss scenario ที่รองรับสมดุล SLA ระหว่าง latency และความปลอดภัยบทเรียนที่ 9การปรับแต่ง network storage: mount option สำหรับ NFS (async/sync, rsize/wsize, noac, actimeo), TCP tuning และ jumbo frame, และ multipathปรับแต่ง networked storage stack เช่น NFS และ iSCSI ส่วนนี้ครอบคลุม NFS mount option, TCP tuning, jumbo frame และ multipath เพื่อปรับปรุง throughput, latency และความยืดหยุ่นต่อ link failure
เลือก NFS async, sync, และ commit modeปรับ rsize, wsize, และ attribute cachingกำหนดค่า TCP buffer และ congestion controlใช้ jumbo frame อย่างปลอดภัยใน storage networkออกแบบ multipath และ failover policyบทเรียนที่ 10ปรับแต่ง filesystem และ mount option: noatime, nodiratime, barrier/discard, inode allocation และ journaling settingสำรวจ filesystem และ mount option สำคัญที่ส่งผลต่อ IO latency คุณจะเรียนรู้เมื่อใดควรใช้ noatime, barrier, discard และ journaling mode บวก inode allocation และ directory option ส่งผลต่อ metadata overhead
ผลกระทบของ atime, noatime, และ relatime modejournaling mode และ barrier configurationใช้ discard และ background TRIM อย่างปลอดภัยinode density และ directory layout choiceper-mount option สำหรับ latency-sensitive path