Computer disk subsystem. Disk subsystem performance - a short educational program. Some requirements for a modern hard drive
The disk subsystem of a computer is the device used for everyday storage and reading of data. Traditionally, this includes floppy drives and hard drives. IN lately This also includes devices for working with CDs.
Floppy drives are “veterans” among disk devices. They read data from floppy disks (a storage medium) and write to them. The type of drive is determined by the type of floppy disk used (FloppyDisk). Today, 3.5" floppy disks with support for double-sided high-density recording (DSHD) are widely used. The capacity of such a floppy disk is traditionally 1.44 MB, although using special Software it can be increased to 2.8 MB or, conversely, reduced. 5.25 floppy disks "are practically out of use.
Today, floppy disks are not the main means of storing data and programs and are usually used to transfer small files from one computer to another. It was this circumstance that determined the survivability of more compact and easy-to-transport 3.5" floppy disks. The standard for a computer is the presence of one 3.5" disk drive, which is most often manufactured in an internal version (there are also options in a separate case).
Manufacturers of disk drives: Teac, NEC, Mitsumi, Panasonic, Epson... Manufacturers of floppy disks: Verbatim, BASF, Sony, TDK, FujiFilm... We especially note Verbatim floppy disks, which are considered the most reliable and have various designs, incl. with Teflon coating.
The Hard Disk was first introduced for PCs in 1983 and has since become the primary storage device. The principle of storing data on hard drives the same as on floppy disks: magnetization of areas of a thin ferromagnetic layer deposited on the surface of the media. Only hard drives use more advanced finely dispersed and multi-layer coatings applied to perfectly flat and smooth aluminum or glass disks. Usually hard drive has 4 “pancakes”, i.e. double-sided coated media.
Main parameter hard drive consider its capacity. The first hard drive, called “Winchester” by its creators, had a capacity of 10 MB. Since then, this parameter has grown significantly and reaches 160 GB. Modern desktop PCs are equipped with 20, 40 and 60 GB hard drives; mobile PCs often have smaller capacity devices.
The main reserve of disk performance and capacity is an increase in the density of information recording on the magnetic layer of the medium (plate). According to researchers, the density limit for current magnetic recording technology is 40-50 Gbit/sq.in. Today, disks with a recording density of 14-15 Gbit/sq. inch are commercially produced, although there are options for 22.5 Gbit/sq. inch. Here's how this indicator developed:
The hard drive interacts with the rest of the computer through a controller and has two interfaces: EIDE and SCSI. An EIDE drive (often called an IDE) is more common and less expensive, has a built-in controller on the motherboard, but places a load on the processor, which slows down command execution. The SCSI interface is a more expensive solution that allows you to significantly increase the speed of working with a hard drive and reduce the load on the processor. This requires additional installation boards with controller.
Another hard drive parameter is its rotation speed. The block of disks located inside the sealed housing actually rotates. Most discs use 5400 and 7200 rpm speeds, although 10,000 and 15,000 rpm models are available. Increasing the rotation speed improves the performance of the hard drive, but increases the noise it produces during operation.
All modern hard drives have a data cache buffer, the size of which for IDE drives ranges from 512 KB to 2 MB, and for SCSI drives reaches 16 MB.
The maximum internal speed of sequential data reading (transfer) is currently 30...48 MB/s. There are developments with a read speed of 1 Gbit/s.
The average read/write seek time (seek) ranges from 15 ms to 3.9 ms. The average search time for an adjacent track when reading/writing is 2…0.8 ms.
Modern hard drives use the UltraATA/33, UltraATA/66 or
UltraATA/100, providing external disk read speeds of .33, 66 or 100 MB/s, respectively. A new UltraATA/133 interface has been developed, which has not yet found adequate support from manufacturers. The release of drives with the Serial ATA interface at a speed of 1.5 Gbit/s is expected, which can subsequently be accelerated fourfold.
In conclusion, we note such a specific parameter of a hard drive as shock resistance, which in operating condition is 10...60 Gs, and in non-operating condition - 100...400 Gs.
Basic manufacturers of hard drives: Seagate, Fujitsu, IBM, WesternDigital, Quantum, Maxtor, Samsung...
The computer disk subsystem as an important tool for processing raster graphics. Which option is faster?
IN technological processes In pre-press image processing, computer performance plays an important role. First, there are certain minimum system requirements for professional work with graphics. For example, it is almost impossible to prepare a high-quality full-color layout of a printed publication using a 14-inch monitor and a video card that is unable to display 24-bit color. Secondly, whether your working platform matches these minimum requirements does not mean that working with large graphic files will be comfortable. To increase the efficiency of working with a computer, it must have a performance reserve. This allows you to perform even resource-intensive operations (scaling, applying filters to an image, etc.) quite quickly, and ideally in real time. A significant contribution to the overall performance of a graphics station is made by its disk subsystem. It becomes a system bottleneck when processing files whose volume is comparable to the amount of computer RAM.
The situation with hard drives for the Wintel platform has always looked like this: there were SCSI hard drives aimed at the Hi-End sector of the market, and at the same time, less expensive IDE options were offered, intended for installation in other systems. Over the past couple of years, there has been a real technological breakthrough in the field of drives with an IDE interface - suffice it to say that at the end of 1998, a hard drive with a capacity of 4.3 GB, with a spindle speed of 5400 rpm and a recording density was considered average by all indicators. 2 GB per platter, then at the end of 2000, disks with a capacity of 40-45 GB / 7200 rpm / 15-20 GB per platter fell into the middle category. In this case, the norm is to use the ATA-100 standard and reduce the noise of a working disk to values of the order of 30 dB.
In the area hard drives SCSI has not seen such a leap in characteristics - so far the average capacity for disks of this standard is at the level of 18 GB with a recording density of about 6 GB per platter. The performance superiority over IDE drives is maintained thanks to other important parameters - high spindle speed (10,000 rpm is the norm), a large volume of built-in buffer (from 4 to 8 MB versus 0.5-2 MB for IDE models) , and also largely due to the peculiarities of SCSI technologies in general.
However, modern IDE hard drives are literally stepping on the heels of their expensive SCSI counterparts. The most compelling arguments in favor of the IDE version of your computer's disk subsystem are extremely low price(2-4 times less than SCSI) with high capacity, low heat dissipation and noise level.
The situation is further fueled by the fact that recently RAID arrays of IDE standard disk drives have become popular. Previously, RAID technologies were used mainly for SCSI disk subsystems. The appearance on the market of relatively inexpensive IDE RAID controllers allowed IDE hard drives to further expand their market niche. The RAID 1 (Mirror) standard allows you to increase the reliability of the disk subsystem in proportion to the number of redundant hard drives. So, by building a RAID array in Mirror mode from two identical hard drives, we double the reliability of storing our information (it is duplicated) and at the same time get nice bonus in the form of a slightly increased reading speed from the disk array (this is possible due to alternate reading of blocks of information from two hard drives and organizing it into a single stream; this is done at the hardware level by a RAID controller). When using RAID 0 (STRIPE mode), we get an increase in the speed of our disk subsystem in proportion to the number of disks that make up the array - information is divided into small blocks and “scattered” across the disks. Thus, purely theoretically, it would be possible to increase the performance of the disk subsystem by a number of times equal to the number of hard drives in the array. Unfortunately, in practice the speed does not increase so significantly, but you can read about this below by evaluating the test results. It is impossible not to note the main drawback of the RAID 0 (Stripe) mode - the reliability of information storage decreases exactly the same number of times as the number of hard drives used. The RAID 0+1 mode is designed specifically to eliminate this unpleasant effect - a kind of “mixture” of the Mirror and Stripe modes. To organize a RAID 0+1 array, at least 4 hard drives are required. The result is the reliability of a single drive plus double the capacity and increased performance.
Performance Views various types Many users' hard drives are often chaotic. Most people only know that “SCSI is terribly cool, much faster than IDE.” Some of the “advanced” people sincerely believe that a RAID array of two disks in Stripe mode is exactly twice as fast as a single hard drive. In fact, there are many myths in this area, often completely wrong. This article is an attempt to clarify the situation by accurately measuring performance different types disk subsystems. I would like to draw special attention to the fact that to evaluate performance, we used not synthetic test sets (which, as a rule, are of little use), but the most practical tasks from the arsenal of people who professionally deal with graphics on a PC.
So, the following variants of disk subsystems were tested:
IDE-hard drive of an outdated series (5400 rpm, 512 KB cache, 4 GB per platter) with ATA-33 interface - Fujitsu MPD3130AT; motherboard - i440BX with built-in ATA-33 controller. |
IDE- new series hard drive (7200 rpm, 2048 KB cache, 20 GB per platter) with ATA-33 interface - Western Digital WD200; i440BX, ATA-33 (built-in). |
IDE- new series hard drive (7200 rpm, 2048 KB cache, 20 GB per platter) with ATA-100 interface - Western Digital WD200; Promise FastTrak100 RAID controller (SPAN). |
RAID-an array of two modern IDE disks in Stripe mode - 2xWestern Digital WD200; Highpoint Technologies HPT370 UDMA/ATA 100 Raid Controller (STRIPE). |
SCSI-high-end hard drive (10,000 rpm, 4096 KB cache, 6 GB per platter) with SCSI interface Ultra160 - Fujitsu MAJ 3182 MP; SCSI controller - Adaptec 29160N. |
For the purity of the experiment, each variant of the disk subsystem was installed into the system absolutely from scratch. The disk (or disk array) was divided by the FDISK program into three logical ones. At the same time, the volume boot partition(logical drive C:\) was always set to 3 GB. The rest of the space was divided equally between the D:\ and E:\ drives. The operating system was installed on the C:\ drive, the Photoshop swap file was located on the D:\ drive; there were also test files there. File system - FAT32.
In order to put a good load on the disk subsystem and thus evaluate its performance, the amount of RAM was limited to 128 MB (despite the fact that in systems of this class, designed to work with raster graphics, 256 MB are entry level). Amount of memory available Photoshop program 5.5, was set to 50% of the total free. This volume was approximately 57 MB. All tests were run with two files of different sizes - the size of the first was 1/5 of the amount of memory available to Photoshop, the size of the second was 1.5 times larger (). This made it possible to obtain data on the speed of performing a particular operation in two cases: when the file being processed fits in RAM with a margin, and when it is guaranteed not to fit there entirely. It must be said that for a smaller file, the results obtained on different disk subsystems are almost identical, which is not at all surprising - the main processing took place in RAM. The differences in this case are noticeable only in read/write operations - when opening and saving a file. A completely different picture was observed when processing a large file. Since the file did not fit entirely in RAM, Photoshop actively used the computer's disk subsystem. The results of these tests, as the most indicative, are presented in the form of diagrams. Full results, including tests with a smaller file size, as well as with larger ones powerful processor, can be seen in summary table No. 2.
Those interested can repeat all the tests given in this article on other systems, since all the settings used are shown in the table. The test files were created as follows: the CMYK balloons.tif file was taken from the directory... \Adobe\Photoshop5.5\Goodies\ Samples\. After transfer to RGB format it was upscaled to 2240x1680 and 6400x4800 pixels, resulting in two TIFF RGB files measuring 10.7 and 89.7 MB respectively. All operations were carried out on the received files. After each operation, the result was canceled by the Undo command. The last operation (Save) was performed in CMYK format. Each test was run three times, the results were averaged. After each test the system was rebooted.
System No. 1: Fujitsu MPD3130AT; i440BX,ATA-33
The Fujitsu MPD series hard drive is a well-deserved veteran. A year and a half ago, hard drives of such a class as Fujitsu MPD, Quantum CR and their other analogues were the fastest in the IDE hard drive sector. This hard drive has three platters with a capacity of 4.32 GB, 6 read/write heads and a built-in buffer with a capacity of 512 KB. Average search time - 9.5/10.5 ms (read/write), spindle speed - 5400 rpm, noise level - 36 dB. The ATA-66 standard is supported, but this is nothing more than a marketing ploy, since the data transfer speed is in the range of 14.5-26.1 MB/s, which fully fits into the capabilities of the ATA-33 standard (33.3 MB/s) .
The Fujitsu MPD3130AT proved to be a reliable, quiet hard drive. During operation, the noise of the rotating spindle is almost inaudible, but the sound of the positioning heads is clearly distinguishable. The disk heats up very little - even during prolonged operation the case remains cool or barely warm.
In the tests, the MPD3130AT significantly loses to all other participants, which is not at all surprising, given the difference in characteristics with its closest competitor WD200 (rotation speed - 5400 and 7200 rpm, respectively, recording density - 4.3 GB per platter versus 20 GB).
Testing on two different operating systems gave somewhat contradictory results: in Windows 98, opening and saving a file are noticeably faster, and in Windows 2000 - all the rest. Otherwise, no surprises.
System No. 2: Western Digital WD200; i440BX, ATA-33.
WD200 is a representative of a new generation of hard drives. Main parameters - 7200 rpm, internal cache increased to 2048 KB, recording density - 20 GB per platter. The disk has one platter and two heads. The average search time is stated by the manufacturer as 8.9/10.9 ms, which is not very different from the characteristics of the Fujitsu MPD3130AT. However, the WD200 is noticeably faster. Firstly, the larger volume of the built-in buffer has an effect. Secondly, the exchange speed in the buffer-surface section reaches an impressive 30.5-50 MB/s - after all, 20 GB per platter is a serious recording density.
In operation, the disc showed itself to be the best positive side- despite the increased spindle speed, it turned out to be quieter than the Fujitsu MPD (declared noise level - 30 dB). The movement of the heads is almost inaudible.
With heat generation, things are worse, but quite acceptable. After an hour of intensive work, the hard drive warmed up to 45 degrees, i.e. It was quite warm to the touch, but not hot.
Generally this configuration left a very favorable impression and is the undoubted champion in terms of price-performance ratio. Judge for yourself - at a price of about $130, this hard drive forms a completely complete solution with a built-in ATA-33 controller for the 440BX chipset. And no problems with Windows 98, as is observed in the case of using the ATA-100.
System No. 3: Western Digital WD200; ATA-100 Promise FastTrak100 (SPAN).
The tests revealed a very interesting point - when using the ATA-100 interface in Windows 98, the performance of the disk subsystem was in most cases lower than when using the ATA-33. And in some cases there was simply a catastrophic (5-10 times) drop in productivity! Since the results in Windows 2000 were absolutely predictable (that is, the ATA-100 turned out, as expected, faster than the ATA-33), this gives reason to suspect that the combination of Windows 98 + ATA-100 is not working correctly. Perhaps the reason lies in specific model controller - Promise FastTrak100. Additionally, most tests ran faster on Windows 2000.
From all this we can draw a logical conclusion - Windows 98 is not suitable for serious work with graphics. If you want to use the latest achievements in the field of IDE, namely the ATA-100 interface or a RAID array in STRIPE mode, it is better to work with an NT family OS (Windows NT 4.0 or Windows 2000), which behave more correctly in such modes.
When using Windows 2000, there is a gain from switching from ATA-33 to ATA-100, but it is small.
System No. 4: two Western Digital WD200 + HPT370 UDMA/ATA 100 Raid Controller(STRIPE) drives.
And finally, a RAID array of two identical hard drives in striped data block (STRIPE) mode was tested. A block size of 64 KB was used as the most optimal (according to other independent tests). Theoretically, the performance of such a disk subsystem can be 2 times greater than that of a single disk. But test results leave no reason for optimism. In the vast majority of tasks, the performance gain is 5-15% relative to a single disk with an ATA-100 interface.
In a word, the results are disappointing. We can only recommend building a RAID 0 array to those who want to extract maximum performance from IDE technology, despite all the disadvantages described above. But this may only be necessary for those who input uncompressed video onto a PC.
System No. 5: Fujitsu MAJ 3182 MP + Adaptec 29160N SCSI controller.
The last participant in the “competition” is a very high-class SCSI hard drive. It must be said that MAJ 3182 was chosen as the “top bar” this test. Well, this hard drive managed to demonstrate its superiority clearly - in almost all tests it goes neck and neck with its main rival - a RAID array in STRIPE mode.
Its characteristics can also give you an idea of the potential capabilities of the Fujitsu MAJ 3182 MP. Spindle speed - 10,025 rpm, number of disks - 3, heads - 5, average search time - 4.7/5.2 ms, built-in buffer volume - 4096 KB. The SCSI Ultra160 interface is used, providing a synchronous data transfer rate in the buffer-controller section of 160 MB/s.
All these impressive parameters affected the power consumption and noise of the hard drive. The Fujitsu MAJ 3182 MP heats up simply terribly - the body temperature after prolonged operation probably rises to 60°C, if not more - the body clearly burns your fingers. The noise level during operation is also not small - 40 dB. And the main drawback is the price. At the time of writing these lines, a set of a hard drive and a SCSI-160 controller cost about $500 in Moscow.
Results
So, based on the test results, I would like to draw several conclusions that will be useful to those who are planning to upgrade the disk subsystem of their graphics station.
- Disks of previous generations with a low recording density and a small volume of built-in buffer are significantly inferior to modern models in all key parameters - speed, capacity and noiselessness. Feel free to replace your old Fujitsu MPD class hard drive with a new high-speed hard drive with increased recording density (15-20 GB per platter) and a large cache capacity (2 MB). The performance gain can be 100 percent or more. Moreover, everything said remains valid even when using the ATA-33 interface.
- The transition from ATA-33 to ATA-100 does not give a big increase in performance. In my opinion, it’s not worth buying a separate ATA-100 controller, even if it’s inexpensive (about $30). A suitable option is to have a “free” built-in controller of this standard on the motherboard.
- The RAID array in STRIPE mode showed very good performance - at the SCSI "ten thousandth" level, and often higher. At the same time, you need to take into account the very attractive cost of such a configuration, because two hard drives that make up the array, together with an inexpensive RAID controller from Highpoint, cost less than one SCSI hard drive without a controller! (130+130+30 = $290). And on top of that, we get a huge capacity compared to the SCSI version - 40 GB. The only, but very big, disadvantage is the reduction in data storage reliability by 2 times. However, if a disk array of this type will be used as a means for operational work, and not as a long-term repository of valuable information, its acquisition is more than justified.
- Top-level SCSI hard drives, as you would expect, have the highest performance.
However, given the high price, high heat dissipation and noise level of such devices, purchasing them is justified only when you need uncompromisingly high performance (and reliability of the disk subsystem, because SCSI hard drives have always been famous for their reliability and high mean time between failures).
In conclusion, I would like to draw the readers' attention to two lines in the last table - the measurement results when replacing the Pentium-III-650E processor (100 MHz system bus frequency) with a Pentium-III-866EB (133 MHz FSB). As you can see, replacing the processor with a significantly more powerful one does not give a wide range of results. This shows that the chosen testing methodology was correct (low “processor dependence”, the main load falls on the disk subsystem).
WITH Andrey Nikulin can be contacted at email: [email protected] .
The editors would like to thank the companies Elko Moscow, SMS, Pirit and Russian Style for their help, who provided equipment for testing.
System board | ASUS P3B-F |
CPU | Intel Pentium III-650E (FSB 100 MHz) |
RAM | 128 MB, PC-133 M.tec (2-2-2-8-Fast) |
Video adapter | Creative 3DBlaster TNT2 Ultra |
RAID controller | Highpoint Technologies HPT370 UDMA/ATA 100 Raid Controller |
ATA-100 controller | Promise FastTrak100 |
SCSI controller | Adaptec 29160N (Single Channel 32-bit PCI-to-Ultra160 SCSI Host Adapter (OEM)) |
Hard drives | IDE-Fujitsu MPD3130AT IDE - Western Digital WD200 - 2 pcs. SCSI - Fujitsu MAJ 3182 MP |
operating system | Windows 98 4.10.1998 + DirectX 7.0a Windows 2000 Professional 5.00.2195 Service Pack 1 |
Test program (option settings) | Adobe Photoshop 5.5: Cache Settings: Cache Levels - 4 Use cache for histograms option enabled Physical Memory Usage physical memory): Available RAM - 113,961 KB; Used by Photoshop - 50%; Photoshop RAM - 56,980 KB. Scratch Disks: First: D:\; the rest are disabled. |
Test files | 0.2 Photoshop RAM; 2240x1680 pixels; 24-bit color; RGB TIFF, 10.7 MB; 1.5 Photoshop RAM; 6400x4800x24; RGB TIFF; 87.9 MB. |
Magazines are freely available.
When it comes to performance, people first pay attention to the processor frequency, memory speed, chipset, etc. etc., if they remember about the disk subsystem, it is in passing, most often paying attention to only one parameter - linear reading speed. At the same time, it is the disk subsystem that most often becomes the bottleneck in the system. We will tell you why this happens and how to avoid it in this article.
Before talking about performance, let’s remember how a hard drive works, since many of the features and limitations of the HDD are based on physical level. Without going into details, we can say that the disk consists of one or several magnetic plates above which a block of magnetic heads is located; the plates, in turn, contain magnetized concentric circles - cylinders (tracks), which in turn consist of small fragments - sectors. A sector is the minimum addressable disk space; its size is traditionally 512 bytes, although some modern disks have a larger sector size of 4 KB.
As the disk rotates, sectors pass by a block of magnetic heads that write or read information. Rotation speed ( angular velocity) of the disk at the final moment of time is a constant value, but the linear speed of different sections of the disk is different. At the outer edge of the disk it is maximum, at the inner edge it is minimum. Consider the following figure:
As we see, over the same period of time, a certain area of the disk will rotate through the same angle; if we designate this area as a sector, it turns out that five sectors from the outer track and only three from the inner track will fall into it. Therefore, for a given period of time, the magnetic head counts from the outer cylinder more information than from internal ones. In practice, this manifests itself in the fact that the read speed graph of any disk is a decreasing curve.
Initial sectors and cylinders are always located on the outside, ensuring maximum data exchange speed, so it is recommended to place system partition exactly at the beginning of the disc.
Now let's move on to more high level- file system level. The file system operates on larger blocks of data - clusters. The typical NTFS cluster size is 4 KB or 8 sectors. Having received an instruction to read a specific cluster, the disk will read 8 consecutive sectors, with the data arranged sequentially operating system will give instructions to read data starting from cluster 100 and ending with cluster 107. This action will represent one input/output operation (IO), the maximum number of such operations per second (IOPS) is finite and depends on how many sectors pass by the head per unit time (as well as on the head positioning time). Data transfer speed is measured in MB/s (MBPS) and depends on how much data will be read in one I/O operation. With a sequential arrangement of data, the exchange speed will be maximum, and the number of I/O operations will be minimal.
Here it would be useful to remember such a parameter as recording density, which is expressed in the area required to record 1 bit of data. The higher this parameter, the more data one platter can hold and the higher the speed of linear data exchange. This explains the higher speed characteristics of modern hard drives, although technically they may be no different from older models. The figure below illustrates this situation. As you can easily see, with a higher recording density for the same period of time, at the same rotation speed, more data will be read/written
Now let's look at the exact opposite situation: we need to read a large number of small files randomly scattered throughout the disk. In this case, the number of I/O operations will be high and the data transfer rate will be low. Most of the time will be spent waiting for access to the next block of data, which depends on the head positioning time and the delay due to disk rotation. A simple example: if after sector 100 a command is received to read 98, then you will have to wait a full revolution of the disk until it becomes possible to read this sector. Here you should also add the time it takes to physically read the required number of sectors. The combination of these parameters will be random access time, which has very great influence on hard drive performance.
It should be noted that the OS and many server tasks (DBMS, virtualization, etc.) are characterized by random access with a block size of 4 KB (cluster size), and the main performance indicator will not be the linear data exchange speed (MBPS), and the maximum number of input/output operations per second (IOPS). The higher this parameter, the more data can be read per unit of time.
However, the number of I/O operations cannot grow indefinitely; this value is very strictly limited from above physical indicators hard drive, namely random access time.
Now let's talk about fragmentation, the essence of this phenomenon is well known, but we will look at it through the prism of productivity. For large files and linear workloads, fragmentation can significantly reduce performance by turning sequential access into random access, causing a sharp decrease in access speed and also dramatically increasing the number of I/O operations.
With the random nature of access, fragmentation does not play a special role, since there is no difference in which exact location on the disk a particular block of data is located.
The advent of disks with larger 4 KB sectors gave rise to another problem: file system alignment relative to disk sectors. There are two possible options here: if the file system is aligned, then each cluster corresponds to a sector; if it is not aligned, then each cluster corresponds to two adjacent sectors. And since a sector is the minimum addressable unit, to read one cluster you will need to read not one, but two sectors, which will negatively affect performance, especially with random access.
Real hard drive performance is always a balance between data transfer speed and the number of I/O operations. Characteristic for sequential reading large size a data packet that is read in one I/O operation. The maximum speed (MBPS) will be achievable when reading sectors sequentially from the outer edge of the disk; the number of input/output operations (IOPS) will be minimal - the tracks are long, the head needs to be positioned less frequently, and more data is read. On internal tracks, the linear speed will be lower, the amount of IO will be higher, the tracks are short, the head needs to be positioned more often, and less data is read.
With random access, the speed will be minimal, since the size of the data packet is very small (in the worst case, a cluster) and performance will be limited to the maximum available number of IOPS. For modern mass disks, this value is about 70 IOPS; it is easy to calculate that with random access with a packet size of 4 KB, we will get a maximum speed of no more than 0.28 MBPS.
Failure to understand this point often leads to the fact that the disk subsystem turns out to be a bottleneck that slows down the operation of the entire system. Thus, when choosing between two disks with a maximum linear speed of 120 and 150 MBPS, many will choose the second without hesitation, not looking at the fact that the first disk provides 70 IOPS, and the second only 50 IOPS (a quite typical situation for economical series), and then They will be very surprised why the “faster” disk slows down so much.
What happens if the disk IOPS is not enough to process all requests? A queue of disk requests will appear. In practice, everything is somewhat more complicated and a disk queue will occur even when IOPS is sufficient. This is due to the fact that various processes, accessing the disk have different priorities, and also that write operations always take precedence over read operations. To assess the situation there is a parameter disk queue length, the value of which should not exceed (according to Microsoft recommendations)
Number of HDD spindles + 2
In any case, a persistently large queue length indicates that the current IOPS value is not enough for the system. An increase in the disk queue on already running systems indicates either an increase in load or failure or wear of hard drives. In any case, you should think about upgrading the disk subsystem.
This is where we will finish our material for today; the information provided should be sufficient to understand the physical processes occurring during work hard disk and how they affect performance. In the following articles, we will look at how to correctly determine how many IOPS are needed depending on the nature of the load and how to properly design the disk subsystem so that it meets the requirements.
Tags:
Rapid evolution software led to an increasing increase in requirements for the computer disk subsystem. In addition to the speed of operation and the amount of stored information, manufacturers focused special attention on improving such parameters as the reliability of drives and their consumer characteristics (for example, ease of installation and noise level). The growing popularity of portable computers has directed a stream of engineering thought into the field of miniaturizing drives and increasing their reliability in extreme conditions. It is theoretically possible to technically develop a solution that simultaneously satisfies all the mentioned requirements. However, from a practical point of view, a universal solution will bring little joy, since an “ideal” hard drive will cost many times more than an “imperfect” one. It is for this reason that we are now seeing a genuine variety of hard drives made using different technologies, connected through various interfaces and having different technical characteristics. This article provides brief advice on choosing hard drives, and also discusses the current problems that users and system administrators encounter in practice when implementing RAID arrays.
Some requirements for a modern hard drive
The most recognized and widespread means of storing information is rightfully considered the hard drive (hard drive). The information on this drive does not disappear when the computer's power is turned off, unlike, say, RAM, and the cost of storing a megabyte of information is extremely low (about 0.6 cents). A modern hard drive has high performance and impressive capacity at a low cost per megabyte of disk memory. Modern hard drives can be 47 GB or larger. To “feel” such a volume, you can make a simple estimate. On 47 GB of disk, you can record about 7 million ComputerPress magazine pages in text format, or almost 57 thousand unique issues of the magazine. For this, the ComputerPress editorial office would need to operate without failures for almost 5 thousand years. Inside the sealed casing of the hard drive, hard drives (usually several, extremely rarely one) with a high-quality magnetic coating rotate at a huge constant speed (5400, 7200, 10,000, 15,000 rpm). They are “strung” on a rotating shaft - a spindle. Information on the disk is located on “tracks” (concentric circles), each of which is divided into sectors. Each area of the disk is assigned a corresponding number through a low-level formatting process performed by the drive manufacturer. Read and write on both sides magnetic disk produced using magnetic heads. The heads themselves are mounted on a special lever (adjucator) and sweep over the surface of the rotating disk at a speed indistinguishable to the human eye. The average time during which the head manages to position itself over the desired area of the disk (average access time) essentially reflects its performance - the shorter the access time, the faster the hard drive. In addition to the above, the hard drive includes a controller board containing all the drive electronics.
A modern hard drive, according to the PC’99 specification, must support bus mastering mode, as well as S.M.A.R.T. technology. Bus mastering means a mechanism for direct exchange of information on the bus without participation central processor. In addition to increasing performance, this mode reduces the load on the central processor (there are already many contenders for its resources: “lazy” software modems, sound cards, simultaneously running applications, etc.). To implement the bus mastering protocol, it is necessary that all participants in the process (including the hard drive controller and the motherboard chipset) support it. S.M.A.R.T technology (Self-Monitoring Analysis and Reporting Technology) is a hardware mechanism for predicting failures on the hard drive, which guarantees users against “surprises” of the hard drive. Modern hard drives with an ATA (IDE) interface must support Ultra ATA/33 mode, which provides peak external hard drive performance of up to 33.3 MB/s. Many drives are already available with the Ultra ATA/66 interface ( maximum speed transfers 66.6 MB/s), but, unfortunately, these figures are rarely achieved in reality, since the performance of hard drives is limited not by the narrowness of the data transfer interface, but mainly by mechanics.
The high speed of rotation of the disks inside the hard drive leads to vibration, which is unacceptable and is dampened by special design devices. That is why the structural perfection of a hard drive can often be determined by ear: the quieter the hard drive is, the better its mechanics and less heating.
Buying a hard drive: what to look for
When purchasing a hard drive, you can usually find the following line in the price list of a trading company: HDD IBM 13.7 GB 5400 rpm IDE ATA/66. This is translated into Russian as follows: a hard drive manufactured by IBM, with a capacity of 13.7 GB, a spindle speed of 5400 rpm with an Ultra ATA/66 interface. It looks unclear only at first glance. In fact, the principles for choosing a hard drive are universal:
- a reputable brand is not a guarantee of quality, but an argument in favor of choosing a branded hard drive. First of all, take a closer look at models from IBM and Seagate, although they, like any company, have successful and extremely unsuccessful series of hard drives;
- The higher the capacity, the more profitable the hard drive becomes in terms of “price per megabyte”. However, high-capacity hard drives often become a dumping ground for forgotten files, and are more expensive than their less capacious counterparts. Large hard drives take much longer to maintain (for example, defragmentation), so for home purposes we can recommend hard drives with a capacity of about 10-20 GB;
- The higher the spindle speed of the drive, the greater its performance (data writing and reading speed), but the higher the price and the higher the heating. For home and office use, we recommend giving preference to hard drives with a spindle speed of 5400-7200 rpm (revolutions per minute);
- IDE (ATA) is a type of interface (mechanism and connection protocol) of a disk drive to the computer system board. The IDE interface is the cheapest and most common, so it can be given a universal recommendation. The SCSI interface is considered more “professional”, allowing you to connect up to eight devices and IEEE-1394 (FireWire). SCSI has become noticeably less widespread than IDE due to its high price and configuration features. And FireWire should soon become the standard for exchanging digital data between digital consumer electronics and computer peripherals. In a word, if you are not involved in video editing, video digitization and editing huge files, then your choice is a hard drive with an IDE interface;
- ATA/66 (the same Ultra ATA 66 or Ultra DMA 66) is an extension of the IDE (ATA) interface, which allows, in exceptional cases, to achieve data transfer rates of 66 MB/s and often reduce the load on the central processor. This, of course, happens extremely rarely and lasts only a few fractions of a second. The usual performance of a hard drive is 4-5 times lower. In order for the disk subsystem to develop such performance, it is necessary that the controller motherboard and the hard drive supported this standard. Modern hard drives are already available with support for ATA-100 and are not much more expensive than their counterparts with ATA/33 or ATA/66. Conclusion: if finances allow, it is preferable to purchase an ATA-100 hard drive, but ATA/66 is also a good choice.
Notes on disk optimization
A high-speed hard drive does not guarantee you maximum disk subsystem performance. Just as a king is played by his retinue, the performance of a hard drive depends on the devices in which it is forced to work. First of all, it is necessary to balance needs and capabilities. In practice, this means that before purchasing a hard drive, you must absolutely know the capabilities of your motherboard. The purchase of an ATA-100 drive for an ATA-33/66 motherboard should be carefully thought out and justified - this is necessary, first of all, for yourself. Unfortunately, there are often cases (especially in academic environments) when ATA-100 (7200 rpm) drives were purchased to upgrade long-outdated i486/P60s. There is no need to talk about the financial or practical feasibility of this decision. However, we will not focus on the obvious, but will consider little-known factors that affect the speed of the disk subsystem.
Two ATA devices on one cable: good or bad? Definitely bad! And this is caused not only by the fact that the transport medium for both devices is the same physical loop. The problem lies somewhat differently - in the way the controller works with each device, in which their parallel operation is impossible. In other words: until the first device has completed the command, it is impossible to access the second one. This means that if a slower device in a pair is accessed, the faster one will be forced to wait for the previous operation to complete, which can significantly slow down its operation. This is most clearly seen in the example of the hard drive-CD-ROM drive combination. That is why it is recommended to distribute ATA devices into different loops depending on their operating speed.
Using bus mastering mode. The very first adopted ATA standard involved the use of a computer's central processing unit (CPU) to organize work with information storage devices. This was the PIO (programmed input/output) mode, which all ATA devices must still support. At the same time, the short-sightedness of this method, which wasted valuable processor resources on working with ATA devices, was quite obvious. Therefore, equipment manufacturers have proposed an alternative - the Bus Mastering mode (another name is DMA/UDMA). The main difference of the new mode was the release of the CPU from data transfer control operations and the delegation of these functions to the ATA controller. This frees up CPU power for more critical operations, allowing you to increase throughput disk subsystem. This mode has been supported by all motherboards without problems for more than five years.
Using a RAID controller. The main complaints against hard drives their small volume and constantly insufficient speed of work remain. This is true for hard drives installed on both servers and workstations. However, if the proposal to upgrade the server disk subsystem still has a chance to be approved by management, then complaints about the insufficient speed of the hard drive on the workstation with a 99.9% probability will die before reaching your ears system administrator. With a home computer, the situation is even more dramatic, since money to update the disk subsystem will have to be withdrawn from the family budget. At the same time, high-speed hard drives (ATA-100, 7200 rpm) currently cost about $130 for 20 GB. A way out of the deadlock can be to use a RAID controller, which allows you to combine several physical disks into one logical one. In a nutshell, the principle of using RAID is to parallelize read/write streams of information across multiple physical media. As a result, the maximum read/write speed from the “combined” media increases by as many times as the number of physical drives used to create the RAID array. The above is true only for zero-level RAID arrays, which do not involve duplication of stored information. Previously, RAID arrays used fairly expensive hard drives with a SCSI interface. But for about a year now, cheap (from $36) RAID controllers for hard drives with an IDE interface have been available on the market. In addition, some manufacturers motherboards(Abit, MSI, etc.) along with standard interfaces IDEs install RAID controllers on their boards. The most common models of RAID controller cards for ATA hard drives on our market are Promise and Abit Hot Rod. Naturally, they are not the only ones. In particular, American Megatrends, Inc. (AMI), better known as a manufacturer of RAID controllers for SCSI hard drives, turned its attention to this market segment and released the AMI HyperDisk ATA-100 RAID ( approximate price$120). As a result, we have the opportunity to increase the performance of our disk subsystem at any time without requiring large expenditures. To make the situation with RAID not seem so optimistic, let's add a fly in the ointment: a number of RAID controllers have serious problems, the nature of which is still unknown. We are talking, for example, about the problem of compatibility of IBM DTLA - 3070xx hard drives and RAID controllers built on the HighPoint HPT-366/368/370 chipset. This problem has been actively discussed in Internet forums for several weeks. Its essence lies in the fact that in the case of creating a RAID array using a RAID controller based on the HPT - 366/368/370 chipset based on IBM DTLA-3070xx hard drives, unpredictable data “shedding” occurs and a large number of bad blocks appear even on new ones hard drives. Judging by user reviews, this problem did not affect users of Promise products, but owners of Abit Hot Rod and motherboards with an integrated HPT-370 controller (reliably confirmed on Abit VP6 and Abit BX-133 RAID boards) felt it to the fullest. The nature of this phenomenon has not yet received an official explanation, but doubts have been expressed regarding the correct shutdown of the hard drives included in the array when shutting down the computer. As a result, data from the hard drive cache is not saved to the media, which violates the integrity of the data. Moreover, in the case of using a RAID controller as a source of additional ATA-100 ports (that is, not using the RAID function) stated problem does not arise. The most annoying thing is that some of the best representatives of the ATA-100 family of hard drives (DTLA - 3070xx series) are susceptible to this effect, since similar cases with hard drives from other manufacturers are not reported.
Some observations on organizing RAID arrays from ATA drives
This section provides a number of reliable observations from the authors during the server creation process backup, as well as preliminary conclusions that were drawn on their basis.
Situation one: you are using an Abit VP6 Dual PIII - 667 with four IBM DTLA-307045 in one RAID array. The first month everything works without problems. Approximately in the middle of the fifth week, spontaneous (in one day) “shedding” (the appearance of bad blocks) of the entire array occurs. The array was disassembled, and by performing checks on all disks individually, a huge number of bad blocks (~3%) were identified on each hard drive. Interestingly, the pattern of their location was repeated for each pair of drives. Conclusion: the problem of joint interaction of the HPT-370 with the IBM DTLA-3070xx cannot be solved latest versions firmware and drivers.
Situation two: everything is the same, only instead of the built-in RAID controller, an AMI HyperDisk 100 is used. In addition, the failed IBM disks are replaced with two Fujitsu and two Quantum hard drives, connected to the first and second channel of the controller, respectively. It was planned to organize two RAID arrays based on each pair of hard drives. All hard drives are installed in rack modules connected to the RAID controller using ATA-100 (80-pin) cables. After manually creating two arrays, we noted the appearance of two new disks of the expected size (MS Windows 2000 OS). After this, when formatting and trying to write data, the operating system froze. Remembering that in the rack module the hard drives are connected through an ATA-33 cable (while the controller indicated the mode of operation with UDMA-5 hard drives), we replaced the connecting cables with ATA-33. After such a replacement, the controller began to display a warning at each boot about the inevitable increase in speed that awaits us when replacing the cables. With deep regret, ignoring this invitation, we noted the beginning of normal operation of one pair of drives. However, connecting the second pair brought a surprise - the created drive turned out to be impossible to format using Windows 2000, because at the end of formatting the OS reported that formatting could not continue. Having experienced a moment of weakness, we carefully studied the documentation on HyperDisk, especially the section on automatic creation of arrays. As a result, the first set of arrays was destroyed and automatic mode a second one was created. And then the surprises began. First of all, the controller combined hard drives from different manufacturers into one array, that is, instead of tandems by manufacturer, we got mixed tandems. This looked strange against the backdrop of calls for using identical hard drives when creating arrays. The reason why pairs of drives were combined into a stripe array, and not all four at the same time, also remained unclear. A study of the existing configuration established its full functionality. However, since the volumes of the Fujitsu and Quantum hard drives differed (as a result of asymmetric merging, approximately 200 MB per array was lost), we continued attempts to symmetrically combine the hard drives. After a short but careful study of the array’s configuration, it was noticed that each pair of hard drives included in its composition is physically connected to different channels of the RAID controller. Recalling the fact that the ATA controller is not capable of working in parallel with devices connected to one of its channels, and that the use of the array involves simultaneous recording to each device included in its composition, we made a preliminary conclusion about the problematic operation of the array when connecting the drives that form it one ATA channel. This assumption provided a reasonable explanation for the fact that four hard drives were combined into two arrays (and not into one), which was automatically performed by the AMI HyperDisk controller. The logical conclusion from this assumption was to change the disk configuration in such a way that the Primary Master - Secondary Slave and Secondary Master - Primary Slave combinations were formed by hard drives from the same manufacturer. After reconnecting the drives, the arrays were automatically reconfigured, which brought the expected result - two arrays consisting of drives from the same manufacturer. As a result, we regained more than 200 “trimmed” megabytes of the array. However, our joy faded when the operating system detected only one (smaller) array. At the time of signing the number, all attempts to force the operating system to “see” the array were unsuccessful, which may serve as further evidence of the need to use absolutely identical disks in the process of creating arrays.
ComputerPress 4"2001
The material is divided into three parts: A - theory, B - practice, C - creating a multiboot flash drive.
A. General theory (popular).
1. Iron.
All physical devices that we use every day to store information (HDD, CD-ROM, flash drive, and even flopstick) are block I/O devices. They can connect to a computer via various interfaces: IDE, SATA, eSATA, USB. The operating system provides a single, transparent method for the user and application software programmer to read/write information from/to these media.
Drivers communicate directly with the hardware. A driver is a program loaded into the operating system. It is a layer between the OS and devices, representing a standard software interface block I/O devices.
2. Data on a physical disk.
These devices are called block devices because information is written and read on them in blocks (sectors, clusters) of a fixed size. The block size is a multiple of 512 bytes. The block approach is necessary to ensure high speed of the disk subsystem.
The disk itself is formatted (partitioned) at a low level (at the factory). The disk consists of cylinders. A cylinder is a circle on a disk plate. The first cylinders are located in the center of the disk plate, the last - on the outer edge. Each cylinder is divided into sectors. Blocks on the disk are organized within sectors. In addition to the data itself, information for error control is recorded in blocks. The controller inside the hard drive works with this information and is not visible from the outside. The driver sends commands to the disk controller at the “read 10 blocks 10 cylinders 20 sectors” level.
All useful data recorded on the media is organized into sections. In Windows, each partition is usually represented as a logical drive (C, D, E, ...). On removable media (flash drive, CD, flopstick), as a rule, one single partition is created; on internal hard drives, on the contrary, there are usually several partitions. The data in the partition is organized in a file system.
Each partition can independently set its own block size - the cluster size. It regulates the speed/economy balance. A block is the smallest addressable unit of disk layout. A cluster combines several blocks - it is the minimum addressable unit in a partition.
Thus, the following logical hierarchy is established (from bottom to top): block, sector, cylinder - cluster - section - file, directory.
In most file systems, a file can span one or more clusters. Thus, if the file size is smaller than the cluster size, then the file will occupy the entire cluster. For any file on the disk, a number of bytes will be allocated that is a multiple of the cluster size. Some file systems can divide one cluster into several files (packing), but this is rather an exception (for now). Thus, the larger the cluster size, the higher the speed and the more space is lost on half-full clusters.
3. Physical disk partitioning.
The partition size is also measured in blocks. This is why, when dividing a disk into partitions, the size expressed in bytes can be slightly adjusted by the program.
Since there can be multiple partitions on a disk, they need to be listed somewhere, indicating the limits and properties of each partition. For this purpose, a partition table is used, which is located at the beginning of the physical disk (the beginning of the disk is its first block in accordance with addressing). In the classic case, it is part of the MBR (master boot record), which entirely occupies the first block. The entire partition table is allocated 64 bytes. Each table entry consists of the start and end addresses of the partition, the partition type, the number of sectors in the partition and the partition “load” flag and occupies 16 bytes. Thus, the maximum number of partitions on a disk is limited to four (16 × 4 = 64).
This happened historically, but over time it became obvious that 4 sections are not always enough. A solution to the problem has been found. Those partitions that are marked in the disk header (in the MBR) are called Primary. There should still be up to 4 of them inclusive. Additionally, the concept of Extended partitions was introduced. An extended partition contains one or more subpartitions and does not contain a file system. It itself is a full-fledged primary partition.
Because the extended partition's subpartitions are not listed in the disk partition table, they cannot be marked as bootable. The bootable partition is the partition from which the operating system begins to boot. It is flagged in its partition table entry. Thus, only one of the 4 primary sections can be marked. An extended partition cannot be bootable, since it does not have a file system.
The layout of the extended section is described at the beginning. By analogy with MBR, there is EBR (Extended boot record), located in the first sector. It describes the layout of the logical drives of this extended partition.
On optical disk and a flash drive usually has only one partition, since smaller divisions do not make sense there. Typically, when burning a CD, the ISO 9660 file system is used. A disc image from this file system called ISO image. It is often used in isolation from the physical disk as a container for data transfer, since any image is a bitwise exact copy physical media.
4. File system.
Each disk partition intended for data storage (that is, all partitions except the extended one) is formatted in accordance with some file system. Formatting is the process of creating a file system structure in some space on a disk - a partition. The file system organizes user data in the form of files located in some hierarchy of directories (folders, directories).
The structure of directories and files in a partition in the classic case is described in the file table. As a rule, the table takes up some space at the beginning of the section. After the table the data itself is written. This creates a system where the structure is described separately and the data (files) are stored separately.
If a file is deleted from disk, it is removed from the file table. The space it occupied on the disk is marked as free. But there is no physical cleanup of this place. When a disk is written to, the data is written to free space. Therefore, if after deleting a file you create a new one, there is a possibility that it will be written in place of the deleted one. When quickly formatting (used in the vast majority of cases) a partition, only the table is also overwritten. The procedure for recovering files after deletion or formatting is based on these features.
During operation, physical damage may occur on the disc. Some blocks may become unreadable. These blocks are called “bad sectors”. If a bad disk hits while reading a disk, an I/O error occurs. Depending on where the bad block appeared and how many of them appeared, either part of the contents of the files or part of the file table may be lost.
When trying to write to a bad block, the disk controller must identify the problem and allocate a new space on the disk surface for this block, and remove the old space from use (relocate bad block). It does this unnoticed by the OS and drivers, on its own. This happens as long as there is a reserve of space for transfer.
5. Working with disk.
The operating system provides the ability to work with disks at the file, partition and device level. The specific implementation of access to each level depends on the specific OS. But in any case, the general thing is that the physical disk and any of its partitions can be accessed in the same way as a regular binary file. That is, you can write data to it, and you can read data from it. Such features are especially useful for creating and restoring disk images and cloning disks.
In UNIX operating systems, all storage devices are represented as files in the /dev directory:
sda, sdb, sdc, ... - physical disks (HDD, including external ones, flash drives, IDE drives);
fd0, fd1 - flops.
Partitions on each disk are available as sda1, sda2, sd3, ...
Disks are numbered in the order in which the BIOS sees them. Partition numbering is in the order in which partitions were created on the disk.
To make an image (an image is a bitwise copy of the information located on a disk or partition) of an entire disk (for example, the first one in the BIOS - sda), you need to subtract data from /dev/sda into any other file specially created for the image, using a sequential copy program file contents. To write the image to a file, you need to use the same program to subtract data from the image in /dev/sda. By analogy, you can create/restore an image of a partition (for example, the first one on the first disk - sda1) by accessing /dev/sda1 instead of /dev/sda.
6. Mounting.
To "turn" a disk device into a collection of files and directories that can be accessed, it must be mounted. There is no such thing as a mount in Windows. There, partitions are simply connected to logical drives (C:, D:, E, ...). Information about which letter to assign to which drive is stored in the OS itself.
In UNIX, the concept of mounting is fundamental to working with disks and provides much more flexibility than in Windows. Mounting is the process of linking some source of a disk image (either the disk itself or a file with its image) to some directory in the file UNIX system. The file system in UNIX starts from one point - from the root directory (/), and no logical drives C, D, E exist.
When a UNIX OS starts booting, a disk partition marked as root is mounted in the root directory /. OS service directories located at the root of the file system must be created on the disk partition. Other partitions can be mounted to them, or files can be written directly to the main partition (mounted to /).
The key point is that the disk image source (a block device, an image file, or a directory in an already mounted file system) can be mounted to any directory at any file system nesting level that begins with /. Thus, different logical partitions of a physical disk are represented by directories in a single file system, as opposed to the separate file systems of different logical drives in Windows (where each disk is treated as an autonomous file system with its own root).
To mount, you must specify the file system of the image, mounting options, and the directory to which it will be bound.
Due to this flexibility, you can link one directory to several different places in the file system, make a disk image and mount it without writing it to disk, open the ISO image. And all this is done without the use of third-party utilities.
7. MBR - boot area.
At the beginning of a physical disk there is usually an MBR (master boot record). This is the boot area of the disk. When loading computer BIOS determines which disk is the primary one and looks for the MBR on it. If it is found, then control is transferred to it. If not, an error is displayed stating that boot disk not found.
In the MBR, in addition to the partition table (described above), there is program code that is loaded into memory and executed. It is this program that must determine the boot partition on the disk and transfer control to it. The transfer of control occurs in a similar way: the first block (512 bytes) of the boot partition is placed in RAM and is executed. It contains program code, which initiates loading of the OS.
Due to the fact that control from the BIOS, when the computer boots, is transferred to a program recorded on the disk, it is possible to make the choice of boot partition more flexible. This is what the GRUB and LILO boot loaders, widely used in the UNIX world, do. Latest bootloader currently in use on modern computers there's no point. With GRUB you can give the user a choice of which partition to boot and how.
The GRUB code is too large to fit in the MBR. Therefore, it is installed on a separate partition (usually the partition mounted in /boot) with a FAT, FFS or Ext2 file system. Code is written to the MBR that loads GRUB code from a specific partition and transfers control to it.
GRUB independently or with the help of the user determines from which partition the boot should occur. In the case of a Winsows partition, control is simply transferred to it in the same way as it would be from a regular MBR. In the case of Linux, the bootloader performs more complex actions. It loads the OS kernel into memory and transfers control to it.
Make a backup boot area disk is as easy as backing up the entire disk or a separate partition. The bottom line is that the MBR occupies the first 512 bytes of the /dev/sda disk. Therefore, for MBR backup it is necessary to read the first 512 bytes of /dev/sda into the file, and for recovery, on the contrary, the file must be read into /dev/sda.