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

By determining the preset parameters, the software collects and optimizes the system parameters of the target operating system, which solves the problem of the inability to accurately optimize disk performance in the existing technology and realizes automatic disk performance improvement.

CN119088308BActive Publication Date: 2025-09-30INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies cannot accurately and effectively determine system parameters, resulting in an inability to effectively optimize disk performance. Manual parameter adjustment requires professional knowledge and is unstable, and hardware upgrades are costly and have limited effectiveness.

Method used

The software collects the system parameters of the target operating system through preset parameters, determines the disk topology of the logical disk, and automatically optimizes the system parameters based on the disk topology, including kernel parameters, adapter-level and BIOS-level parameter adjustments to ensure the accuracy of parameter values.

Benefits of technology

It achieves automatic and accurate optimization of disk performance, improves read and write speeds, reduces latency, and enhances overall system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088308B_ABST
    Figure CN119088308B_ABST
Patent Text Reader

Abstract

This application provides a method for determining system parameters, an apparatus thereof, an electronic device, and a storage medium, relating to the field of disk optimization technology. The method comprises: collecting system parameters on a target operating system, determining the disk topology of at least one logical disk used by the target operating system, and, based on the disk topology, determining target parameter values ​​for each system parameter corresponding to the logical disk to optimize the performance of the logical disk. This application solves the technical problem in related technologies of being unable to accurately and effectively determine parameter values ​​for system parameters, resulting in an inability to effectively optimize disk performance, thereby achieving the effect of improving disk performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of disk optimization technology, 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, data volumes are exploding. Disks, as the primary device for data storage and access, have become a key factor affecting overall system performance. Disk performance not only affects data read and write speeds but is also directly related to overall system response time and efficiency.

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

[0004] Currently, Linux systems (an operating system) offer a wide range of parameter configurations for optimizing disk performance. In related technologies, operations personnel or system administrators can manually adjust parameters based on experience or commonly used optimal parameter solutions, or improve disk performance through hardware upgrades, such as replacing disks with faster ones.

[0005] However, manually adjusting parameters doesn't account for all factors and can't achieve optimal performance. Furthermore, Linux systems have numerous disk performance parameters that interact with each other, requiring specialized knowledge and extensive experience, often resulting in poor and unstable performance. Hardware upgrades are not only costly but also limited by the performance of the hardware itself. Changes in the hardware environment or application requirements can render the original configuration inappropriate, necessitating readjustment.

[0006] To address the above-mentioned problems, no effective solutions have been proposed so far. 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 system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize disk performance.

[0008] According to one 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 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; based on the disk topology, determining 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 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 system parameter corresponding to the logical disk based on the disk topology, it also includes: obtaining the disk information of each logical disk based on the disk topology of each logical disk; traversing all the logical disks, and for each logical disk, 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] Furthermore, the step of determining the target parameter value of each system parameter corresponding to the logical disk based on the disk topology 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; if 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 based on the disk information 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; judging whether the current parameter value of each second preset parameter in the second preset parameter set is correct based on the disk information; if 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 based on the disk information or adding the target parameter value of the second preset parameter to the print 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 and 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 the throughput mode, and setting the additional data volume parameter value to the preset value; setting the data load parameter value and the read request parameter value of the extended bus standard to the maximum value respectively; and when the target operating system runs 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: an acquisition unit, used to acquire 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; a second determination unit, 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.

[0016] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further 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 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 in related technologies that the parameter values ​​of system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize disk performance. It achieves the effect of improving the performance of logical disks, thereby improving the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a hardware structure block diagram of a mobile terminal for a method for determining system parameters 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 according to 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 This is a structural block diagram of an optional device for determining system parameters 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 description 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 diagram of a mobile terminal of a method for determining system parameters according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will 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 than shown, or with Figure 1 Different configurations 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 system parameters 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, implementing the above-mentioned 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 located 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. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] Example 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 a Linux system) that the software collects, 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 that runs 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 : 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.

[0037] Optionally, software with preset parameters can be used to analyze the logical disks used by the target operating system to determine the disk topology corresponding to each logical disk. It should be noted that the disk topology describes the physical and logical layout of the disks on the target operating system, indicating the number of physical disks contained in the logical disk and how the physical disks are connected.

[0038] In the embodiments of the present invention, a logical disk is a virtual storage unit created on a physical hard disk. It forms logical storage space by dividing the physical hard disk into partitions. Each logical disk is typically assigned a drive letter (such as "C:," "D:," etc.) to facilitate access and management by the operating system and users. Furthermore, each logical disk corresponds to a disk topology, which describes the physical and logical layout of the disk. This includes aspects such as the disk's internal components, data storage methods, and data access paths. This includes the disk's physical structure (such as heads, tracks, and sectors), as well as how the target operating system maps this physical structure to logical structures (such as partitions and volumes).

[0039] In this way, by determining the disk topology of at least one logical disk used by the target operating system, the system can be helped to 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 : determining target parameter values ​​of each system parameter corresponding to the logical disk based on the disk topology, wherein the target parameter values ​​are used to guide configuration of 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 attribute value) of each system parameter corresponding to each logical disk based on the disk information of each logical disk. The target parameter value is used 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 media. If the disk media is a mechanical hard disk and the rotation attribute value is 1, or the disk media is a solid-state drive 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 media. 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 parameters of the target operating system can be collected, and the disk topology of at least one logical disk used by the target operating system can be determined. Unreasonable parameters can be automatically optimized for different disk topologies, which solves the technical problem in related technologies that the parameter values ​​of system parameters cannot be accurately and effectively determined, resulting in the inability to effectively optimize disk performance. The disk's read and write speed is improved, and latency is reduced, thereby improving the operating efficiency of the entire system.

[0044] The execution entity 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 can be interchanged, that is, step S202 can be executed first, and then step S201 can be executed.

[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, it determines 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, 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 the user), so that the user and the application can view and modify the kernel parameters. 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 and output system (i.e., BIOS (Basic Input / Output System) level) can be collected to obtain all the system parameters for optimizing the 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 an embodiment of the present invention, the Block layer is located between the file system and the device driver, and is used to handle the splitting, merging, and scheduling of I / O (Input / Output). The SCSI layer directly interacts 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 a 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 system parameter determination method 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 logged 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 determined 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. In the case that 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 process of the system parameters, so as to facilitate the subsequent tracing of the process of adjusting the parameters. If the function return value is not 0, it means that the user account does not have the preset permissions. In the case that the user account does not have the preset permissions, a prompt message is added to the print information to remind the current user that he does not have the relevant operation permissions.

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

[0055] In order to more accurately determine the first and second category parameters, in the system parameter determination method 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, based on 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. Based on the disk information, 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 intermediate layer (such as the Block layer of the Linux operating system) can be assembled. After that, based on the system parameters, the first type of parameters involved in the device driver layer and the second type of parameters involved in the intermediate 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 that the corresponding parameters can be read and adjusted later, which is conducive to improving optimization efficiency.

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

[0058] In an embodiment of the present invention, RAID levels may include RAID0 (i.e., using data striping to store data 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 on multiple disk drives and achieving redundant backup of data through distributed parity), etc.; the disk interface may include SATA (Serial ATA, a computer bus for connecting a motherboard and a storage device), SAS (Serial Attached SCSI, a high-performance data storage interface for connecting a storage device and a server), NVME (Non-Volatile Memory Express, 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 passed 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 requests. The I / O maximum data limit defines the maximum allowable 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, by traversing the logical disks, we can extract the drive letter of each logical disk, denoted as sdx, and assemble the SCSI layer parameter directory into: / sys / block / sdx / device / . From this directory, we can read first-category parameters such as the disk status (state), disk busyness (device_busy), and whether the disk is blocked (device_blocked). These parameters can be printed out to display basic disk information to the user. Furthermore, we can assemble the Block layer parameter directory into: / sys / block / sdx / queue / , and from this directory, we can read second-category parameters such as the disk's rotational properties (rotational).

[0061] In order to obtain the correct target parameter value, in the system parameter determination method provided in Example 1 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 print 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 print 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 through traversal, whether the current parameter value of each first preset parameter in the first preset parameter set is analyzed and determined to be correct. 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 printed 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 printed 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 that should be adjusted is printed to suggest manual adjustment by the user). In this way, the target parameter value of each system parameter is automatically determined, which can improve disk performance.

[0063] For example, 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 based on the actual task to be processed by the operating system (such as disabling interrupts); the most important setting at the BIOS level is in the PCIE link, involving parameters such as 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., the maximum number of bytes that a TLP read request packet can request to read from the receiving end 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. 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 an HDD (i.e., mechanical hard disk) medium, the target parameter value of the elevator algorithm attribute is mq-deadline; when the disk medium is an SSD (i.e., solid-state drive) medium, the target parameter value of the elevator algorithm attribute is none.

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

[0068] Another example 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 queue_depth value 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 queue_depth value is N*QD (i.e., the queue_depth value); if the queue_depth value exceeds nr_requests, the queue_depth value is nr_requests; if the logical disk is RAID5 and consists of N physical disks, the queue_depth value is (N-1)*QD; if the queue_depth value exceeds nr_requests, the queue_depth value is nr_requests.

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

[0070] In order to more accurately determine the target parameter value, in the system parameter determination method provided in Example 1 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, system level and 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, you can disable background tasks on the host adapter (such as data consistency checks and patrol reads) to prevent interference from background tasks that could lead to inaccurate parameter value determination. You can also disable the read cache on the logical disk to reduce unnecessary cache operations and improve overall system responsiveness. Enabling cache on the physical disks underlying the logical disks can also increase data read and write rates. This makes it easier to more accurately determine parameter values ​​later.

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

[0073] In order to improve the accuracy of the target parameter value, in the system parameter determination method 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 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 respectively set to the maximum value; 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 media type, and the write cache mode of the write cache attribute may be determined based on the disk media type. For example, a mechanical hard disk may be set to WB (Write Back) mode, and a solid-state hard disk may be set to WT (Write Through) mode. The target operating system may then be set to throughput mode (i.e., the amount of data or 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., setting the read_ahead_kb parameter in the first parameter directory to 4096). For example, setting the system to performance mode using the "tuned-adm profile throughput-performance" command and setting the read_ahead_kb parameter in the SCSI layer parameter directory to 4096 may help improve sequential read performance.

[0075] Afterwards, the data load parameter value and the read request parameter value of the extended bus standard can be set to the maximum supported values ​​(i.e., the MPS and MRRS of PCIE at the BIOS level should be set to the maximum supported values ​​as much as possible). In addition, if 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 socket.

[0076] For example, 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: hardware identification module, SCSI parameter reading module, Block parameter reading module, system setting module, controller setting module, parameter optimization module, log output module, and BIOS parameter prompt module.

[0079] exist Figure 3 In the RAID strategy, the hardware identification module can identify the hardware type, such as disk media type, RAID type, processor type, etc., so that when creating a RAID strategy, you can select the appropriate stripe size and cache strategy based on 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 parameters from the SCSI layer. The SCSI layer is the device driver layer that directly interacts with the device. The upper SCSI layer is the disk driver, the lower SCSI layer is the host adapter driver, and the middle SCSI layer is the public layer. Both the middle and lower SCSI layers can export a variety of parameters, such as the queue_depth parameter, which determines the maximum number of I / Os transmitted to the disk and needs to be adjusted based on the actual disk interface and the number of physical disks.

[0081] The block parameter reading module reads parameters from the block layer. The block layer sits between the file system and the device driver, serving as a link between the upper and lower layers of the disk I / O chain. It handles I / O splitting, merging, and scheduling. Block layer parameters, such as the scheduling algorithm, maximum I / O data limit, and read-ahead parameters, all affect I / O performance. Therefore, reading these parameters is essential for optimizing disk performance.

[0082] The system settings module is used to perform system-level settings. For example, the Linux system level can be optimized based on 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 settings module is used to perform adapter-level settings. For example, during performance testing, it controls the adapter to shut down 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 processes BIOS-level parameters. Important BIOS-level parameters are typically set on the PCIE link. Since RAID cards are PCIE devices, the PCIE link directly impacts PCIE device performance. Important parameters for PCIE link optimization include MPS and MRRS. Other BIOS parameters depend on the processor platform (such as Intel and AMD). Parameter settings vary across different processor platforms. Since BIOS parameters cannot be modified directly, it's necessary to print recommended values ​​for 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 process includes the following:

[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) According to the client tool of the RAID card, obtain the information of 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 information of all logical disks is obtained. Based on 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. The system is configured to high-performance mode, and 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 solve 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.

[0097] The following describes in detail another optional specific implementation.

[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 information such as the disk medium and disk interface, it is determined whether the system parameters are correct, and incorrect system parameters are modified 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.

[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 means that the user has root permissions and proceeds to step (3). Otherwise, print a prompt message and end 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, intercept 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 user the basic information of the disk.

[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 if 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 logical disk stripe size setting 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) Read the elevator algorithm attribute (scheduler) used from the parameter directory of the SCSI layer, and determine whether the attribute is reasonable based on 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 I / O processor affinity attribute (rq_affinity) from the SCSI layer parameter directory. An rq_affinit value of 0 indicates that affinity is not set. A value of 1 indicates that the completion request is processed by any processor in the group of the processor that sent the request. A value of 2 indicates that the completion request is processed by the processor that sent the request. Therefore, change rq_affinity to 2 to improve processor processing efficiency.

[0109] (10) Read the max_hw_sectors_kb parameter from the SCSI layer's parameter directory. This parameter determines the maximum amount of data exchanged between the host and device from a hardware perspective. Continue reading the max_sectors_kb parameter from the SCSI layer's parameter directory. This parameter determines the maximum amount of data exchanged between the host and device from a software perspective, affecting I / O splitting and merging. Therefore, the larger the max_sectors_kb value, 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, then change it to max_hw_sectors_kb.

[0110] (11) Read the nr_requests parameter from the Block layer's parameter directory, and read the queue_depth parameter from the SCSI layer's parameter directory. Then, adjust the queue_depth value based on the disk interface type and RAID level. For example, the queue_depth value for a single physical disk is shown in Table 1, denoted as QD. If the logical disk is RAID0, consisting of N physical disks, then the queue_depth value is N*QD. If it exceeds nr_requests, then the queue_depth value is nr_requests. If the logical disk is RAID5, consisting of N physical disks, then the queue_depth value is (N-1)*QD. If it exceeds nr_requests, then 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 disk's write cache properties. For example, set a mechanical hard disk to WB (Write Back) mode and a solid-state drive to WT (Write Through) mode. Although there is a write_cache parameter in the SCSI layer's parameter directory, the value of this parameter is inaccurate and needs to be set according to the client tool of the host adapter.

[0114] (13) Close the host adapter background tasks. Tasks that need to be closed include data consistency check, patrol read, etc., and close the read cache of the logical disk and open the cache of the physical disk.

[0115] (14) Set the system to throughput mode. You can set the system to performance mode by using the command "tuned-adm profile throughput-performance" and at the same time set the read_ahead_kb parameter in the SCSI layer parameter directory to 4096, which is beneficial to improve the performance of sequential reads.

[0116] (15) When setting the BIOS, focus on the MPS and MRRS of PCIE. Try to set them to the maximum supported value. 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 related technologies of being unable to accurately and effectively determine the parameter values ​​of system parameters, resulting in the inability to effectively optimize 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 the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this 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 enabling 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 describes it in detail with reference to another embodiment.

[0120] Example 2

[0121] This embodiment also provides a device for determining system parameters, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[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] The collecting unit 50 is used to collect system parameters on the target operating system;

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

[0125] The second determining unit 52 is configured to determine a 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 configuration of 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, system level and 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 assembly 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 the first type of parameters involved in the device driver layer based on the system parameters, and put the first type of parameters into the first parameter directory; a second determination module, used to determine the second type of parameters involved in the intermediate layer based on the system parameters, and put the second type of parameters into the second parameter directory.

[0130] Optionally, the second determination unit includes: a first reading module, configured to read a first preset parameter set from the first category of parameters under the first parameter directory; a second judgment module, configured to determine, based on the disk information, whether a current parameter value of each first preset parameter in the first preset parameter set is correct; a first modification module, configured to modify, based on the disk information, the current parameter value of the first preset parameter to a target parameter value or to add the target parameter value of the first preset parameter to the print information if the current parameter value of the first preset parameter is incorrect; a second reading module, configured to read a second preset parameter set from the second category of parameters under the second parameter directory; a third judgment module, configured to determine, based on the disk information, whether a current parameter value of each second preset parameter in the second preset parameter set is correct; a second modification module, configured to modify, based on the disk information, the current parameter value of the second preset parameter to a target parameter value or to add the target parameter value of the second preset parameter to the print information if the current parameter value of the second preset parameter is incorrect; and a third determination module, configured to determine, 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 / output system level.

[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, system level and 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 value 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 through 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 the disk topology of at least one logical disk used by the target operating system, and based on the disk topology, determining the target parameter value of each system parameter corresponding to the logical disk to complete the performance optimization 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, first determination unit 51, 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, which 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 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, 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 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 here.

[0141] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, 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 performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated 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 merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included within the scope of protection 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 disks on the target operating system; Based on the disk topology, determining 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; based on the disk topology, determining the target parameter value of each system parameter corresponding to the logical disk includes: reading a first preset parameter set from a first type of parameter under a first parameter directory; based on disk information, determining whether the current parameter value of each first preset parameter in the first preset parameter set is correct; if 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 Add the target parameter value of the first preset parameter to the printing information; read the second preset parameter set from the second type of parameters under the second parameter directory; based on the disk information, determine whether the current parameter value of each second preset parameter in the second preset parameter set is correct; if the current parameter value of the second preset parameter is incorrect, modify the current parameter value of the second preset parameter to the target parameter value based on the disk information or add the target parameter value of the second preset parameter to the printing information; based on the disk information, determine the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, system level and basic input and output system level.

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 basic input / output system-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, the following steps are also included: Determining whether the user account that logs into the target operating system has preset permissions; If the user account does not have the preset authority, adding prompt information to the print information; In a case where the user account has the preset authority, a log module is initialized, wherein the log module is used to record 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 logical disk, obtaining disk information of each logical disk; Traversing all the logical disks, for each of the logical disks, assembling a first parameter directory of the device driver layer based on the disk information, and assembling a second parameter directory of the intermediate layer based on the disk information; Determine first-category parameters involved in the device driver layer based on the system parameters, and place the first-category 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 1, 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: Controls the shutdown of background tasks for the host adapter; 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.

6. The determination method according to claim 1, 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 includes: 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; Set the data load parameter value and read request parameter value of the extended bus standard to the maximum value respectively; 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.

7. 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 the 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 determining unit is configured to determine, based on the disk topology, a target parameter value of each system parameter corresponding to the logical disk, wherein the target parameter value is used to guide configuration of system parameters on the target operating system to optimize the performance of the logical disk; determining, based on the disk topology, the target parameter value of each system parameter corresponding to the logical disk comprises: reading a first preset parameter set from a first type of parameter under a first parameter directory; judging, based on disk information, whether a current parameter value of each first preset parameter in the first preset parameter set is correct; and if the current parameter value of the first preset parameter is incorrect, modifying the current parameter value of the first preset parameter to the target value based on the disk information. parameter value or add the target parameter value of the first preset parameter in the printing information; read the second preset parameter set from the second type of parameters under the second parameter directory; based on the disk information, determine whether the current parameter value of each second preset parameter in the second preset parameter set is correct; in case the current parameter value of the second preset parameter is incorrect, based on the disk information, modify the current parameter value of the second preset parameter to the target parameter value or add the target parameter value of the second preset parameter in the printing information; based on the disk information, determine the target parameter value of each third preset parameter in the third preset parameter set at the adapter level, system level and basic input and output system level.

8. 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 6.

9. An electronic device, characterized in that: The system comprises 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 6.

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