Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Doesn't a hard drive use its cache with high utilization? I see up to 20MB/s difference on file writes when I disable windows disk write cache. Does anybody know why cache size matters this much?

share|improve this question
1  
The system sometimes needs space larger then 8MB. What is the reason you want to know why this matters? –  Ramhound Dec 30 '11 at 17:02

1 Answer 1

up vote 9 down vote accepted

On a healthy Linux system, I see about half the RAM used by disk cache and buffers. That's several orders of magnitude higher than the amount of cache in hard disks. Furthermore, access to RAM is faster than access to disk cache. Furthermore, the OS has information on what each disk sector is used for and can fine-tune its caching strategy (e.g. weigh certain files or directories as more likely to be needed again and keep them in cache longer). The in-disk disk cache isn't nearly as important for performance as the OS disk cache; it's mostly useful when the OS needs to write a large burst of data (the OS writes to the disk cache quickly, and the disk takes its time flushing the data to the actual permanent storage).

share|improve this answer
2  
+1 Disk cache allows a tiny but immediate gain in performance, OS-cache allows a longer term ongoing gain in performance due to decreased need to go to the disk. 8MB is a drop in the ocean compared to the amount of data that is written or read during normal system use. –  Mokubai Dec 30 '11 at 20:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.