Quote:
Originally Posted by sluge
vmstat shows statistics about cache and buffers, but where the difference between them?
|
I'm not sure. I wouldn't answer at all if you hadn't already gotten two really terrible answers.
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.