Jump to content
RESET Forums (homeservershow.com)

Caching vs buffering - what's the difference?


dvn
 Share

Recommended Posts

I'd like to achieve a better understanding of caching and buffering, and the differences between them. I've always used these terms interchangeably but a recent post made me re-evaluate my understanding. So I did some more reading, but I still don't feel I have a full understanding of these concepts. I'll lay out what I think I know in hopes of generating a discussion and hopefully bring some more preciseness to this topic. OK, here I go:

 

Cache memory is used for storing instructions or data which are frequently used and re-used. Since we use these things so frequently, it makes sense to load them into memory where it can be quickly accessed. This cuts down disk I/O which is the slowest thing in a computer system, and results in an overall speed and performance boost. Networks may also cache IP addresses in order to cut down on queries of frequently used IP's. Those are just two examples of caching.

 

Buffer memory is used for queuing data so an application won't have to wait for input. A good example would be a video streaming app which typically buffers the video input. Ideally, this buffering will prevent stuttering by keeping ahead of the demand for it. Netflix, for example, evaluates your bandwidth's down speed, then calculates the amount of buffered video needed to maintain a nice smooth viewing experience. (Bit rate may be adjusted as well, but that's not relevant to the cache v. buffer comparison.)

 

Contrary to cached data, buffered data is not intended for reuse. It gets buffered, used, and dumped or over-written.

Ok, that's my understanding. But as I continue to read other posts, I suspect I do not have a truly solid grasp of this. So feel free to jump in and verify or clarify any of what I've written.

Link to comment
Share on other sites

Cache is a storage area dedicated to fast access for commonly used instructions. Typically used to increase the speed of a computer by reducing read and write times when processing instructions.

 

Buffering is the process of accumulating data so it can be processed at smooth steady rate. In the case of buffering streaming video from the internet, the packets of data travel through the WWW using varying paths. When this happens you can get large chunks of data that arrives at one time and then there will be slow down in the data stream due to internet traffic.

 

Maybe the easiest analogy is this:

 

Cache is use for speed by allowing the CPU to execute instructions faster

Buffering is used for smoothing out the data so it is processed at a specific rate.

  • Like 1
Link to comment
Share on other sites

Ok, thanks. I understand that.

 

Cache - CPU/instructions/speeds up processing

 

Buffer - app/data/keeps up with rate of processing

 

When people speak about a video problem, and say they don't know if there is a cache or buffer problem, I do understand the need for video buffering. What I guess I hadn't thought about is caching as it relates to video. So there are video instructions that would benefit from caching? That would make sense.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...