Storage system

Time:2021-8-17

Storage system

The computer storage system is divided into multiple levels, ranging from registers and caches inside the CPU to memory, disk, tape and various pluggable USB devices. They all belong to the storage system. A common intuitive figure is as follows:
存储体系

From the top CPU to the bottom hard disk storage layer, you can see that the speed gradually slows down and the capacity gradually increases. The capacity shown in the figure is illustrated by taking my own macbookpro16 13.3 8 / 256g configuration as an example

  • CPU / L1, in the multi-core era, each core has its own register and L1, which usually refers to the register and L1 cache in the CPU. Generally, the speed of the register is in one clock cycle, and the speed of L1 is in 1-3 clock cycles (1 clock cycle ~ 1 / 3 ns)
  • L2, the L2 cache inside the CPU. In the multi-core era, each core basically enjoys its own L2 cache, with larger capacity and slower speed than L1
  • L3, commonly referred to as “three slows”, is generally M-level. On my own computer, it is about 4m. The size of desktop / server level CPU is usually about ten or tens of M, which is further lower than L2
  • Main memory is a common memory. The mainstream memory capacity is in GB
  • SSD / HDD, solid state drive and traditional mechanical hard disk, with the capacity in TB

It can be seen that our common memory speed has been blasted into slag in front of CPU / L1. Even so, the speed of memory is still quite fast. The multi-level storage system of computer is to make up for the mismatch between the speed of the next layer and the previous layer step by step. In the early stage, an L1 may be enough. With the development and progress of semiconductor technology, L2 / L3 slowly appears, It is unknown whether L4 level cache will continue to appear in the future or whether L3 level cache will be killed with the innovation of memory technology

There is also a common network delay. For the internal network, the network delay usually fluctuates between 0.1 ~ 10ms, which may also have a great relationship with the equipment and routing in the network. The speed of accessing the external network (public network) is basically more than ten, hundreds of MS or even seconds,
This network delay is a relatively large fluctuation

These are introduced to let developers have an intuitive understanding of the speed of common devices and components in computers. Our applications usually work in memory in the way of process, expose network interfaces in the way of service, and also request external database services, cache services and other components as clients, Then, multiple subsystems in the whole system form a network topology to form a complete system

Hard disk

HDD was the main hard disk in the early days, and SSD has gradually become the mainstream in recent years. For enterprise services, disks need to pay attention to several points

  • Capacity, the most common indicator, the capacity of the hard disk directly determines how much data can be stored
  • IOPs (input / output operations per second) refers to the number of read-write operations per second. IOPs can be further divided into random read-write IOPs and sequential read-write IOPs

The following is a list of common HDD disk IOPs. The data source is Wikipedia

equipment speed IOPS.
7200 RPM SATA hard drive 7200RPM/S 75~100 IOPS
10000 RPM SATA hard drive 10000RPM/S 125~150 IOPS
10000 RPM SAS hard drive 10000RPM/S ~140 IOPS
15000 RPM SAS hard drive 15000RPM/S ~175-210 IOPS

The speed of mechanical disks used by individual users is basically 5400rpm / S (mainstream notebook computers) and 7200rpm / S (mainstream desktop computers)
It can be seen that the IOPs of HDD is basically positively related to the rotation speed. In fact, the rotation speed directly determines the rotation delay. Those interested can search the mechanical hard disk to read data by themselves

The following is a list of common SSD IOPs, which are basically enterprise level. The data source is Wikipedia

equipment form IOPS.
Intel X25-M G2(MLC) SSD ~8,600 IOPS
Intel X25-E (SLC) SSD ~5,000 IOPS
G.Skill Phoenix Pro SSD ~20,000 IOPS
OCZ Vertex 3 SSD Up to 60000 IOPs
Corsair Force Series GT SSD Up to 85000 IOPs

There are great differences between SSD and HDD in the way of addressing data at the bottom. You can see IOPs. SSD is basically a rolling dimensionality reduction blow compared with HDD. At present, the advantages of HDD compared with SSD are basically only the capacity and the stability of long-term data preservation

Recommended Today

Java Engineer Interview Questions

The content covers: Java, mybatis, zookeeper, Dubbo, elasticsearch, memcached, redis, mysql, spring, spring boot, springcloud, rabbitmq, Kafka, Linux, etcMybatis interview questions1. What is mybatis?1. Mybatis is a semi ORM (object relational mapping) framework. It encapsulates JDBC internally. During development, you only need to pay attention to the SQL statement itself, and you don’t need to […]