Buffer memory mb. What is a hard disk buffer and why is it needed

It is known that hard drives are equipped with their own buffer memory of a relatively small amount. The buffer is used as a built-in cache for read and write operations, optimizing performance and minimizing time-consuming platter accesses. For example, when there is free space in the buffer, the controller can temporarily place data that needs to be written there and wait for a convenient moment when there are no requests from the system (host). When making read requests, the controller stores the last read data in case the host requests it again - then there is no need to access the disk again. The controller often reads ahead in an attempt to predict the host's next requests, and buffers the data it reads as well. It turns out that the buffer is used by the hard disk all the time, and its role is very important.

Manufacturers hard drives always sought to increase the amount of buffer memory. Today, this is easier to do, since conventional synchronous dynamic memory (SDRAM) chips, and they are used in hard drives, are quite inexpensive. In the late 90s, desktop hard drives were equipped with a 512 KB buffer, then most models received 2 MB of memory, and today hard drives with an 8 MB buffer are most common. However, there is no limit to perfection: WD has updated its mass-produced line of Caviar SE hard drives, supplementing it with Caviar SE16 models. Their main difference, as you may have guessed, is the doubled amount of buffer memory.

Why do we need 16 MB?

It would seem that the larger the amount of buffer memory, the higher the performance will be. hard drive. The controller will be able to buffer more data, which means it will access magnetic platters less often. However, not everything is as simple as it seems at first glance.

Caching algorithms typically use an associative lookup technique to determine if the required data is in the buffer. To increase the amount of data stored in the cache, either increase the size of one block (cache line) or increase the number of lines. And this is fraught with the appearance of additional problems with associative search and data exchange with the cache.

However, for a hard drive, the caching speed is not so important, since in any case it is negligible compared to the delays when accessing a magnetic media. Another thing is whether the controller really needs additional memory. It is quite possible that HDD not so busy with work to fully use the entire available buffer space. For example, when simply copying and downloading programs, nothing needs to be cached, since the data is read only once. But when working in a server environment, when requests are received chaotically and continuously, a large buffer is a significant plus for a hard drive. Actually, that's why server hard drives were always equipped with a buffer of at least 8 MB. But on a desktop, read and access speed is more important than buffering efficiency.

(True, let's not forget about NCQ technology. With its help, the hard drive can manage the queue of requests, changing the order of their service. Since the nature of access to the media also changes in this case, additional buffering can help improve performance. But alas, most users still still does not know how NCQ can be used, since support from the hard drive alone is not enough here).

It turns out that a large buffer size is unlikely to have a significant impact on the overall speed. Putting a chip with a higher capacity is not enough to improve performance. Developers should not only redesign the microcode, but also improve the read / write speed of the media and the bandwidth of the interface.

Caviar SE16. Design features

We were able to match the WD2500KS from the Caviar SE16 line with the WD2000JS from the "standard" Caviar SE line. As it turned out, they have a minimum of differences: the markings of the HDA, connectors, and electronics boards are the same. Even the microcode version is the same. Consequently, the developers at WD used the old technology, simply replacing one memory chip with another.

For those who are not aware of the features of WD hard drives, we will report the following. This manufacturer uses only proven technologies and takes special care to protect discs from damage. The design of the HDA is standard: a massive body and a flat top cover are hermetically connected, and there is an air vent on the top of the cover. But the electronics board is traditionally turned upside down by microcircuits and pressed against the case, there is a thermally conductive gasket. This technique allows you to protect the chips from overheating and external influences. There are two power connectors - a standard 4-pin and a new flat one, in accordance with the requirements of Serial ATA. To protect the Serial ATA interface connector from accidental disconnection, WD suggests using a special SecureConnect cable with latches.

The Caviar SE16 series is only available with Serial ATA support. Moreover, the hard disk controller supports the "second speed" 3 GB/s (300 MB/s). Other technologies, in particular, NCQ, have not yet been implemented - here WD lags behind other manufacturers.

Declared parameters of WD Caviar SE/SE16 hard drives

Marking

Spindle speed, rpm

Recording density, GB per platter

Cache buffer size, MB

Bearings

Interface

NCQ Support

Capacity range

120, 160, 200, 250

Int. data exchange speed, Mbit/s

Average access speed: average, ms

- by maximum radius, ms

- transition between tracks, ms

-write access speed, ms

Impact resistance (offline), G

Impact resistance (online), G

Noise level at idle, dB

Noise level during positioning, dB

The capacity range of Caviar SE16 hard drives is still small. On the WD website, we managed to find data on the 250 GB model, plus a 400 GB model has recently appeared. The manufacturer does not report the exact recording density and capacity of one platter, but, according to available data, 100 GB platters are used in the current series of hard drives. Today this is a modest result, however, WD practices the modernization of the line without changing the names and specifications, so it may well turn out that discs with more capacious platters are already on sale.

Testing

Hard drives from three manufacturers took part in testing - WD, Seagate and Samsung. At the time of writing, it was their products that were presented in a wide range. Instance considered in hard disk series Caviar SE16 had the following parameters:

  • marking WD2500KS-00MJB0;
  • volume 250 GB;
  • microcode version 02.01C03;
  • quiet positioning mode (AAM) disabled (0FEh).

We will compare the following hard drives with it:

  • Caviar SE, from the line with 8 MB buffer, 200 GB capacity:
    • marking: WD2000JS-00MHB0;
    • buffer size - 8 MB;
    • interface - Serial ATA 3 Gbit/s, NCQ is not supported;
    • microcode version - 02.01C03 (same);
    • quiet positioning mode (AAM) disabled (0FEh).
  • Samsung SpinPoint P120, 200 GB:
    • marking SP2004C;
    • buffer size - 8 MB;
    • interface – Serial ATA 3 Gbit/s, NCQ supported;
    • microcode version - VM100-33;
    • silent positioning mode enabled (code 00h).
  • Seagate Barracuda 7200.8, 200 GB:
    • marking ST3200826AS;
    • buffer size - 8 MB;
    • interface – Serial ATA 1.5 Gbit/s, NCQ supported;
    • microcode version - 3.03;
    • silent positioning mode disabled (control not available).

Seagate and Samsung hard drives have higher storage density than WD Caviar. In addition, Seagate has a higher positioning speed (8ms versus 8.9ms for Samsung and WD), and Samsung is quieter. That is, WD formally has no advantages over drives from other manufacturers. But in practice it can be the other way around.

The hard drives were connected to the second port of the Serial ATA controller built into the ICH5 south hub of the Intel 865G chipset. Unfortunately, the 865 series chipsets do not support 3 Gb/s and NCQ technology, so the capabilities of modern hard drives cannot be fully revealed. Other test configuration options:

  • host hard drive from which the OS was loaded and tests were launched - Seagate Barracuda 7200.7 PATA 80 GB;
  • processor Intel Pentium 4 2.80 (bus 800 MHz);
  • motherboard Intel D865GBF (Intel 865G);
  • 2 x 256 DDR400 memory, dual-channel enabled;
  • video card GeForce FX 5600;
  • the hard drives were installed in a 2.5-inch basket of the Inwin J551 case, no special cooling was used.

Low Level Tests

The use of programs that work directly with the disk allows you to measure the theoretical parameters of the hard drive - random access speed, average (sustained) read and write speed, delayed write efficiency. At the same time, the influence of caching algorithms is minimal, since access is carried out continuously and according to a simple scheme.

Low-level parameters were calculated using programs:

  • IOMeter 2004.07.30;
  • HDTach 2.68;
  • HDTach 3.0.1.0;
  • Winbench 2.0 (the disk was formatted as one large NTFS partition).

Access speed turned out to be higher in Caviar, since WD hard drives do not use positioning delay algorithms (AAM). Seagate, despite the excellent declared numbers, was the last one. Oddly enough, the Caviar SE16 slightly (0.3 ms) lost to its counterpart, which can be explained either by the natural difference in technological parameters (nevertheless, the mechanics have some deviations in one direction or another), or by the influence of the third plate (the greater the number of heads, the more switching delay). Of course, the differences are actually very small, and we will not talk about a serious lag in the Caviar SE16. In terms of write access speed, WD hard drives are equal, providing a twofold acceleration compared to the read access speed. This is explained by the influence of the delayed write algorithm.

By sequential read/write speeds The Caviar SE16, on the other hand, is slightly ahead of the Caviar SE. But they were overtaken by the Seagate hard drive (+10%), which is natural due to the use of a higher recording density, while Samsung, on the contrary, is just as far behind.

A more accurate analysis of the read / write speed allows you to conduct IOMeter. If other programs work with 64 KB blocks, IOMeter may vary the block size.

Seagate is the leader in reading: it copes much better (+20%) with small and large blocks. Samsung, as it turned out, does not work very well with small blocks. And WD performed well in write tests, beating Seagate when working with blocks less than 64 KB.

The Winbench'99 program, despite its venerable age, builds a sequential reading graph quite accurately.

Both WD drives have the same shape of the graph, with no peaks or dips, which indicates a high read stability. The Caviar SE16 graph is more elongated, which is due to its larger capacity. Zooming in on the graph allows us to see short-term but strong speed dips in Seagate and Samsung (work of ECC error correction algorithms, delays in switching heads and changing tracks) and the absence of such in WD. And although the recording density of WD is worse, the proven production technology has its advantages - higher stability.

Application Simulation

The Workstation template of the IOMeter test allows you to generate a load on the disk subsystem that is close to real (statistics were collected using the Winstone 2002 Content Creation test). So, this test is more sensitive to access speed than to read / write speed, plus it takes into account the work of caching algorithms, since requests arrive with an increase in the queue depth.

According to the data, both WD drives slightly outperformed Samsung and literally crushed Seagate. Caviar SE is again slightly better than Caviar SE16, as they have a slight difference in access speed.

We pinned great hopes on the PCMark05 test, since it should show the advantage of a large cache buffer. This test uses patterns written with the Intel IPEAK SPT test suite when performing specific tasks. Therefore, PCMark05 can more or less believably simulate the operation of a hard drive in real conditions.

So, if in terms of speed Windows boot XP, file copying and scanning for viruses, WD hard drives are almost the same, then in terms of application loading speed and access to data while applications are running, Caviar SE16 is 10-15% faster than Caviar SE, not to mention Samsung and Seagate.

The advantage of a hard drive big buffer noticeable in the Winstone test, especially if the FAT32 file system is used.

conclusions

The test results prove that there is a positive effect of increasing the buffer. It is small, within 10-15%, and appears only when the hard drive is operating in conditions close to real. In low-level tests, there is practically no difference, which is consistent with the theory. The same theory suggests that as the interface bandwidth and recording density increase, as well as with the introduction of disk access optimization technologies, the buffer size will have to be increased. Therefore, the developers from WD hurried a little; however, it is better to start developing the technology now than to catch up with competitors later.

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.

The concept of hard drive cache

The hard drive itself is a rather slow device. Compared to RAM, a hard drive is several orders of magnitude slower. This also causes a drop in computer performance with a lack of RAM, since the shortage is compensated by the hard drive.

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

Consider what a hard drive cache is for.

As noted above, reading information from the hard disk is very slow, since the movement of the head and finding the required sector takes a lot of time.

It should be clarified that the word "slow" refers to milliseconds. And for modern technologies, a millisecond is a lot.

Therefore, like a hard disk 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 rate can increase hundreds of times with the same type of requests.

How Hard Drive Cache Works

Let's dwell on this in more detail. You already have a rough idea of ​​what the cache memory of a hard disk 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 read at the same time. This is called prefetch. When a new disk request arrives, the drive's microcontroller first checks for this information in the cache, and if it finds it, it instantly transfers it to the system without accessing the physical surface.

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

Methods to increase the speed of the hard disk due to buffer memory

  • adaptive segmentation. The cache memory consists of segments with the same amount of memory. Since the sizes of the requested information cannot always be the same size, many cache segments will be used irrationally. 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 of hard drives allow the user to control the operations performed in the cache. For example: disable cache, set segment size, toggle adaptive segmentation, or disable prefetching.

What gives the device more cache memory

Now we will find out what volumes they equip and what gives the cache memory in the hard drive.

Most often you can find hard drives with a cache size of 32 and 64 MB. But there were also 8 and 16 MB. Recently, only 32 and 64 MB have been released. A significant breakthrough in performance occurred when 16 MB was used instead of 8 MB. And between caches of 16 and 32 MB, there is no particular difference, as well as between 32 and 64.

The average computer user will not notice the difference in performance between hard drives with a cache of 32 and 64 MB. 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 size, if there is a financial opportunity.

The main advantages of cache memory

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


Disadvantages of Cache

  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 the information. This problem can be partially avoided if you periodically defragment.
  2. The buffer is useless when reading files larger than the cache can fit. So, when accessing a 100 MB file, a 64 MB cache will be useless.

Additional Information

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

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

A hard drive (hard drive, Hard Disk Drive, HDD) is a device designed to store all information on a computer. All movies, music, photos, documents, all system files are stored on it. Therefore, to this device I have a special relationship, I always carefully monitor his condition and constantly make backups important information to me so as not to lose it. I will definitely tell you how to make backups in one of my notes.

If your computer suddenly does not turn on, do not be afraid, most likely all the information remained intact. If desired and with certain skills, all information from one hard drive can be copied to another. You can read more about this in my article on how to copy data from a hard drive or how to “clone a disk”.

So, nevertheless, let's start considering the characteristics of the hard drive.

Here are the main ones:

  • type of hard disk;
  • storage capacity;
  • disk form factor;
  • interface;
  • buffer memory size;

I have listed as many as 5 characteristics, but we will deal with them quickly, since there is nothing complicated in them, and something will already be familiar to you from previous lessons.

Drive type

There are two types of drives in total:

1) HDD- Hard disk drive - the most common type of drive, which consists of metal alloy plates coated with a layer of ferromagnetic material. All information is recorded on these plates, which rotate at a very high speed - 5400/7200 rpm. At the same time, information is read by the reading head without touching the surface of the plates, thereby not damaging it and increasing the service life of the device.

These devices are used in the vast majority of computers, as their cost is low.

2) SSD- Solid state drive - a storage device based on memory chips. SSD drives have appeared relatively recently and quickly took their place in the market. Currently, solid state drives are used in compact devices: laptops, netbooks, communicators and smartphones.

Here are the advantages and disadvantages of SSD drives.

Flaws:

  • limited number of rewrite cycles. Depending on the type of memory cells used, from 10,000 to 100,000 times;
  • the problem of compatibility of SSD drives with some versions of operating systems of the Windows family, which do not take into account the specifics of SSD drives, thereby reducing their service life;
  • the price of a gigabyte of SSD drives is significantly higher than the price of a gigabyte of HDD;
  • the impossibility of recovering deleted information with recovery utilities;

Advantages:

  • absence of moving parts, and, as a result, high mechanical resistance;
  • high read/write speed;
  • low power consumption;
  • complete absence of noise due to the absence of moving parts and cooling fans;
  • stability of file reading time regardless of their location or fragmentation;
  • small dimensions and weight;
  • great potential for the development of drives and production technologies.

Despite the many advantages of SSD drives, I personally still use traditional HDDs. Their performance is enough for me to implement any tasks, and the time-tested technologies are reliable enough to trust them with important information. Well, of course, the cost of drives affects my choice.

Storage capacity

Obviously, the larger the hard drive, the more important information we can place on it. The capacity of hard drives is measured in billions of bytes (GB - gigabytes) or trillions of bytes (TB - terabytes). The volume of modern drives reaches up to 4TB in one device, but you need to remember that if you wish, we can install several such hard drives in the system.

Of course, the higher the volume of the drive, the more expensive its cost, and the cost of SSDs is directly proportional to their capacity, while the cost of traditional hard drives depends on the number of platters and grows more slowly with increasing storage capacity.

Form Factor

The form factor determines the dimensions of the drive. There are 3 sizes of modern hard drives: 1.8”, 2.5”, 3.5”.

HDD hard drives are available in 2.5" and 3.5" sizes. 3.5 inch drives are installed inside system block, and 2.5-inch drives are used in laptops, external hard drives.

SSD drives are available in 2.5" or 1.8" form factors. As I wrote earlier, they are used in laptops, netbooks, communicators and smartphones.

Interface

For order, we list all popular interfaces:

SATA, SATA2, SATA3;

Now a few words about each of the connectors.

IDE is an old connector that is easy to distinguish from the rest by a wide cable from the HDD to motherboard. IN modern computers this connector is not used, but I can’t help but say about it, since it is still found in old computers. On motherboards, the IDE connector is becoming less and less common.

The IDE was replaced by the SATA connector, which also managed to become obsolete and, in turn, was replaced by SATA2 and now the SATA3 connector is increasingly used. I combined all the connectors into one item, since they are all identical in shape and differ only in data transfer speed - 1.5 Gb / s, 3 Gb / s, 6 Gb / s, respectively. But it should be remembered that in order for a hard drive with a connector, for example, SATA3, to work with maximum efficiency, a SATA3 connector must also be installed on the motherboard. If the motherboard has a SATA2 connector, then the SATA3 hard drive will still work, but information will be transferred at a speed of 3 Gb / s.

Although, the situation with a transfer rate of 6 Gb / s is more like a marketing ploy. The fact is that the vast majority of modern drives still cannot completely fill up a 3 Gb / s channel, since the speed of reading and writing to a disk is significantly lower than this speed.

And the last interface is micro-SATA. This connector appeared quite recently, 1.8 ”SSD drives are connected through it. Micro-SATA connectors have already begun to appear on modern motherboards, but even if there is no such interface on the motherboard you have chosen, the drive can be connected via a micro-SATA to SATA adapter.

Buffer memory (CACHE)

Let's figure out what it is. A buffer is an intermediate memory designed to smooth out differences in read / write speed and transfer through the interface. In modern disks, it usually varies from 8 to 128 MB.

For you, my readers, I will clarify that the buffer size does not give a significant increase in system performance, so you should not pay attention to it as a key element. Any noticeable difference in time can be obtained by copying very large amounts of information.

By tradition, we will consider the marking of the railway from the supplier's catalog.

The article turned out to be quite large, but I hope that someone will appreciate it, and my efforts will not be in vain.

Well, that's all for today. So slowly, we have analyzed one more lesson that should help in achieving our common success. I hope this material will help you make the right choice.

Today, a common storage medium is a magnetic hard drive. It has a certain amount of memory dedicated to storing basic data. It also has a buffer memory, the purpose of which is to store intermediate data. Professionals call the hard disk buffer the term "cache memory" or simply "cache". Let's see why the HDD buffer is needed, what it affects and what size it has.

The hard disk buffer helps the operating system to temporarily store data that was read from the main memory of the hard drive, but was not transferred for processing. The need for a transit storage is due to the fact that the speed of reading information from the HDD drive and the throughput of the OS vary significantly. Therefore, the computer needs to temporarily store data in the "cache", and only then use them for their intended purpose.

The hard disk buffer itself is not separate sectors, as incompetent computer users believe. It is a special memory chips located on the internal HDD board. Such microcircuits are able to work much faster than the drive itself. As a result, they cause an increase (by several percent) in computer performance observed during operation.

It is worth noting that the size of "cache memory" depends on the specific disk model. Previously, it was about 8 megabytes, and this figure was considered satisfactory. However, with advances in technology, manufacturers have been able to produce chips with more memory. Therefore, most modern hard drives have a buffer whose size varies from 32 to 128 megabytes. Of course, the largest "cache" is installed in expensive models.

What impact does a hard disk buffer have on performance

Now we will tell you why the hard drive buffer size affects computer performance. Theoretically, the more information will be in the "cache memory", the less often the operating system will access the hard drive. This is especially true for a work scenario when a potential user is processing a large number of small files. They simply move to the hard disk buffer and wait there for their turn.

However, if the PC is used to process large files, then the "cache" loses its relevance. After all, information cannot fit on microcircuits, the volume of which is small. As a result, the user will not notice an increase in computer performance, since the buffer will be practically not used. This happens in cases where programs for editing video files, etc. will be launched in the operating system.

Thus, when purchasing a new hard drive, it is recommended to pay attention to the size of the "cache" only in cases where you plan to constantly process small files. Then it will turn out to really notice an increase in the productivity of your personal computer. And if the PC will be used for ordinary everyday tasks or processing large files, then you can not attach any importance to the clipboard.

Normal operation operating system and fast operation of programs on a computer are provided by RAM. Each user knows that the number of tasks that a PC can perform simultaneously depends on its volume. Similar memory, only in smaller volumes, is equipped with some elements of the computer. In this article we will talk about the cache memory of the 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. It stores information that Windows uses most often. The need for this storage arose due to the large difference between the speed of reading data from the drive and the throughput of the system. Other elements of the computer also have a similar buffer: processors, video cards, network cards, etc.

Cache volumes

Of no small importance when choosing an HDD is the amount of buffer memory. Usually these devices are equipped with 8, 16, 32 and 64 MB, but there are buffers for 128 and 256 MB. The cache gets reloaded quite often and needs to be purged, so more is always better in this regard.

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

The main task of the cache

The cache is used to write and read data, but, as already mentioned, this is not the main factor in the efficient operation of the hard drive. 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 the occurrence of errors 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 direct access to 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

The cache is fast processing data, but it has other advantages. Hard drives with large storage can significantly offload 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 size of the buffer. For a normal user, 32 and 64 MB are more than enough. Further, this characteristic begins to lose its significance, since when interacting with large files, this difference is insignificant, and who wants to overpay for a larger cache.

Find out the size of the cache

If the size of a 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 arose, 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.

The utility, designed to work with HDD and SSD, is engaged in reliable data deletion, device status assessment, error scanning, and also provides detailed information about the characteristics of the hard drive.


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

mob_info