Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux Cloud Computing architect growth path-Chapter 1 computer hardware fundamentals-1.4 Server main components

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1.4 main components of the server

1) Power supply

In production, the general core business uses dual power supply, dual-wire power supply (AB road: pull cables from different places to the computer room). If it is a cluster, dual power supply can be used.

Electric meter picture: the picture to be inserted here

2) CPU

Responsible for operation and control, is the most important part of server performance and efficiency. Common brands: Intel, AMD

General enterprise servers: the number of CPU is 2-4, a single CPU 4 core, the total memory is generally 16G-256G (32G ~ 64G).

Virtual host: the number of CPU is 4-8, and the total memory is generally 48-128G-6-10 virtual machines.

3) memory

Buffer device between CPU and disk, temporary memory. Generally, a program is scheduled to be executed in memory when it is running, and is automatically released from memory after the server is shut down, restarted, or the program is closed.

Process: a running program in which the system executes the program in memory.

Daemon: a program that keeps running continuously.

Programs: C/PHP/Java, code files, static, data on disk.

Enterprise case:

1. Extreme cases of portals: cases of large concurrent writes (snatching red packets, Weibo)

High concurrency, large amount of data to write data: the data will be first written to memory, reaching a certain amount, and then regularly or quantitatively written to disk (reducing IO), and will eventually be loaded into memory to provide external access.

Features:

An advantages: write data to memory, high performance and high speed (Weibo, Wechat, SNS, seconds kill).

Taobao should prepare for the second kill for at least 2-3 months, put the external second kill data into the server memory of the computer room across the country through the program, and let users in Beijing access the computer room in Beijing and users in Shanghai access the computer room in Shanghai.

B disadvantage: you may lose some data in memory that you haven't had time to write to disk.

Solution:

(1) the battery (which should refer to the battery on the array card) is installed on the server motherboard to write the data in memory to disk at the moment of power outage (the array card must enable write-back policy). This point still needs to be understood.

(2) uninterrupted power supply for UPS (power supply lasts for 10 minutes, and it is said that UPS can usually supply power for more than 1 hour in IDC computer room).

(3) choose the computer room with two-way electricity, and use double power sources to connect different ways of electricity.

two。 Large, small and medium-sized enterprise case: the concurrency is not very large, the data is not very large website, read more and write less business, first write the data to the disk, and then read the data into memory through the program, and then provide access services by reading memory.

Remember one sentence: cache is everywhere!

3. What's the difference between buffer and cache?

Data is written to memory, and the memory space for this data is called a buffer.

Data is read from memory, and the memory space of this data is called cache.

Since 99% of websites are read-oriented, write-dominated, and the read-write ratio is at least 10:1, concurrent writes are not a problem.

Reminder: the memory and disk mentioned here is a cluster architecture environment composed of multiple machines: memcached (pure memory) / redis (memory plus disk).

4) disk

A memory that permanently stores data, and there is also a cache on the disk.

The read and write performance of the commonly used 3.5in mechanical hard disk (IDE, SATA, SAS) is much worse than that of memory, so at work, we will cache a large amount of data into memory and write buffer, which is a necessary solution for today's Internet websites.

Disk interface types: IDE, SCSI, SATA, SAS, SSD,IDE, SCSI have retired from history.

Performance and price: SSD > SAS > SATA

Enterprise applications: (must choose enterprise hard disk, suitable for 7 X 24-hour uninterrupted access)

1 SAS hard disk is selected for regular formal work scenarios (speed 10000RPM or 15000RPM, mechanical hard disk with high rotation speed and good performance).

2 servers that do not provide external access, such as offline backup servers, you can choose SATA (7200RPM or 10000RPM). SATA hard disk features: large capacity, low price, but slow speed.

(3) High concurrent access, a small amount of data, you can choose SSD.

Taobao enterprise case: the server will combine SATA and SSD, hot storage, program dynamic scheduling (according to the frequency of data access to move data between SSD and SATA).

Summary: corporate websites try to let users read data from memory instead of hard drives. The website optimization, server optimization and software optimization of almost all enterprise operation and peacekeeping architects are the optimization of the proportion of disk and memory usage.

5) Array cards (RAID cards), RAID: redundant disk arrays

Basic function: the website has a large amount of data, which cannot be installed on a single disk. If you have multiple disks and do not want multiple disks to store data, you need tools to integrate all the hard disks into one large disk, and then partition the data on this large disk (virtual disk). And there can be redundancy (backup) when multiple disks are put together.

RAID can be integrated in a variety of ways: RAID 0150 # 1 (1: 0): these are the most commonly used, and the others are RAID 6 (not necessary). With the raid card, the general disk will be connected to the raid card, not to the motherboard.

Representative picture:

1. DELL-H730P_Mini-2G- rack server array card

2. DELL-H730P_ big card-2G-tower server array card

RAID 0 features: virtual disk capacity = single disk capacity * number of disks (N). The number of disks can be 1 or N (depending on the array card), no capacity loss, fast read and write speed, but easy to lose data without redundancy (N disks are made into RAID 0, as long as one disk is damaged, all data is lost). Used in more extreme situations (the data is not important at all).

RAID 1 features: can only be two disks, two disk capacity can be different, virtual disk capacity = single disk capacity (or less disk capacity). The speed is about the same as that of a single disk, and the data is redundant (the data of the two disks are exactly the same).

RAID 5 features: at least 3 disks, virtual disk capacity = single disk capacity * (NMUI 1), loss of one hard disk capacity. Read and write performance is average, between RAID 0 and RAID 1. Allow damage to a disk so that data is not lost.

RAID 1 disk 0, RAID 0 disk 1: at least 4 fast disks, virtual disk capacity = single disk capacity * Nbank 2, capacity loss is also half.

Redundancy from good to bad: RAID 1, RAID 1, raid 0, raid 0, raid 5, raid 0

Performance from good to bad: RAID 0rem raid 1mm 0, RAID 0m 1re raid 5je raid 1

The cost is from low to high: RAID 01.raid 5jpg raid 1jpg raid 1mm 0, RAID 0mm 1

Note: there is a difference between RAID 1 # 0 and RAID 0 # 1. RAID 1: 0 is more redundant.

Examples of enterprise applications with different RAID levels: select RAID according to data storage and access requirements

1. Internet companies:

A single server, very important, not many disks, RAID 1 for system disks

B database server, the main library RAID 1: 0 (because the main library is important and difficult to expand and backup)

From the library RAID 5/RAID 0 (if there is no shortage of money, use RAID 1: 0)

C WEB server, if the amount of data is not large, you can choose RAID 5 or RAID 0 (single disk)

D Monitoring / Application Server, RAID 0 or RAID 5

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report