Generally, we can easily observe the memory and CPU pressure on the database server. However, there is no intuitive way to determine the I/O pressure. A disk has two important parameters: Seek time,Rotational latency. NormalI/OCount: ① 1000/(seek time + rotational latency) * 0.75 . When 85 % I/O I/O bottle strength. Theoretically, the random read count of a disk is 125 the sequential read count is 225 . Data files are read and written randomly, while log files are read and written sequentially. Therefore, it is recommended that data files be stored in RAID5 raid10 or raid1 .
The following assumptions are as follows:4Block Hard DiskRAID5ThePhysical DiskPerformance object score:
AVG. Disk queue length 12
AVG. Disk SEC/read. 035
AVG. Disk SEC/write. 045
Disk reads/sec 320
Disk writes/sec 100
AVG. Disk queue length, 12/4 = 3. We recommend that the average queue of each disk not exceed 2.
AVG. Disk SEC/read should not exceed 11 ~ 15 ms.
AVG. Disk SEC/write is generally recommended to be less than 12 ms.
From the above results, we can see that the I/O capability of the disk meets our requirements, because a large number of requests lead to queue waiting, this is probably because your SQL statement causes a large number of table scans. After optimization, if you still cannot meet the requirements, the following formula can help you calculate and use several hard disks to meet the concurrency requirements:
RAID 0 -- I/OS per disk = (reads + writes)/number of disks
Raid 1 -- I/OS per disk = [reads + (2 * writes)]/2
RAID 5 -- I/OS per disk = [reads + (4 * writes)]/number of disks
Raid 10 -- I/OS per disk = [reads + (2 * writes)]/number of disks
The result is: (320 + 400)/4 = 180.① To obtain the normal I/O value of the disk. Assuming that the normal I/O count is 125 now, in order to achieve this result: 720/125 = 5.76. That is to say, it takes six disks to meet this requirement.
HoweverDisk reads/sec and disk writes/sec are hard to correctly estimate values. Therefore, an average value can be estimated only when the system is busy, which serves as the basis for the calculation formula. The other is that it is hard for you to getSeek time,Rotational latencyParameter value, which can only use the theoretical value125.