Difference between cache and buffers
Hello!
vmstat shows statistics about cache and buffers, but where the difference between them? |
I think the buffers are in cache (ram) the buffer may have a size (rhetrofit/back(ward) tech/compatibility),
but the cpu may not need the buffer set aside for it(the data in cache) if the cpu/ram/HDD/Inet is fast enough. Streaming instead of buffering, but buffering anyway in case (may cause double handling, busy cpu, no room for sheduled tasks (?)). Internet speeds are quite fast (not fast like South Korea,) and in most instances the bandwidth is sufficeint to deliver the goods on time. You need a bandwith tester for your graphics and other gaming devices, like sound. No good if the picture is perfect but there is a delay with key-presses, and/or sound delays. Can't remember why I started this post, Happy Friday to you all. Cheers Glenn |
|
Quote:
I think the difference arises because of the fact that the OS works in 4KB chunks, but files are not necessarily aligned on 4KB boundaries on the media. I think cache holds chunks of file that are 4KB aligned within the file, while buffers hold chunks of the filesystem that are 4KB aligned in the filesystem, but not in a specific file. 1) I might be totally wrong. I never looked at the relevant code. I'm repeating/simplifying plausible info that I read elsewhere. 2) The 4KB number is an x86 standard, not a Linux standard. It may be some other value for Linux on some other architecture. |
Quote:
|
Quote:
Quote:
I didn't say wiki was terrible. I'm not very impressed with those two articles, but that is irrelevant. If those two articles were great descriptions of the generic computer terms "buffer" and "cache", that still wouldn't change the fact that linking to generic info (containing no Linux specifics) is a terrible answer for a question that is very specific to Linux. If you thought the difference between "buffer" and "cache" in some generic context was relevant to the difference between "buffer" and "cache" in Linux, you were mistaken. |
All times are GMT -5. The time now is 09:00 AM. |