System parameter determination method and device, electronic equipment and storage medium

By determining software to collect and adjust operating system parameters through preset parameters, optimizing disk performance based on disk topology, solving performance problems caused by the inability to accurately determine system parameters in the existing technology, and achieving more efficient disk performance and system performance improvements.

CN119088308AActive Publication Date: 2024-12-06INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411204629.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

The existing technology cannot accurately and effectively determine system parameters, resulting in the inability to effectively optimize disk performance. Manually adjusting parameters requires professional knowledge and unstable results, the hardware upgrade cost is high and the effect is limited by hardware performance.

Method used

Determine the system parameters of the software to collect the target operating system through preset parameters, determine the disk topology of the logical disk, and automatically adjust the system parameters based on the disk information to ensure the accuracy and consistency of parameter values ​​and optimize disk performance.

Benefits of technology

It improves disk performance, reduces latency, improves the overall performance of the system, and solves the problems of manual parameter adjustment and high hardware upgrade costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088308A_ABST
    Figure CN119088308A_ABST
Patent Text Reader

Abstract

The invention provides a system parameter determination method and device, electronic equipment and a storage medium, and relates to the technical field of disk optimizing.The method comprises the steps that system parameters on a target operating system are collected, the disk topology of at least one logic disk used by the target operating system is determined, and the system parameters are determined on the basis of the disk topology; and determining a target parameter value of each system parameter corresponding to the logic disk so as to complete performance optimization of the logic disk. Through the method and the device, the technical problem that the disk performance cannot be effectively optimized due to the fact that the parameter values of the system parameters cannot be accurately and effectively determined in related technologies is solved, and the effect of improving the disk performance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of disk optimization, and in particular to a method for determining system parameters and a device thereof, an electronic device, and a storage medium. Background Art

[0002] With the continuous development of information technology, the amount of data has exploded. As the main device for data storage and access, disks have become a key factor affecting the overall performance of the system. The performance of disks not only affects the speed of reading and writing data, but is also directly related to the response time and work efficiency of the entire system.

[0003] Disk performance is affected by many factors. For example, at the hardware level, there are factors such as disk media, rotation speed, PCIE (Peripheral Component Interconnect Express, a high-speed serial bus) link, etc.; at the software level, there are factors such as BIOS (Basic Input / Output System, a basic input / output system) settings, file system, Block layer (block device layer, that is, the subsystem in the system kernel responsible for managing block devices), SCSI layer (Small Computer System Interface, that is, small computer system interface), host adapter (such as RAID (Redundant Array of Independent Disks) card) configuration, etc.

[0004] Currently, the Linux system (an operating system) provides a variety of parameter configurations that can optimize disk performance. In related technologies, operation and maintenance personnel or system administrators can manually adjust relevant parameters based on experience or general optimal parameter solutions, or improve disk performance through hardware upgrades, such as replacing faster disks.

[0005] However, manual parameter adjustment is difficult to take into account all factors and cannot achieve optimal performance. In addition, there are many disk performance parameters under the Linux system, and they affect each other. Manual parameter adjustment requires professional knowledge and rich experience, which often leads to poor and unstable results. Hardware upgrades are not only costly, but also limited by the performance of the hardware itself. Changes in the hardware environment or application requirements may make the original configuration no longer applicable and need to be readjusted.

[0006] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0007] The embodiments of the present application provide a method for determining system parameters and its device, electronic device and storage medium, so as to at least solve the technical problem in the related art that the parameter values ​​of the system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize the disk performance.

[0008] According to an embodiment of the present application, a method for determining system parameters is provided, which is applied to preset parameter determination software, including: collecting system parameters on a target operating system; determining a disk topology of at least one logical disk used by the target operating system, wherein the disk topology describes the physical and logical layout of the disk on the target operating system; based on the disk topology, determining a target parameter value for each of the system parameters corresponding to the logical disk, wherein the target parameter value is used to guide the configuration of the system parameters on the target operating system to achieve performance optimization of the logical disk.

[0009] Furthermore, the preset parameter determination software runs on the user space of the target operating system and collects system parameters on the target operating system, including: using a preset file system to export the kernel parameters of the target operating system to the user space; collecting layer parameters at the adapter level, system level, and basic input and output system level; and representing the kernel parameters and the layer parameters as the system parameters.

[0010] Furthermore, before collecting the system parameters on the target operating system, it also includes: determining whether the user account that logs into the target operating system has preset permissions; if the user account does not have the preset permissions, adding prompt information to the print information; if the user account has the preset permissions, initializing the log module, wherein the log module is used to record the logs generated during the determination process of the system parameters.

[0011] Furthermore, before determining the target parameter value of each of the system parameters corresponding to the logical disk based on the disk topology, it also includes: obtaining the disk information of each of the logical disks based on the disk topology of each of the logical disks; traversing all the logical disks, and for each of the logical disks, assembling the first parameter directory of the device driver layer based on the disk information, and assembling the second parameter directory of the intermediate layer based on the disk information; determining the first type of parameters involved in the device driver layer based on the system parameters, and placing the first type of parameters into the first parameter directory; determining the second type of parameters involved in the intermediate layer based on the system parameters, and placing the second type of parameters into the second parameter directory.

[0012] Further, based on the disk topology, the step of determining the target parameter value of each system parameter corresponding to the logical disk includes: reading a first preset parameter set from the first type of parameters under the first parameter directory; judging whether the current parameter value of each first preset parameter in the first preset parameter set is correct based on the disk information; in the case where the current parameter value of the first preset parameter is incorrect, modifying the current parameter value of the first preset parameter to the target parameter value or adding the target parameter value of the first preset parameter to the print information based on the disk information; reading a second preset parameter set from the second type of parameters under the second parameter directory; judging whether the current parameter value of each second preset parameter in the second preset parameter set is correct based on the disk information; in the case where the current parameter value of the second preset parameter is incorrect, modifying the current parameter value of the second preset parameter to the target parameter value or adding the target parameter value of the second preset parameter to the print information based on the disk information; and determining the target parameter value of each third preset parameter in a third preset parameter set at the adapter level, the system level, and the basic input and output system level based on the disk information.

[0013] Furthermore, before determining the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input / output system level based on the disk information, it also includes: controlling the background task of the host adapter to be closed; controlling the read cache of the logical disk to be closed, and controlling the cache startup of the physical disk under the logical disk.

[0014] Furthermore, based on the disk information, the step of determining the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level includes: determining the write cache mode of the write cache attribute based on the disk media type contained in the disk information; setting the target operating system to throughput mode, and setting the additional data volume parameter value to a preset value; setting the data load parameter value and the read request parameter value of the extended bus standard to the maximum values ​​respectively; and when the target operating system is running on a preset platform, setting the slot node number parameter value to a preset number of nodes for each CPU slot.

[0015] According to another embodiment of the present application, a system parameter determination device is provided, which is applied to preset parameter determination software, including: a collection unit, used to collect system parameters on a target operating system; a first determination unit, used to determine the disk topology of at least one logical disk used by the target operating system, wherein the disk topology describes the physical and logical layout of the disk on the target operating system; and a second determination unit, used to determine, based on the disk topology, a target parameter value of each of the system parameters corresponding to the logical disk, wherein the target parameter value is used to guide the configuration of the system parameters on the target operating system to achieve performance optimization of the logical disk.

[0016] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned system parameter determination methods.

[0017] According to another aspect of an embodiment of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned methods for determining the system parameters.

[0018] In the present application, the preset parameter determination software can collect system parameters on the target operating system, determine the disk topology of at least one logical disk used by the target operating system, and based on the disk topology, determine the target parameter value of each system parameter corresponding to the logical disk to complete the performance optimization of the logical disk, thereby solving the technical problem in the related technology that the parameter values ​​of the system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize the disk performance.

[0019] Through this application, the system parameters on the target operating system can be collected and the target operating system parameters can be comprehensively checked. The system parameters can be judged whether they are correct based on the disk information of all logical disks, and incorrect system parameters can be modified. This effectively solves the technical problem that the parameter values ​​of the system parameters cannot be accurately and effectively determined in the related technology, resulting in the inability to effectively optimize the disk performance. This achieves the effect of improving the performance of the logical disk, thereby improving the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for determining a system parameter according to an embodiment of the present application;

[0021] Figure 2 is a flowchart of an optional method for determining system parameters according to an embodiment of the present application;

[0022] Figure 3 is a schematic diagram of determining a software structure according to an optional preset parameter of an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of an optional process for optimizing system parameters according to an embodiment of the present invention;

[0024] Figure 5 It is a structural block diagram of an optional system parameter determination device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0027] The method for determining system parameters provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for determining system parameters in an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for determining a system parameter in an embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] Embodiment 1

[0031] In this embodiment, a method for determining system parameters running on the above mobile terminal is provided. Figure 2 is a flow chart of an optional method for determining system parameters according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0032] Step S201, collecting system parameters on the target operating system.

[0033] Optionally, preset parameters may be used to determine the system parameters on the target operating system (such as the Linux system) of the software acquisition, so as to automatically optimize unreasonable parameters by checking these system parameters to achieve optimal disk performance.

[0034] It should be noted that the preset parameter determination software is a pre-built application software running under the target operating system. The software can perform a comprehensive check on system parameters to automatically optimize unreasonable parameters for different disk topologies to achieve optimal disk performance.

[0035] In the embodiment of the present invention, the system parameters are parameters on the operating system, including system kernel parameters and user space parameters, such as host adapter level parameters, system level parameters, and basic input and output system level parameters.

[0036] Step S202: determine a disk topology of at least one logical disk used by the target operating system, wherein the disk topology describes the physical and logical layout of the disk on the target operating system.

[0037] Optionally, the preset parameters can be used to determine the software to analyze the logical disks used by the target operating system, thereby determining the disk topology corresponding to each logical disk. It should be noted that the disk topology can describe the physical and logical layout of the disk on the target operating system, indicating the number of physical disks contained in the logical disk, and the connection method of each physical disk.

[0038] In the embodiment of the present invention, a logical disk is a virtual storage unit created on a physical hard disk. A logical storage space is formed by dividing partitions on the physical hard disk. Each logical disk is usually assigned a drive letter (such as "C:", "D:", etc.) to facilitate access and management by the operating system and users. In addition, each logical disk corresponds to a disk topology. The disk topology describes the physical and logical layout of the disk, involving multiple aspects such as the internal components of the disk, the data storage method, and the data access path, including the physical structure of the disk (such as the head, track, sector, etc.) and how the target operating system maps these physical structures to the logical structure (such as partitions, volumes, etc.).

[0039] In this way, by determining the disk topology of at least one logical disk used by the target operating system, it can help the system optimize the data access path and reduce data access latency. For example, in a RAID configuration, knowing how the disks work (such as working in parallel) can more efficiently allocate read and write tasks, thereby improving overall performance.

[0040] Step S203, based on the disk topology, determine the target parameter value of each system parameter corresponding to the logical disk, wherein the target parameter value is used to guide the configuration of the system parameters on the target operating system to optimize the performance of the logical disk.

[0041] Optionally, preset parameter determination software can be used to automatically obtain the disk information (such as disk media) of each logical disk based on the disk topology of each logical disk, and then determine the target parameter value (such as disk rotation property value) of each system parameter corresponding to each logical disk based on the disk information of each logical disk, and use the target parameter value to configure the corresponding system parameters on the target operating system to complete the performance optimization of the logical disk.

[0042] Exemplarily, the system parameter disk rotation attribute value is read, and whether the disk rotation attribute value is correct is determined based on the disk medium. If the disk medium is a mechanical hard disk and the rotation attribute value is 1, or the disk medium is a solid-state hard disk and the rotation attribute value is 0, then the parameter value is considered correct. Otherwise, the rotation attribute value is modified according to the disk medium. By determining the target parameter value of each system parameter corresponding to the logical disk, the performance optimization of the logical disk is completed.

[0043] Through the above steps, the target operating system parameters can be collected, and the disk topology of at least one logical disk used by the target operating system can be determined. The unreasonable parameters can be automatically optimized for different disk topologies, which solves the technical problem that the parameter values ​​of the system parameters cannot be accurately and effectively determined in the related technology, resulting in the inability to effectively optimize the disk performance. The disk read and write speed is improved, the delay is reduced, and the operation efficiency of the entire system is improved.

[0044] The execution subject of the above steps may be a server, a terminal, etc., but is not limited thereto.

[0045] The execution order of step S201 and step S202 is interchangeable, that is, step S202 may be executed first, and then step S201.

[0046] In summary, the preset parameter determination software can automatically collect system parameters on the target operating system and determine the disk topology of at least one logical disk used by the target operating system. Then, based on the disk topology of the logical disk, the target parameter value of each system parameter corresponding to the logical disk is determined to complete the performance optimization of the logical disk, thereby solving the technical problem in the related technology that the parameter values ​​of the system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize the disk performance, and effectively improving the disk performance.

[0047] In order to collect system parameters more accurately, in the system parameter determination method provided in Example 1 of the present application, a preset file system is used to export the kernel parameters of the target operating system to the user space; layer parameters at the adapter level, system level, and basic input and output system level are collected; and the kernel parameters and layer parameters are used to represent the system parameters.

[0048] Optionally, a preset file system can be used to export the kernel parameters of the target operating system to the user space (i.e., a space interface that can be operated by users), so that users and applications can view and modify the kernel parameters, and then the user space level parameters such as the adapter level (i.e., the device connecting the computer and the disk), the system level, and the basic input / output system (i.e., BIOS (Basic Input / Output System) level) can be collected to obtain all system parameters for optimizing disk performance on the target operating system.

[0049] In this embodiment, the kernel parameters may include: Block layer (ie, a layer in the operating system used to manage block devices) parameters and SCSI layer (ie, a layer used to connect computers and other devices) parameters.

[0050] In an embodiment of the present invention, the preset file system (i.e., a method used by the operating system to store and organize files) can be a sysfs (System File System, i.e., a virtual file system provided by the Linux kernel) virtual file system, which is used to provide information about system hardware devices and drivers to the user space. The sysfs virtual file system enables kernel parameters to be configured and adjusted through the user space.

[0051] In the embodiment of the present invention, the Block layer is located between the file system and the device driver, and is used to process the splitting, merging and scheduling of I / O (Input / Output). The SCSI layer interacts directly with the device. The SCSI upper layer is the disk driver, the SCSI bottom layer is the host adapter driver, and the SCSI middle layer is the public layer. Both the SCSI middle layer and the bottom layer have rich parameters (such as queue_depth).

[0052] In order to ensure that the user has the operating authority, in the method for determining system parameters provided in Example 1 of the present application, before collecting the system parameters on the target operating system, it can be determined whether the user account that logs into the target operating system has the preset authority; if the user account does not have the preset authority, a prompt message is added to the print information; if the user account has the preset authority, the log module is initialized, wherein the log module is used to record the logs generated during the determination process of the system parameters.

[0053] Optionally, it is possible to first determine whether the user account that logs into the target operating system has preset permissions. For example, by calling the geteuid() function, it is possible to determine whether the user account that logs into the target operating system has preset permissions. If the function return value is 0, it means that the user account has preset permissions. If the user account has preset permissions, the log module can be initialized (for example, according to the usage scenario, the log output color is set). The log module is used to record the logs generated during the determination of system parameters, so as to facilitate the subsequent tracing of the process of adjusting parameters. If the function return value is not 0, it means that the user account does not have preset permissions. If the user account does not have preset permissions, a prompt message is added to the print information to remind the current user that he does not have relevant operation permissions.

[0054] In an embodiment of the present invention, the preset permission may be root permission, that is, the only super user permission in the system, which has all permissions in the system, for example, starting or stopping a process, deleting or adding users, adding or disabling hardware, etc.

[0055] In order to more accurately determine the first category parameters and the second category parameters, in the method for determining system parameters provided in Example 1 of the present application, before determining the target parameter value of each system parameter corresponding to the logical disk based on the disk topology, the disk information of each logical disk can be obtained based on the disk topology of each logical disk; all logical disks are traversed, and for each logical disk, a first parameter directory of the device driver layer is assembled based on the disk information, and a second parameter directory of the intermediate layer is assembled based on the disk information; based on the system parameters, the first category parameters involved in the device driver layer are determined, and the first category parameters are placed in the first parameter directory; based on the system parameters, the second category parameters involved in the intermediate layer are determined, and the second category parameters are placed in the second parameter directory.

[0056] Optionally, according to the disk topology of each logical disk, the client tool of the host adapter can be used to obtain the disk information of all logical disks under the target operating system, and then the disk information of all logical disks can be traversed, and the first parameter directory of the device driver layer (such as the SCSI layer of the Linux operating system) and the second parameter directory of the middle layer (such as the Block layer of the Linux operating system) can be assembled according to the disk information. After that, according to the system parameters, the first type of parameters involved in the device driver layer and the second type of parameters involved in the middle layer are determined, and the first type of parameters are placed in the first parameter directory, and the second type of parameters are placed in the second parameter directory, so as to facilitate the subsequent reading of the corresponding parameters and adjust the parameters, which is conducive to the improvement of optimization efficiency.

[0057] It should be noted that the disk information includes but is not limited to: drive letter, RAID level, disk interface, disk medium, etc.

[0058] In an embodiment of the present invention, RAID levels may include RAID0 (i.e., using data striping to store data in a dispersed manner on multiple disk drives without redundant backup), RAID1 (i.e., using data mirroring to completely copy data to two or more disk drives), RAID5 (i.e., using data striping to store data in a dispersed manner on multiple disk drives, and achieving redundant backup of data through distributed parity), etc.; the interface of the disk may include SATA (Serial ATA, i.e., a computer bus for connecting a motherboard and a storage device), SAS (Serial Attached SCSI, i.e., a high-performance data storage interface for connecting a storage device and a server), NVME (Non-Volatile Memory Express, i.e., a logical device interface specification), etc.

[0059] In an embodiment of the present invention, the first type of parameters may include SCSI upper layer parameters, SCSI lower layer parameters and SCSI middle layer parameters, for example, the queue_depth parameter. The queue_depth parameter determines the maximum number of I / Os that can be transmitted to the disk and needs to be adjusted according to the actual disk interface and the actual number of physical disks. The second type of parameters may include parameters such as the scheduling algorithm, the I / O maximum data limit, and the pre-read size. The scheduling algorithm can control the execution order of the requests. The I / O maximum data limit defines the maximum allowed size of a single I / O request. The pre-read size indicates the amount of data (in kilobytes) that the kernel will pre-read during a sequential read operation. The default value is 128. The first type of parameters and the second type of parameters are placed in the first parameter directory and the second parameter directory, respectively.

[0060] For example, traverse the logical disks, intercept the drive letter of each logical disk, record it as sdx, assemble the parameter directory of the SCSI layer as: / sys / block / sdx / device / , read the first-class parameters such as the disk state (state), disk busyness (device_busy), and whether the disk is blocked (device_blocked) from this directory, and print these parameters to show the user the basic information of the disk. In addition, the parameter directory of the Block layer can be assembled as: / sys / block / sdx / queue / , and read the second-class parameters such as the rotational attribute (rotational) of the disk from this directory.

[0061] In order to obtain the correct target parameter value, in the method for determining the system parameters provided in the first embodiment of the present application, a first preset parameter set is read from the first category of parameters under the first parameter directory; based on the disk information, whether the current parameter value of each first preset parameter in the first preset parameter set is correct is determined; if the current parameter value of the first preset parameter is incorrect, based on the disk information, the current parameter value of the first preset parameter is modified to the target parameter value or the target parameter value of the first preset parameter is added to the printing information; a second preset parameter set is read from the second category of parameters under the second parameter directory; based on the disk information, whether the current parameter value of each second preset parameter in the second preset parameter set is correct is determined; if the current parameter value of the second preset parameter is incorrect, based on the disk information, the current parameter value of the second preset parameter is modified to the target parameter value or the target parameter value of the second preset parameter is added to the printing information; based on the disk information, the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level is determined.

[0062] Optionally, the first parameter directory is a parameter directory of the SCSI layer, and a first preset parameter set (i.e., SCSI layer parameters related to disk performance) is read from the first category of parameters under the first parameter directory; the second parameter directory is a parameter directory of the Block layer, and a second preset parameter set (i.e., Block layer parameters related to disk performance) is read from the second category of parameters under the second parameter directory; then, based on the disk information obtained by traversal, whether the current parameter value of each first preset parameter in the first preset parameter set is correct is analyzed and determined; if the current parameter value of the first preset parameter is incorrect, the current parameter value of the first preset parameter is modified to a target parameter value, or the target parameter value is added to the print information (i.e., information printed out by the terminal and displayed to the user); at the same time, whether the current parameter value of each second preset parameter in the second preset parameter set is correct can be analyzed and determined; if the current parameter value of the second preset parameter is incorrect, the current parameter value of the second preset parameter is modified to a target parameter value, or the target parameter value is added to the print information (i.e., if the parameter value of the parameter can be directly adjusted on the operating system, it is automatically adjusted to the target parameter value; otherwise, the target parameter value to which the parameter should be adjusted is printed to suggest that the user adjust it manually). In this way, the target parameter value of each system parameter is automatically determined, which can improve disk performance.

[0063] Exemplarily, the processor affinity attribute (rq_affinity) of the I / O is read in the first category of parameters under the first parameter directory, where the rq_affinit value is 0, indicating that affinity is not set; the value is 1, indicating that the completion request is processed by any processor in the group of the processor sending the request; the value is 2, indicating that the completion request is processed by the processor sending the request. Therefore, when the value is 2, the processor processing efficiency is higher. If the processor affinity attribute value of the read I / O is not 2, the processor affinity attribute value of the read I / O is directly modified to 2 to improve data processing efficiency and optimize disk performance.

[0064] In an embodiment of the present invention, the third preset parameter may include adapter-level parameters, system-level parameters, and basic input / output system-level parameters, and the target parameter value of each third preset parameter may be determined based on the disk information. For example, when creating a RAID at the adapter level, the appropriate stripe size and cache strategy may be selected based on the RAID card function and disk media to improve the read / write performance and fault tolerance of the RAID card; the target parameter value at the Linux system level may be modified (such as shutting down interrupts) based on the actual tasks to be processed by the operating system; the most important setting at the BIOS level is in the PCIE link, and the parameters involved are MPS (Max Payload Size, i.e., the maximum value of the effective payload carried in a TLP packet (Transaction Layer Packets, i.e., the transaction layer data packet)) and MRRS (Max Read Request Size, i.e., how many bytes a TLP read request packet can request to read from the receiving end at most at one time). Since the BIOS parameters cannot be modified under the system, it is necessary to print the recommended values ​​of the parameters to be modified.

[0065] In an optional embodiment, based on the disk information of the logical disk, the attribute value corresponding to each disk attribute of the logical disk is determined, and for each attribute value, a parameter correspondence table is established, and the parameter correspondence table is used to record the target parameter values ​​of various preset parameters (including: first preset parameter, second preset parameter, third preset parameter) corresponding to each attribute value, so that the preset parameter determination software can automatically determine whether the current parameter value of the preset parameter is correct based on the parameter correspondence table, and adjust it to the correct target parameter value if the current parameter value is incorrect.

[0066] For example, the parameter correspondence table records that when the disk medium is HDD (i.e., mechanical hard disk) medium, the target parameter value of the elevator algorithm attribute is mq-deadline; when the disk medium is SSD (i.e., solid-state drive) medium, the target parameter value of the elevator algorithm attribute is none.

[0067] Exemplarily, the elevator algorithm attribute parameters are read from the first category of parameters under the first parameter directory, and whether the current parameter values ​​of the elevator algorithm attribute parameters are correct is determined based on the parameter correspondence table and the disk medium in the disk information; if the current parameter values ​​of the elevator algorithm attribute parameters are incorrect, the current parameter values ​​of the elevator algorithm attribute parameters are modified to the target parameter values ​​corresponding to the disk medium.

[0068] Another exemplary embodiment is to read the nr_requests parameter from the first type of parameters under the first parameter directory, and read the queue_depth parameter from the second type of parameters under the second parameter directory; adjust the value of queue_depth according to the parameter correspondence table, the disk interface type in the disk information, and the RAID level; if the logical disk is RAID0 and consists of N physical disks, the value of queue_depth is N*QD (i.e., the value of queue_depth); if the value of queue_depth exceeds nr_requests, the value of queue_depth is nr_requests; if the logical disk is RAID5 and consists of N physical disks, the value of queue_depth is (N-1)*QD; if the value of queue_depth exceeds nr_requests, the value of queue_depth is nr_requests.

[0069] In this way, according to the parameter correspondence table and the actual attribute information of the logical disk, the parameter value of each system parameter can be automatically adjusted, thereby achieving the optimal setting of the disk performance.

[0070] In order to determine the target parameter value more accurately, in the method for determining system parameters provided in the first embodiment of the present application, before determining the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level based on the disk information, the background task of the host adapter can be controlled to be closed; the read cache of the logical disk can be controlled to be closed, and the cache of the physical disk under the logical disk can be controlled to be started.

[0071] Optionally, the background tasks of the host adapter (such as data consistency check, patrol read, etc.) can be turned off to avoid interference from background tasks, which may result in the inability to accurately determine parameter values. The read cache of the logical disk can be turned off to reduce unnecessary cache operations and improve the overall response speed of the system. The data read and write rate can be increased by turning on the cache of the physical disk under the logical disk. This makes it easier to determine the parameter value more accurately later.

[0072] In the embodiment of the present invention, closing the background task can reduce the occupation of I / O, CPU and memory resources, thereby allowing the target operating system to focus on the current operation.

[0073] In order to improve the accuracy of the target parameter values, in the method for determining the system parameters provided in Example 1 of the present application, the write cache mode of the write cache attribute is determined based on the disk media type contained in the disk information; the target operating system is set to the throughput mode, and the additional data volume parameter value is set to a preset value; the data load parameter value and the read request parameter value of the extended bus standard are set to the maximum values ​​respectively; when the target operating system is running on a preset platform, the slot node number parameter value is set to a preset number of nodes for each CPU slot.

[0074] Optionally, the disk information may include the disk medium type, and the write cache mode of the write cache attribute is determined according to the disk medium type. For example, the mechanical hard disk is set to the WB (Write Back) mode, and the solid-state hard disk is set to the WT (Write Through) mode. Then, the target operating system may be set to the throughput mode (i.e., the amount of data or the number of transactions that the target operating system can process per unit time), and the additional data volume parameter value may be set to a preset value (e.g., the read_ahead_kb parameter under the first parameter directory is set to 4096). For example, by using the command "tuned-adm profile throughput-performance" to set the system to the performance mode, and at the same time setting the read_ahead_kb parameter under the parameter directory of the SCSI layer to 4096, it is beneficial to improve the performance of sequential reads.

[0075] After that, the data load parameter value and the read request parameter value of the extended bus standard can be set to the maximum values ​​supported (i.e., the MPS and MRRS of PCIE at the BIOS level can be set to the maximum values ​​supported as much as possible). In addition, when the target operating system runs on a preset platform (e.g., AMD (Advanced Micro Devices)), the slot node number parameter value can be set to a preset number of nodes per CPU slot.

[0076] Exemplarily, when the target operating system runs on an AMD platform, the socket node number parameter value is set to NPS4 (Nodes Per Socket, a configuration option in AMD processors). NPS4 allows each CPU socket to be divided into four independent nodes.

[0077] In this way, disk performance can be further optimized by adjusting adapter-level parameters, system-level parameters, and BIOS-level parameters based on specific processor types.

[0078] Figure 3 is a schematic diagram of determining a software structure according to an optional preset parameter of an embodiment of the present application, such as Figure 3As shown, it includes: a hardware identification module, a SCSI parameter reading module, a Block parameter reading module, a system setting module, a controller setting module, a parameter optimization module, a log output module, and a BIOS parameter prompt module.

[0079] exist Figure 3 In the hardware identification module, the hardware type can be identified, for example, disk media type, RAID type, processor type, etc., so that when creating a RAID strategy, the appropriate stripe size and cache strategy can be selected according to the RAID type, disk media, etc., to improve the read and write performance and fault tolerance of the RAID card, thereby optimizing disk performance.

[0080] The SCSI parameter reading module is used to read the parameters of the SCSI layer. The SCSI layer is the device driver layer that interacts directly with the device. The SCSI upper layer is the disk driver, the SCSI bottom layer is the host adapter driver, and the SCSI middle layer is the public layer. Both the SCSI middle layer and the bottom layer can export rich parameters, such as the queue_depth parameter, which determines the maximum number of I / Os passed to the disk and needs to be adjusted according to the actual disk interface and the actual number of physical disks.

[0081] The Block parameter reading module is used to read the parameters of the Block layer. The Block layer is located between the file system and the device driver. It is a link between the upper and lower parts of the disk I / O link and is used to process the splitting, merging and scheduling of I / O. The parameters of the Block layer, such as the scheduling algorithm, the maximum I / O data limit, and the pre-reading parameters, all have an impact on the I / O performance. Therefore, these parameters need to be read to optimize the disk performance.

[0082] The system settings module is used to perform system-level settings. For example, the Linux system level can be optimized according to the actual tasks to be processed by the operating system, such as disabling interrupts for certain tasks and setting the operating system's performance mode to throughput mode.

[0083] The controller setting module is used to perform settings at the adapter level. For example, during performance testing, the controller controls the adapter to close background tasks and enable physical disk cache.

[0084] The parameter optimization module is used to optimize system parameters and can optimize incorrect system parameters based on disk information.

[0085] The log output module is used to record the logs generated during the system parameter determination process and print the logs, etc.

[0086] The BIOS parameter prompt module is used to process the parameters at the BIOS level. The important parameters at the BIOS level are generally set on the PCIE link. Since the RAID card is a PCIE device, the PCIE link directly affects the performance of the PCIE device. For the optimization of the PCIE link, the important parameters are MPS and MRRS. For other BIOS parameters, it is necessary to distinguish the processor platform (such as Intel and AMD) used. There are differences in parameter settings for different processor platforms. Since the BIOS parameters cannot be modified directly, it is necessary to print the recommended values ​​of the parameters to be modified.

[0087] In an optional embodiment, the following may be used: Figure 3 The preset parameter determination software shown executes a method for determining system parameters.

[0088] Figure 4 is a schematic diagram of an optional process for optimizing system parameters according to an embodiment of the present invention, such as Figure 4 As shown, the following process is included:

[0089] (1) First determine whether the user has root privileges on the operating system. If the user does not have root privileges on the operating system, print a prompt message and end the process. If the user has root privileges on the operating system, initialize the log module to record the information generated during the system parameter determination process.

[0090] (2) Using the RAID card's client tool, obtain information about all logical disks, such as the VD Number, drive letter, RAID level, stripe size, Read cache, Write cache, disk interface, disk media, number of member disks, and member disk cache policy of each logical disk.

[0091] (3) Traverse all logical disks and analyze and modify unreasonable system parameters in turn according to the obtained logical disk information, including analyzing and modifying SCS1 layer parameters in turn according to the interface, medium, RAID level, stripe size, and number of member disks of each logical disk, and analyzing and modifying Block layer parameters in turn according to the interface, medium, RAID level, stripe size, and number of member disks of each logical disk.

[0092] (4) Disable the background tasks of the host adapter (RAID card) and enable cache for the physical disks under the card.

[0093] (5) Turn off the processor power saving mode and configure the system to high performance mode.

[0094] (6) Print the recommended values ​​of BIOS parameters.

[0095] (7) End the process.

[0096] In an embodiment of the present invention, it is possible to first determine whether the user has root authority. If the user does not have root authority, a prompt message is printed. If the user has root authority, the log module is initialized and the information of all logical disks is obtained. According to the obtained logical disk information, incorrect system parameters are analyzed and modified, and then the host adapter is controlled to close background tasks, the cache of the physical disk is turned on, and the power saving mode of the processor is turned off, and the system is configured to high-performance mode. Finally, the recommended parameter values ​​of the BIOS are printed to complete the determination of the system parameters, which can effectively improve the performance of the disk, and further solve the technical problem that the parameter values ​​of the system parameters cannot be accurately and effectively determined in the related technology, resulting in the inability to effectively optimize the disk performance.

[0097] Another optional specific implementation is described in detail below.

[0098] In an embodiment of the present invention, the user authority is checked to determine whether to initialize the log module. If the user has the authority, the log module is initialized, and then based on the disk topology of each logical disk, the disk information of each logical disk is obtained, and all logical disks are traversed. According to the disk medium, disk interface and other information, it is determined whether the system parameters are correct, and incorrect system parameters are modified to complete the performance optimization of the logical disk, which solves the technical problem in the related art that the parameter values ​​of the system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize the disk performance.

[0099] In this embodiment, the process of optimizing system parameters is as follows:

[0100] (1) Check user permissions by calling the geteuid() function. If the function return value is 0, it indicates that the user has root permissions. Go to step (3). Otherwise, print a prompt message and terminate the program.

[0101] (2) Initialize the log module; you can set the log output color according to the usage scenario.

[0102] (3) To obtain information about all logical disks in the system, you can use the client tool of the host adapter to query all disk information and extract information such as the VD Number, drive letter, RAID level, stripe size, Read cache, Write cache, disk interface, disk media, number of member disks, and member disk cache policy of each logical disk, and record the total number of logical disks.

[0103] (4) Traverse the logical disks, extract the drive letter of each logical disk, record it as sdx, and assemble the parameter directory of the SCSI layer: / sys / block / sdx / device / , so as to read the disk status (state), disk busyness (device_busy), whether the disk is blocked (device_blocked) and other attributes from this directory, and print these attributes to show the basic information of the disk to the user.

[0104] (5) Assemble the parameter directory of the Block layer: / sys / block / sdx / queue / , so as to read the rotational attribute (rotational) of the disk from this directory, and determine whether the attribute value is correct based on the medium of the logical disk. If the medium of the logical disk is a mechanical hard disk and rotational is 1, or the medium of the logical disk is a solid-state disk and rotational is 0, it is considered correct. Otherwise, modify the value of rotational based on the medium of the logical disk.

[0105] (6) Determine whether the stripe size setting of the logical disk is reasonable based on rotational. If rotational is 1 and the stripe size is not equal to 256, the print information recommends setting the stripe size to 256; if rotational is 0 and the stripe size is not equal to 64, the print information recommends setting the stripe size to 64.

[0106] (7) The elevator algorithm attribute (scheduler) used is read from the parameter directory of the SCSI layer, and whether the attribute is reasonable is determined according to the disk medium. For example, if the disk medium is a mechanical hard disk, the attribute is set to mq-deadline; if the disk medium is a solid-state hard disk, the attribute is set to none.

[0107] (8) Read the entropy switch attribute (random) from the parameter directory of the SCSI layer. Turning off this parameter (i.e., random = 0) can turn off the contribution of I / O events to the system's entropy pool, thereby improving I / O performance. If this value is 1, change it to 0.

[0108] (9) Read the processor affinity attribute (rq_affinity) of I / O from the parameter directory of the SCSI layer. The rq_affinit value is 0, which means that no affinity is set. The value is 1, which means that the request is completed by any processor in the group of the processor that sends the request. The value is 2, which means that the request is completed by the processor that sends the request. Therefore, rq_affinity is changed to 2 to improve the processing efficiency of the processor.

[0109] (10) Read the max_hw_sectors_kb parameter from the parameter directory of the SCSI layer. This parameter determines the maximum value of the interactive data between the host and the device from the hardware level. Continue to read the max_sectors_kb parameter from the parameter directory of the SCSI layer. This parameter determines the maximum value of the interactive data between the host and the device from the software level, affecting the splitting and merging of I / O. Therefore, the larger the value of max_sectors_kb, the better, but it cannot be greater than max_hw_sectors_kb. Therefore, if max_sectors_kb is not equal to max_hw_sectors_kb, it is modified to max_hw_sectors_kb.

[0110] (11) Read the nr_requests parameter from the parameter directory of the Block layer, read the queue_depth parameter from the parameter directory of the SCSI layer, and then adjust the queue_depth value according to the disk interface type and RAID level. For example, the queue_depth value of a single physical disk is shown in Table 1, denoted as QD; if the logical disk is RAID0, consisting of N physical disks, the queue_depth value is N*QD, if it exceeds nr_requests, the queue_depth value is nr_requests; if the logical disk is RAID5, consisting of N physical disks, the queue_depth value is (N-1)*QD, if it exceeds nr_requests, the queue_depth value is nr_requests.

[0111] Table 1

[0112] Interface Type Queue Depth SATA 32 SAS 64 NVME 128

[0113] (12) Modify the write cache properties of the disk, for example, set the mechanical hard disk to WB (Write Back) mode and the solid-state hard disk to WT (Write Through) mode. Although there is a write_cache parameter in the parameter directory of the SCSI layer, the parameter value is inaccurate and needs to be set according to the client tool of the host adapter.

[0114] (13) Disable the host adapter background tasks. Tasks that need to be disabled include data consistency check, patrol read, etc. Disable the logical disk's read cache, and enable the physical disk's cache.

[0115] (14) Set the system to throughput mode. You can use the tuned-adm profile throughput-performance command to set the system to performance mode and set the read_ahead_kb parameter in the SCSI layer parameter directory to 4096 to improve sequential read performance.

[0116] (15) When setting the BIOS, focus on the MPS and MRRS of PCIE. Try to set them to the maximum supported values. For AMD platforms, set "NUMA Nodes Per Socket" to "NPS4".

[0117] In an embodiment of the present invention, by identifying the disk configuration and performing a comprehensive check on the system parameters, incorrect system parameters are analyzed and modified based on the disk information, thereby improving disk performance and reducing latency. This effectively solves the technical problem in the related technology that the parameter values ​​of the system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize the disk performance, thereby achieving the effect of improving the overall performance of the system.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0119] The following is a detailed description in conjunction with another embodiment.

[0120] Embodiment 2

[0121] In this embodiment, a system parameter determination device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0122] Figure 5 is a structural block diagram of an optional system parameter determination device according to an embodiment of the present application, such as Figure 5 As shown, the device includes a collection unit 50 , a first determination unit 51 , and a second determination unit 52 .

[0123] Wherein, the collection unit 50 is used to collect system parameters on the target operating system;

[0124] A first determining unit 51 is used to determine a disk topology of at least one logical disk used by a target operating system, wherein the disk topology describes a physical and logical layout of a disk on the target operating system;

[0125] The second determination unit 52 is used to determine the target parameter value of each system parameter corresponding to the logical disk based on the disk topology, wherein the target parameter value is used to guide the configuration of the system parameters on the target operating system to optimize the performance of the logical disk.

[0126] The above-mentioned system parameter determination device can collect system parameters on the target operating system through the collection unit 50, determine the disk topology of at least one logical disk used by the target operating system through the first determination unit 51, and determine the target parameter value of each system parameter corresponding to the logical disk through the second determination unit 52 to complete the performance optimization of the logical disk, thereby solving the technical problem in the related art that the parameter values ​​of the system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize the disk performance.

[0127] Optionally, the collection unit includes: a first export module, used to export the kernel parameters of the target operating system to the user space using a preset file system; a first collection module, used to collect layer parameters at the adapter level, the system level, and the basic input and output system level; a first characterization module, used to characterize the kernel parameters and layer parameters as system parameters.

[0128] Optionally, the system parameter determination device also includes: a first judgment module, used to determine whether the user account logging into the target operating system has preset permissions before collecting the system parameters on the target operating system; a first adding module, used to add prompt information to the print information when the user account does not have preset permissions; a first initialization module, used to initialize the log module when the user account has preset permissions, wherein the log module is used to record the logs generated during the determination process of the system parameters.

[0129] Optionally, the system parameter determination device also includes: a first acquisition module, used to obtain disk information of each logical disk based on the disk topology of each logical disk before determining the target parameter value of each system parameter corresponding to the logical disk based on the disk topology; a first assembling module, used to traverse all logical disks, and for each logical disk, assemble a first parameter directory of the device driver layer based on the disk information, and assemble a second parameter directory of the intermediate layer based on the disk information; a first determination module, used to determine a first type of parameters involved in the device driver layer based on the system parameters, and place the first type of parameters into the first parameter directory; a second determination module, used to determine a second type of parameters involved in the intermediate layer based on the system parameters, and place the second type of parameters into the second parameter directory.

[0130] Optionally, the second determination unit includes: a first reading module, used to read a first preset parameter set from a first type of parameter under a first parameter directory; a second judgment module, used to judge whether the current parameter value of each first preset parameter in the first preset parameter set is correct based on disk information; a first modification module, used to modify the current parameter value of the first preset parameter to a target parameter value or add the target parameter value of the first preset parameter to the printing information based on disk information when the current parameter value of the first preset parameter is incorrect; a second reading module, used to read a second preset parameter set from a second type of parameter under a second parameter directory; a third judgment module, used to judge whether the current parameter value of each second preset parameter in the second preset parameter set is correct based on disk information; a second modification module, used to modify the current parameter value of the second preset parameter to a target parameter value or add the target parameter value of the second preset parameter to the printing information based on disk information when the current parameter value of the second preset parameter is incorrect; a third determination module, used to determine the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level based on disk information.

[0131] Optionally, the system parameter determination device also includes: a first control module, used to control the background task of the host adapter to be closed before determining the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level based on the disk information; a second control module, used to control the read cache of the logical disk to be closed, and control the cache startup of the physical disk under the logical disk.

[0132] Optionally, the third determination module includes: a first determination sub-module, used to determine the write cache mode of the write cache attribute based on the disk media type contained in the disk information; a first setting sub-module, used to set the target operating system to throughput mode, and set the additional data volume parameter value to a preset value; a second setting sub-module, used to set the data load parameter value and the read request parameter value of the extended bus standard to the maximum values ​​respectively; and a third setting sub-module, used to set the slot node number parameter value to a preset number of nodes for each CPU slot when the target operating system is running on a preset platform.

[0133] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0134] The present invention also provides a computer program product which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: collecting system parameters on a target operating system, determining a disk topology of at least one logical disk used by the target operating system, and based on the disk topology, determining a target parameter value for each system parameter corresponding to the logical disk, so as to optimize the performance of the logical disk.

[0135] The above-mentioned system parameter determination device may also include a processor and a memory. The above-mentioned acquisition unit 50, the first determination unit 51, the second determination unit 52, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0136] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned method for determining system parameters.

[0137] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0138] According to another aspect of an embodiment of the present application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the above-mentioned method for determining system parameters.

[0139] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0140] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0141] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0142] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining system parameters, characterized in that: Applied to preset parameter determination software, including: Collect system parameters on the target operating system; Determining a disk topology of at least one logical disk used by the target operating system, wherein the disk topology describes the physical and logical layout of the disks on the target operating system; Based on the disk topology, a target parameter value of each system parameter corresponding to the logical disk is determined, wherein the target parameter value is used to guide configuration of the system parameters on the target operating system to optimize the performance of the logical disk.

2. The determination method according to claim 1, characterized in that: The preset parameter determination software runs on the user space of the target operating system and collects system parameters on the target operating system, including: Using a preset file system, exporting kernel parameters of the target operating system to the user space; Collect adapter-level, system-level, and BIOS-level parameters; The kernel parameters and the layer parameters are characterized as the system parameters.

3. The determination method according to claim 1, characterized in that: Before collecting system parameters on the target operating system, it also includes: Determine whether the user account that logs into the target operating system has preset permissions; When the user account does not have the preset authority, adding prompt information to the print information; In the case where the user account has the preset authority, a log module is initialized, wherein the log module is used to record the logs generated during the determination process of the system parameters.

4. The determination method according to claim 1, characterized in that: Before determining the target parameter value of each system parameter corresponding to the logical disk based on the disk topology, the method further includes: Based on the disk topology of each of the logical disks, obtaining disk information of each of the logical disks; Traversing all the logical disks, for each of the logical disks, assembling a first parameter directory of a device driver layer based on the disk information, and assembling a second parameter directory of an intermediate layer based on the disk information; Based on the system parameters, determining the first type of parameters involved in the device driver layer, and placing the first type of parameters into the first parameter directory; Based on the system parameters, second-category parameters involved in the intermediate layer are determined, and the second-category parameters are placed in the second parameter directory.

5. The determination method according to claim 4, characterized in that: The step of determining a target parameter value of each of the system parameters corresponding to the logical disk based on the disk topology comprises: Reading a first preset parameter set from the first type of parameters under the first parameter directory; Based on the disk information, determining whether a current parameter value of each first preset parameter in the first preset parameter set is correct; In the case where the current parameter value of the first preset parameter is incorrect, based on the disk information, modifying the current parameter value of the first preset parameter to the target parameter value or adding the target parameter value of the first preset parameter to the print information; Reading a second preset parameter set from the second type of parameters under the second parameter directory; Based on the disk information, determining whether the current parameter value of each second preset parameter in the second preset parameter set is correct; In the case where the current parameter value of the second preset parameter is incorrect, based on the disk information, modifying the current parameter value of the second preset parameter to the target parameter value or adding the target parameter value of the second preset parameter to the print information; Based on the disk information, the target parameter value of each third preset parameter in a third preset parameter set at an adapter level, a system level, and a BIOS level is determined.

6. The determination method according to claim 5, characterized in that: Before determining the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level based on the disk information, the method further includes: Control the host adapter's background task shutdown; The read cache of the logical disk is controlled to be closed, and the cache of the physical disk under the logical disk is controlled to be started.

7. The determination method according to claim 5, characterized in that: The step of determining the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, the system level and the basic input and output system level based on the disk information comprises: Determining a write cache mode of a write cache attribute based on the disk medium type included in the disk information; Setting the target operating system to a throughput mode and setting an additional data volume parameter value to a preset value; The data load parameter value and the read request parameter value of the extended bus standard are respectively set to the maximum value; In the case where the target operating system runs on a preset platform, the slot node number parameter value is set to have a preset number of nodes per CPU slot.

8. A device for determining system parameters, characterized in that: Applied to preset parameter determination software, including: A collection unit, used for collecting system parameters on a target operating system; A first determining unit, configured to determine a disk topology of at least one logical disk used by the target operating system, wherein the disk topology describes a physical and logical layout of a disk on the target operating system; The second determination unit is used to determine the target parameter value of each system parameter corresponding to the logical disk based on the disk topology, wherein the target parameter value is used to guide the configuration of the system parameters on the target operating system to achieve performance optimization of the logical disk.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for determining the system parameters according to any one of claims 1 to 7.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the system parameters described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Disk performance optimizing method based on linux operation system and system thereof

    CN106648472A

  • Logic processing server in object storage system

    CN106970854A

  • Method for managing disk, electronic device and computer program product

    CN114327241A

  • Method, system and equipment for adjusting kernel parameters of operating system and medium

    CN117032955A

  • Power-saving mechanisms for a dynamic mirror service policy

    US9158466B1

Cited By

  • Disk array data encoding and decoding method, device, equipment, program product and medium

    CN120223098A