What is a hard disk buffer and why is it needed? Algorithm of operation of hard disk cache Cache memory buffer memory

Normal operation operating system and fast operation of programs on a computer are ensured by RAM. Every user knows that the number of tasks that a PC can perform simultaneously depends on its volume. Some computer components are also equipped with similar memory, only in smaller quantities. This article will focus on cache memory. hard drive.

Cache memory (or buffer memory, buffer) is an area where data is stored that has already been read from the hard drive, but has not yet been transferred for further processing. The information that Windows uses most often is stored there. The need for this storage arose due to the large difference between the speed of reading data from the drive and throughput systems. Other computer elements also have a similar buffer: processors, video cards, network cards and etc.

Cache volumes

Of no small importance when choosing HDD has a buffer memory capacity. Typically these devices are equipped with 8, 16, 32 and 64 MB, but there are 128 and 256 MB buffers. The cache gets overloaded quite often and needs to be cleared, so in this regard, more is always better.

Modern HDDs are mainly equipped with 32 and 64 MB cache memory (smaller volumes are already rare). Usually this is enough, especially since the system has its own memory, which, together with RAM, speeds up the operation of the hard drive. True, when choosing a hard drive, not everyone pays attention to the device with the largest buffer size, since the price for such ones is high, and this parameter is not the only determining one.

The main task of cache memory

The cache is used to write and read data, but, as already mentioned, this is not the main factor in effective work hard disk. It is also important here how the process of exchanging information with the buffer is organized, as well as how well the technologies that prevent errors from occurring work.

Buffer storage contains data that is used most frequently. They are loaded directly from the cache, so performance increases several times. The point is that there is no need for physical reading, which involves directly accessing the hard drive and its sectors. This process is too long, as it is calculated in milliseconds, while data is transferred from the buffer many times faster.

Benefits of cache memory

A cache is about fast data processing, but it has other benefits as well. Hard drives with large storage can significantly unload the processor, which leads to its minimal use.

Buffer memory is a kind of accelerator that ensures fast and efficient operation of the HDD. It has a positive effect on software startup when it comes to frequent access to the same data, the size of which does not exceed the buffer size. For work, 32 and 64 MB are more than enough for an ordinary user. Further, this characteristic begins to lose its significance, since when interacting with large files this difference is insignificant, and who would want to overpay for a larger cache.

Find out the cache size

If the size of the hard drive is a value that is easy to find out, then the situation with buffer memory is different. Not every user is interested in this characteristic, but if such a desire arises, it is usually indicated on the packaging with the device. Otherwise, you can find this information on the Internet or use free program HD Tune.

A utility designed to work with HDDs and SSDs, it performs reliable data deletion, assesses device status, scans for errors, and also provides detailed information about the characteristics of the hard drive.


In this article, we explained what buffer memory is, what tasks it performs, what its advantages are, and how to find out its capacity on a hard drive. We found out that it is important, but is not the main criterion for choosing a hard disk, and this is a positive thing, given the high cost of devices equipped with a large amount of cache memory.

RAM ensures normal functioning personal computer, as well as fast execution of programs and tasks. Its volume determines how many tasks a user can simultaneously perform on his computer. There are some elements in the computer that are also equipped with memory. Let's look at what buffer (or cache) memory is, what its tasks are, its advantages, and how to calculate the required volume.

Cache memory is an area for temporary storage of data. Information that has been read from the hard drive but has not yet been transferred for further processing is stored here. The need for such storage arose as a result of the discovery of a large difference between the period of time over which data is read and the throughput of the system.

Other PC elements also have some kind of buffer. For example, a printer that can move on to the next task, but still print the material that was previously specified. Video cards, network cards, etc. also have buffer memory.

The main technical properties of a cache are its capacity and performance. Modern devices in such time characteristics, as well as buffer volume, differ significantly from each other. The larger the cache memory, the more information it holds. This means that the computer can produce results without accessing the hard drive often.

Thus, the system performance itself increases, and indirectly extends the life of the hard drive. The latter depends directly on the user and how and for what he uses the hard drive. For example, a hard drive will last longer if you watch movies in a browser, rather than downloading via torrent and opening with a video player.

Cache volumes

When choosing a personal computer, it is important to pay attention to such an indicator as the amount of buffer memory. Since it periodically needs to be rebooted and cleared, the larger the cache, the better. Modern PAs are equipped with 8, 16, 32 and 64 MB, but the buffers have a capacity of 128 and 256 MB.

Although modern laptops and computers are most often equipped with a large cache memory, smaller ones are already a rarity. When choosing a device, users rarely pay attention to this indicator, since it does not directly depend on the price. And also the parameter is not key when choosing a computer. Here you need to pay attention to other indicators, since usually the system’s own memory is quite enough to perform operations.

Cache types

Buffer memory that is located in one fixed location is called a direct-mapped cache. If it is located anywhere, then it is called fully associative memory. In this case, the buffer volume is completely used, the data can be deleted after it is completely filled, but searching for information is quite difficult.

A compromise option could be a multiple or partially associative cache. IN in this case Buffer lines are combined into groups. In this case, a block that corresponds to a specific group can be placed in any line, and the corresponding value is placed in the tag. There is a kind of associativity principle at work here, but a certain block only falls into one group or another. This is somewhat similar to a direct mapping buffer.

The multiple associative type of buffer memory on disk is the most common, as it has high speed and good memory utilization. But at the same time, the direct mapping cache, which is cheap and simple, is only slightly inferior in its characteristics.

the main task

Buffer memory is designed for temporary storage and reading of information. But this indicator is not the main one when determining the efficiency of a hard drive. Also important is the algorithm for exchanging data with the buffer, as well as how well the work is done to prevent errors.

Buffer storage contains information that is used most often. At the same time, performance increases several times, since it is loaded directly from the cache. There is no direct access to the hard drive and its sectors, since there is no need for physical reading. This process is quite long, although it is measured in milliseconds, but data from the buffer can be obtained many times faster.

Advantages

Although the main advantage of buffer memory is fast data processing, there are other advantages. A hard drive with a large buffer can relieve the processor or use it minimally. This way, the computer will not be overloaded and will last longer.

The cache is also a kind of accelerator, ensuring efficient and fast operation of the entire system. This reduces startup time software, when data already contained in the cache is required.

For the average user, 32 or 64 MB is enough for work. A larger size loses its significance, since when interacting with large files, this difference is negligible. In addition, it is unlikely that anyone will want to overpay for a larger buffer.

How to find out the amount of buffer memory on your hard drive?

Not every user is interested in such a characteristic as cache size (as opposed to hard drive size). The information is usually contained on the packaging of the device. You can also find data online or use HD Tune, which is free.

It is designed to securely delete data, assess the state of the device, and scan and fix errors in the system. Additionally, you can use it to obtain information about the hard drive.

To find out the amount of buffer memory in MB, you need to download the HD Tune utility and run it. Next, in the “Information” tab, you need to find a line called “buffer”, which will show how large the cache is installed in this device.

Experts note that for regular user A PC size of 128 MB is suitable. If the computer is used primarily for games, you should focus on a larger cache size.

If you want to know what hard drive cache is and how it works, this article is for you. You will learn what it is, what functions it performs and how it affects the operation of the device, as well as the advantages and disadvantages of the cache.

Understanding Hard Drive Cache

The hard drive itself is a rather leisurely device. Compared to RAM, HDD works several orders of magnitude slower. This also causes a drop in computer performance when there is a shortage random access memory, since the shortage is compensated hard drive.

So, hard drive cache is a kind of RAM. It is built into the hard drive and serves as a buffer for reading information and its subsequent transfer to the system, and also contains the most frequently used data.

Let's look at why hard drive cache is needed.

As noted above, reading information from a hard drive occurs very slowly, since moving the head and finding the required sector takes a lot of time.

It is necessary to clarify that by “slowly” we mean milliseconds. And for modern technologies A millisecond is a lot.

Therefore, just like the hard drive cache, it stores data physically read from the disk surface, and also reads and stores sectors that are likely to be requested later.

This reduces the number of physical accesses to the drive while increasing performance. The hard drive can work even if the host bus is not free. The transfer speed can increase hundreds of times for similar requests.

How does hard drive cache work?

Let's look at this in more detail. You already have a rough idea of ​​what the hard drive cache is intended for. Now let's find out how it works.

Let's imagine that the hard drive receives a request to read 512 KB of information from one block. The necessary information is taken from the disk and transferred to the cache, but along with the requested data, several neighboring blocks are also read. This is called prefetching. When a new request for a disk arrives, the drive microcontroller first checks for the presence of this information in the cache and if it finds it, it instantly transmits it to the system without accessing the physical surface.

Since cache memory is limited, the oldest blocks of information are replaced with new ones. This is a circular cache or circular buffer.

Methods for increasing hard drive speed using buffer memory

  • Adaptive segmentation. The cache memory consists of segments with equal amounts of memory. Since the sizes of the requested information cannot always be the same size, many cache segments will be irrationally used. Therefore, manufacturers began to make cache memory with the ability to change the size of segments and their number.
  • Prefetch. The hard drive processor analyzes the previously requested and currently requested data. Based on the analysis, it transfers information from the physical surface that is more likely to be requested at the next point in time.
  • User control. More advanced models hard drives allow the user to control the operations performed in the cache. For example: disabling the cache, setting the size of the segments, toggling the adaptive segmentation feature, or disabling prefetching.

Which gives the device more cache memory

Now we’ll find out what capacities are equipped and what the cache memory in the hard drive provides.

Most often you can find hard drives with a cache size of 32 and 64 MB. But there were also 8 and 16 MB left. Recently, they began to produce only 32 and 64 MB. A significant breakthrough in performance occurred when 16 MB began to be used instead of 8 MB. And between caches of 16 and 32 MB, there is no longer any significant difference, as well as between 32 and 64.

The average computer user will not notice a difference in the performance of hard drives with a 32 and 64 MB cache. But it is worth noting that the cache memory periodically experiences significant loads, so it is better to purchase a hard drive with a higher cache capacity if you have the financial opportunity.

Main advantages of cache memory

Cache memory has many advantages. We will consider only the main ones:


Disadvantages of cache memory

  1. The speed of the hard drive does not increase if the data is written randomly on the disks. This makes it impossible to prefetch information. This problem can be partially avoided if you defragment it periodically.
  2. The buffer is useless when reading files larger than can fit in the cache memory. So, when accessing a file of 100 MB in size, a 64 MB cache will be useless.

Additional Information

You now know the hard drive and what it affects. What else do you need to know? Currently, there is a new type of drive - SSD (solid state). Instead of disk platters, they use synchronous memory, like flash drives. Such drives are tens of times faster than conventional hard drives, so having a cache is useless. But such drives also have their drawbacks. Firstly, the price of such devices increases in proportion to the volume. Secondly, they have a limited cycle time for rewriting memory cells.

There are also hybrid drives: a solid-state drive with a regular hard drive. The advantage is the ratio of high operating speed and large volume of stored information with a relatively low cost.

Published by the hard drive.

We also did not ignore the HDD interface, where the main features and differences were discussed SATA interface and outdated IDE. And of course we didn’t forget, perhaps the most main characteristic- This hard drive capacity.

In this material we will talk about the remaining characteristics of hard drives, which are no less important than the above.

Hard drive form factor

On this moment, two form factors of hard drives are widely used - 2.5 and 3.5 inches. The form factor largely determines the dimensions of hard drives. By the way, a 3.5” hard drive can accommodate up to 5 drive platters, and a 2.5” hard drive can accommodate up to 3 platters. But in modern realities this is not an advantage, since the developers have determined for themselves that installing more than 2 plates in ordinary high-performance hard disks– not advisable. Although, the 3.5” form factor does not intend to give up at all and, in terms of demand, confidently outweighs 2.5” in the desktop segment.


That is, for a desktop system, for now it makes sense to purchase only 3.5”, since among the advantages of this form factor, one can note a lower cost per gigabyte of space, with a larger volume. This is achieved due to a larger platter, which, with the same recording density, can accommodate a larger volume of data than 2.5”. Traditionally, 2.5” has always been positioned as a form factor for laptops, largely due to its dimensions.

There are other form factors. For example, many portable devices use 1.8” form factor hard drives, but we will not dwell on them in detail.

Hard drive cache size

Cache memory is a specialized RAM that acts as an intermediate link (buffer) for storing data that has already been read from the hard drive, but has not yet been transferred directly for processing. The very presence of the buffer was caused by a significant difference in operating speed between the rest of the system components and the hard drive.

As such, a characteristic of HDD cache memory is volume. At the moment, the most popular hard drives are those with 32 and 64 MB buffers. In fact, buying a hard drive with a large amount of cache memory will not double the performance as it might seem based on classical arithmetic. Moreover, testing has shown that the advantage of hard drives with a 64 MB cache manifests itself quite rarely and only when performing specific tasks. Therefore, if possible, it is worth purchasing a hard drive with a larger cache memory, but if this comes at a significant cost to the price tag, then this is not the parameter that you should focus on first.

Random access time

The hard drive random access time indicator characterizes the time during which the hard drive is guaranteed to perform a read operation anywhere on the hard drive. That is, in what period of time will the reading head be able to reach the most distant hard sector disk. This largely depends on the previously discussed characteristics of the spindle speed of the hard drive. After all, the higher the rotation speed, the faster the head can reach the desired track. In modern hard drives this figure ranges from 2 to 16 ms.

Other HDD characteristics

Now let’s briefly and briefly list the remaining characteristics of hard drives:

  • Energy consumption – hard drives consume very little. Moreover, the maximum power consumption is often indicated, which occurs only at intermediate stages of operation during peak load. On average it is 1.5-4.5 W;
  • Reliability (MTBF) – the so-called time between failures;
  • Data transfer speed – from the external zone of the disk: from 60 to 114 Mb/s, and from the internal zone – from 44.2 to 75 Mb/s;
  • Number of input/output operations per second (IOPS) – for modern hard drives this figure is about 50/100 op/s, with random and sequential access.


So we looked at all the characteristics of hard drives using a small series of articles. Naturally, many parameters intersect and, to some extent, influence each other. But, on the basis of information regarding all these parameters, you can model a future device for yourself, and when choosing, clearly understand which model should be given preference in your particular case.


But such toys can come from old hard disks, or rather from the components of a hard disk. For example, the wheels are made from a spindle motor of a hard drive, which drives an axle with a readout head.

Rating 4.9 out of 5. Votes: 379. Category Select computer equipment

The hard drive (hard drive, HDD) is one of the very important parts of the computer. After all, if the processor, video card, etc. breaks down. You only regret losing money for new purchase, if your hard drive breaks down, you risk losing irretrievably important data. The speed of the computer as a whole also depends on the hard drive. Let's figure it out how to choose the right hard drive.

Hard drive tasks

Task hard drive inside the computer - save and display information very quickly. The hard drive is an amazing invention of the computer industry. Using the laws of physics, this small device stores an almost unlimited amount of information.

Hard drive type

IDE - obsolete hard drives are used for connecting to old motherboards.

SATA - replaced hard disks IDEs have higher data transfer rates.

SATA interfaces are different models, they also differ from each other in the speed of data exchange and support for different technologies:

  • SATA has a transfer speed of up to 150Mb/s.
  • SATA II - has a transfer speed of up to 300Mb/s
  • SATA III - has a transfer speed of up to 600Mb/s

SATA-3 began to be produced not long ago, from the beginning of 2010. When purchasing such a hard drive, you need to pay attention to the year of manufacture of your computer (without an upgrade); if it is lower than this date, then this hard drive will not suit you! HDD - SATA, SATA 2 have the same connection connectors and are compatible with each other.

Hard disk capacity

The most common hard drives used by most users at home have a capacity of 250, 320, 500 gigabytes. There are even fewer, but 120, 80 gigabytes are becoming increasingly rare, and they are no longer on sale at all. To be able to store very large amounts of information, there are 1, 2, and 4 terabyte hard drives.

Hard drive speed and cache

When choosing a hard drive, it is important to pay attention to its operating speed (spindle speed). The speed of the entire computer will depend on this. Common disc speeds are 5400 and 7200 rpm.

Buffer memory volume (cache memory) - physical memory hard drive. There are several sizes of such memory: 8, 16, 32, 64 megabytes. The higher the speed of RAM hard drive, the faster the data transfer speed will be.

In custody

Before purchasing, check which one is suitable for your motherboard: IDE, SATA or SATA 3. We look at the characteristics of the disk rotation speed and the amount of buffer memory, these are the main indicators that you need to pay attention to. We also look at the manufacturer and the volume that suits you.

We wish you happy shopping!

Share your choice in the comments, this will help other users make the right choice!