A parameter tuning method, system and device for a distributed storage system
Automatically adjusting the parameters of the distributed storage system through a fully connected neural network solves the difficulty of manual tuning in large-scale systems and achieves performance improvement.
Patent Information
- Application Number
- CN202110722265.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-06-28
AI Technical Summary
In large-scale distributed storage systems, manual parameter tuning is difficult and difficult to effectively improve system performance.
A fully connected neural network is used to construct and train, recommend adjustable parameter values based on the state parameters of the distributed storage system, and automatically adjust system parameters to improve performance.
Compared with manual tuning, methods based on fully connected neural networks are more suitable for large-scale distributed storage systems and can significantly improve system performance.
Smart Images

Figure CN113608677B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed storage, and in particular to a parameter tuning method, system and device for a distributed storage system. Background Art
[0002] At present, there are many adjustable parameters in distributed storage systems. Modifying these parameters to different values often has different effects on the performance of distributed storage systems. When distributed storage systems leave the factory, they all use default parameter configurations, but the combination of these default parameter values is generally not the optimal parameter combination. Studies have shown that even if a small part of the parameter values in the distributed storage system are adjusted, the performance of the distributed storage system can be improved by more than several times. The existing technology usually requires system administrators to adjust the parameter values of the distributed storage system based on their own professional knowledge and experience to improve the performance of the distributed storage system. However, as the scale and complexity of distributed storage systems continue to increase, manual parameter tuning is difficult and is not suitable for large-scale distributed storage systems.
[0003] Therefore, how to provide a solution to the above technical problems is a problem that technicians in this field need to solve at present. Summary of the invention
[0004] The purpose of the present invention is to provide a parameter tuning method, system and device for a distributed storage system, which can recommend various adjustable parameter values of the distributed storage system through a fully connected neural network. Compared with the manual parameter tuning method, the parameter tuning method based on the fully connected neural network is more suitable for large-scale distributed storage systems.
[0005] In order to solve the above technical problems, the present invention provides a parameter tuning method for a distributed storage system, comprising:
[0006] Constructing and training a first fully connected neural network for recommending adjustable parameters of the distributed storage system according to state parameters of the distributed storage system;
[0007] Collecting each state parameter value of the distributed storage system, and inputting each state parameter value into the first fully connected neural network to obtain recommended values of each adjustable parameter of the distributed storage system;
[0008] The adjustable parameters of the distributed storage system are adjusted accordingly according to the recommended values.
[0009] Preferably, the recommended values of the adjustable parameters output by the first fully connected neural network are all between 0 and 1;
[0010] Then the parameter tuning method of the distributed storage system further includes:
[0011] Set corresponding minimum and maximum values for the adjustable parameters of the distributed storage system respectively;
[0012] After obtaining the recommended values of the adjustable parameters of the distributed storage system, before adjusting the adjustable parameters of the distributed storage system accordingly according to the recommended values, the recommended values of the adjustable parameters are mapped between the corresponding minimum and maximum values according to the corresponding minimum and maximum values of the adjustable parameters, so as to adjust the adjustable parameters of the distributed storage system accordingly according to the mapped values of the adjustable parameters.
[0013] Preferably, the process of collecting the state parameter values of the distributed storage system includes:
[0014] During the interaction between the distributed storage system and the client, collecting performance indicator parameter values of the distributed storage system under a write operation;
[0015] The performance index parameter values of the CPU, disk and network card of each storage node of the distributed storage system are collected.
[0016] Preferably, the parameter tuning method of the distributed storage system further includes:
[0017] Before inputting the state parameter values into the first fully connected neural network, the collected state parameter values are normalized to input the normalized state parameter values into the first fully connected neural network.
[0018] Preferably, the parameter tuning method of the distributed storage system further includes:
[0019] Constructing and training a second fully connected neural network for predicting IO performance parameters of the distributed storage system according to various state parameters and various adjustable parameters of the distributed storage system;
[0020] Input each state parameter value and each adjustable parameter value of the distributed storage system into the second fully connected neural network to obtain a predicted value of the IO performance parameter of the distributed storage system; wherein, the larger the predicted value, the better the IO performance of the distributed storage system.
[0021] Preferably, the parameter tuning method of the distributed storage system further includes:
[0022] Obtaining the bandwidth of a client that issues an IO read / write request to the distributed storage system;
[0023] According to the preset reward function Obtain the reward value r corresponding to the distributed storage system; wherein, is the initial bandwidth of the client; BWt is the current bandwidth of the client; BW t-1 is the last bandwidth of the client; the larger the reward value r is, the better the IO performance of the distributed storage system is.
[0024] Preferably, the parameter tuning method of the distributed storage system further includes:
[0025] Construct an action vector a composed of the adjustable parameters of the distributed storage system t , and construct a state vector S composed of the state parameters of the distributed storage system t ;
[0026] The process of constructing a first fully connected neural network for recommending adjustable parameters of the distributed storage system according to the state parameters of the distributed storage system includes:
[0027] Construct the state vector S according to t The action vector a is recommended t The first fully connected neural network;
[0028] The process of collecting each state parameter value of the distributed storage system and inputting each state parameter value into the first fully connected neural network to obtain the recommended value of each adjustable parameter of the distributed storage system includes:
[0029] Collect the state parameter values of the distributed storage system to obtain a state vector S composed of the state parameter values t ;
[0030] The state vector S t Input into the first fully connected neural network to obtain an action vector a composed of the recommended values of the adjustable parameters t .
[0031] Preferably, the training process of the first fully connected neural network and the second fully connected neural network includes:
[0032] Reset the adjustable parameters of the distributed storage system to the default parameters, and when the client continues to send IO read and write requests within a preset time, collect the state vector S t , and after the client sends the IO read / write request, collect the bandwidth of the client;
[0033] The state vector collected this time is input into the first fully connected neural network to obtain the action vector a where the recommended values of each adjustable parameter are between 0 and 1. t, and according to the minimum and maximum values actually corresponding to each of the adjustable parameters, the recommended values of each adjustable parameter are mapped to the range between the minimum and maximum values corresponding to each of the adjustable parameters, and the action vector a is obtained. t The actual corresponding parameter vector;
[0034] Adjusting the adjustable parameters of the distributed storage system accordingly according to the parameter vector, and restarting the distributed storage system to make the adjustable parameters take effect;
[0035] When the client continues to send IO read and write requests within the preset time, the state vector S of the distributed storage system under the new configuration is collected. t+1 , and after the client re-issues the IO read / write request, collect the bandwidth of the client, and calculate the reward value r of the distributed storage system under the new configuration according to the preset reward function t ;
[0036] The four-tuple (s t a t r t s t+1 ) add the experience replay pool, and return to execute the step of inputting the state vector collected this time into the first fully connected neural network, and stop the return operation when the number of return executions reaches the preset first number, and update the network parameter values of the first fully connected neural network and the second fully connected neural network according to the data in the experience replay pool and the DDPG algorithm;
[0037] After the network parameter values of the first / second fully connected neural network are updated, the step of resetting the adjustable parameters of the distributed storage system to the default parameters is re-executed until the number of re-executions reaches a preset second number, and the training of the first / second fully connected neural network is completed.
[0038] In order to solve the above technical problems, the present invention further provides a parameter tuning system for a distributed storage system, comprising:
[0039] A construction module, used to construct and train a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system;
[0040] A recommendation module, used for collecting various state parameter values of the distributed storage system, and inputting the various state parameter values into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system;
[0041] The adjustment module is used to adjust the adjustable parameters of the distributed storage system according to the recommended values.
[0042] In order to solve the above technical problems, the present invention also provides a parameter tuning device for a distributed storage system, comprising:
[0043] Memory for storing computer programs;
[0044] A processor is used to implement the steps of any of the above-mentioned distributed storage system parameter tuning methods when executing the computer program.
[0045] The present invention provides a parameter tuning method for a distributed storage system, constructing and training a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system; collecting various state parameter values of the distributed storage system, and inputting each state parameter value into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system; and adjusting various adjustable parameters of the distributed storage system accordingly according to the recommended values. It can be seen that the present application can recommend various adjustable parameter values of the distributed storage system through a fully connected neural network. Compared with the manual parameter tuning method, the parameter tuning method based on the fully connected neural network is more suitable for large-scale distributed storage systems.
[0046] The present invention also provides a parameter tuning system and device for a distributed storage system, which have the same beneficial effects as the above parameter tuning method. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 A flow chart of a parameter tuning method for a distributed storage system provided by an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of the structure of a parameter tuning system for a distributed storage system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The core of the present invention is to provide a parameter tuning method, system and device for a distributed storage system, which can recommend various adjustable parameter values of the distributed storage system through a fully connected neural network. Compared with the manual parameter tuning method, the parameter tuning method based on the fully connected neural network is more suitable for large-scale distributed storage systems.
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] Please refer to Figure 1 , Figure 1 A flow chart of a parameter tuning method for a distributed storage system provided by an embodiment of the present invention.
[0053] The parameter tuning method of the distributed storage system includes:
[0054] Step S1: construct and train a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system.
[0055] Specifically, the present application may construct in advance a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system, that is, the input of the first fully connected neural network is the various state parameters of the distributed storage system, and the output is the various adjustable parameters of the distributed storage system. Moreover, the present application also trains the first fully connected neural network so that the various adjustable parameters of the distributed storage system recommended by the first fully connected neural network according to the various state parameters of the distributed storage system are better.
[0056] Step S2: collecting various state parameter values of the distributed storage system, and inputting each state parameter value into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system.
[0057] Specifically, the present application collects various state parameter values of the distributed storage system, and then inputs the collected state parameter values into the first fully connected neural network, so as to use the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system for subsequent adjustment of the various adjustable parameters of the distributed storage system.
[0058] Step S3: Adjust the adjustable parameters of the distributed storage system accordingly according to the recommended values.
[0059] Specifically, after obtaining the recommended values of the adjustable parameters of the distributed storage system, the present application can adjust the adjustable parameters of the distributed storage system accordingly according to the obtained recommended values of the adjustable parameters, thereby optimizing the performance of the distributed storage system.
[0060] The present invention provides a parameter tuning method for a distributed storage system, constructing and training a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system; collecting various state parameter values of the distributed storage system, and inputting each state parameter value into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system; and adjusting various adjustable parameters of the distributed storage system accordingly according to the recommended values. It can be seen that the present application can recommend various adjustable parameter values of the distributed storage system through a fully connected neural network. Compared with the manual parameter tuning method, the parameter tuning method based on the fully connected neural network is more suitable for large-scale distributed storage systems.
[0061] Based on the above embodiments:
[0062] As an optional embodiment, the recommended values of the adjustable parameters output by the first fully connected neural network are all between 0 and 1;
[0063] The parameter tuning method of the distributed storage system also includes:
[0064] Set the corresponding minimum and maximum values for each adjustable parameter of the distributed storage system respectively;
[0065] After obtaining the recommended values of each adjustable parameter of the distributed storage system, before adjusting the each adjustable parameter of the distributed storage system accordingly according to the recommended values, the recommended values of each adjustable parameter are mapped between the corresponding minimum value and maximum value according to the corresponding minimum value and maximum value of each adjustable parameter, so as to adjust the each adjustable parameter of the distributed storage system accordingly according to the mapped values of each adjustable parameter.
[0066] Furthermore, when designing the first fully connected neural network, the application can make the recommended values of each adjustable parameter output by the first fully connected neural network between 0 and 1. Then the application needs to set the corresponding minimum and maximum values for each adjustable parameter of the distributed storage system respectively, with the purpose of mapping the recommended values of each adjustable parameter to between the corresponding minimum and maximum values according to the corresponding minimum and maximum values of each adjustable parameter after obtaining the recommended values of each adjustable parameter output by the first fully connected neural network, so as to adjust the adjustable parameters of the distributed storage system accordingly according to the mapped values (actual recommended values) of each adjustable parameter.
[0067] For example, if the minimum value of an adjustable parameter is 50 and the maximum value is 100, and the recommended value of this adjustable parameter output by the first fully connected neural network is 0.5, then the actual parameter value of this adjustable parameter mapped to [50, 100] is 75.
[0068] As an optional embodiment, the process of collecting the state parameter values of the distributed storage system includes:
[0069] During the interaction between the distributed storage system and the client, the performance indicator parameter values of the distributed storage system under the write operation are collected;
[0070] Collect the performance indicator parameter values of the CPU, disk, and network card of each storage node in the distributed storage system.
[0071] Specifically, the various status parameter values of the distributed storage system collected in the present application include: during the interaction between the distributed storage system and the client (such as the Vdbench (file system I / O workload generator) client), the performance indicator parameter values of the distributed storage system under write operations, the performance indicator parameter values of the CPU (central processing unit) of each storage node of the distributed storage system, the performance indicator parameter values of the disk of each storage node, and the performance indicator parameter values of the network card of each storage node.
[0072] As an optional embodiment, the parameter tuning method of the distributed storage system further includes:
[0073] Before inputting each state parameter value into the first fully connected neural network, each collected state parameter value is normalized so as to input each normalized state parameter value into the first fully connected neural network.
[0074] Furthermore, the present application may also normalize the collected state parameter values of the distributed storage system before inputting the collected state parameter values of the distributed storage system into the first fully connected neural network, with the aim of inputting the normalized state parameter values into the first fully connected neural network.
[0075] More specifically, during the interaction between the distributed storage system and the client (simulating high-bandwidth IO (Input / Output) load), the distributed storage system's KPI (Key Performance Indicator) under write operations is collected: 1) The total number of requests sent by the client received by the distributed storage system; 2) The average latency of the distributed storage system processing a single request; 3) The average waiting latency between adjacent requests when the distributed storage system processes a request. Each KPI is normalized to between 0 and 1, as shown in Table 1 below (TB is a computer storage unit):
[0076] Table 1
[0077] KPI meaning Normalization method receive_requests The total number of requests received receive_requests / 1000000, normalized to TB handle_req_avg_t Average delay handle_req_avg_t / 1000000, normalized to seconds Queue_wait_avg_t Average waiting time Queue_wait_avg_t / 1000000, normalized to seconds
[0078] The distributed storage system is composed of multiple modules, and NFS (Network File System) ganesha is one of them. The requests sent by the client are transmitted to other modules through the NFS ganesha module, so the KPI of the distributed storage system under write operation can be counted through the NFS ganesha module. The specific collection process of the KPI of the distributed storage system under write operation includes: before the IO load operation starts, use the ganesha_stat_toolreset_nfs_ops command to clear the interface delay statistics of the NFS ganesha module; when the IO load operation ends, use the ganesha_stat_tool show_nfs_ops command to collect the interface delay statistics of the NFS ganesha module. The interface delay statistics of the NFS ganesha module include the KPI of the distributed storage system under write operation.
[0079] During the IO load operation, the mpstat command is used to collect the CPU KPIs of each storage node of the distributed storage system: 1) the percentage of CPU time consumed by user processes; 2) the percentage of CPU time consumed by kernel processes; 3) the percentage of CPU time consumed by IO waiting; 4) the percentage of time the system serves soft interrupts; 5) the percentage of time the CPU is in an idle state. Specifically, the sampling frequency is 10 seconds, and the sampling is performed 10 times to calculate the average value, and each KPI is normalized to between 0 and 1, as shown in Table 2:
[0080] Table 2
[0081] KPI meaning Normalization method %usr The percentage of CPU time consumed by user processes %usr / 100, normalized to percentage %sys The percentage of CPU time consumed by kernel processes %sys / 100, normalized to a percentage %iowait The percentage of CPU time consumed by IO waiting %iowait / 100, normalized to a percentage %soft The percentage of time the system is servicing soft interrupts %soft / 100, normalized to percentage %idle The percentage of time the CPU is idle %idle / 100, normalized to percentage
[0082] During the IO load operation, the iostat command is used to collect the KPIs of the disks of each storage node of the distributed storage system: 1) Write IOPS (Input / Output Operations Per Second); 2) Write bandwidth; 3) Average request size (the length of written data corresponding to a single request);
[0083] 4) Average request queue length (number of pending requests); 5) Average processing time for each IO request; 6) Average service time for each I / O operation; 7) Device busyness. Specifically, the sampling frequency is 10 seconds, and the sampling is performed 10 times to calculate the average value. Each KPI is normalized to between 0 and 1, as shown in Table 3:
[0084] Table 3
[0085] KPI meaning Normalization method w / s Write IOPS w / s / 100, normalized to 0-1 wMB / s Write bandwidth wMB / s / 100, normalized to 0-1 avgrq-sz Average request size avgrq-sz / 1000, normalized to 0-1 avgqu-sz Average request queue length avgqu-sz / 10, normalized to 0-1 await The average processing time of each IO request await / 100, normalized to 0.1 seconds svctm Average service time for each I / O operation svctm / 10, normalized to 0.01 seconds %util How busy is the device? %util / 100, normalized to percentage
[0086] During the IO load operation, the sar command is used to collect the KPIs of the network cards of each storage node of the distributed storage system: 1) the number of bytes received per second; 2) the number of bytes sent per second. Specifically, the sampling frequency is 10 seconds, and the sampling is performed 10 times to calculate the average value. Each KPI is normalized to between 0 and 1, as shown in Table 4:
[0087] Table 4
[0088] KPI meaning Normalization method 1kB / s The number of bytes received per second rxkB / s*8 / (10000*1000), normalized to 10 Gigabit txkB / s The number of bytes sent per second txkB / s*8 / (10000*1000), normalized to 10 Gigabit
[0089] If the distributed storage system has 3 storage nodes, a total of 45 (3+15+21+6) key performance indicators are collected. By concatenating the normalized values in sequence, a 45-dimensional state vector can be obtained:
[0090] s t =[receive_requests, handle_req_avg_t,...,txkB / s].
[0091] As an optional embodiment, the parameter tuning method of the distributed storage system further includes:
[0092] Constructing and training a second fully connected neural network for predicting IO performance parameters of the distributed storage system based on various state parameters and various adjustable parameters of the distributed storage system;
[0093] The state parameter values and adjustable parameter values of the distributed storage system are input into the second fully connected neural network to obtain the predicted value of the IO performance parameter of the distributed storage system; wherein, the larger the predicted value, the better the IO performance of the distributed storage system.
[0094] Furthermore, the present application may also construct in advance a second fully connected neural network for predicting the IO performance parameters of the distributed storage system based on the various state parameters and adjustable parameters of the distributed storage system, that is, the input of the second fully connected neural network is the various state parameters and adjustable parameters of the distributed storage system, and the output is the IO performance parameters of the distributed storage system (the larger the IO performance parameter value, the greater the IO performance improvement of the distributed storage system). Moreover, the present application also trains the second fully connected neural network so that the IO performance parameters of the distributed storage system predicted by the second fully connected neural network based on the various state parameters and adjustable parameters of the distributed storage system are more accurate.
[0095] As an optional embodiment, the parameter tuning method of the distributed storage system further includes:
[0096] Obtain the bandwidth of the client that sends IO read and write requests to the distributed storage system;
[0097] According to the preset reward function Get the reward value r corresponding to the distributed storage system; where, is the initial bandwidth of the client; BW t The current bandwidth of the client; BW t-1 is the last bandwidth of the client; the larger the reward value r is, the better the IO performance of the distributed storage system is.
[0098] Specifically, this application measures the IO performance improvement effect of the distributed storage system by monitoring the bandwidth of the client. The higher the bandwidth, the better the IO performance of the distributed storage system. The design principle of the reward function is to use the initial IO performance of the distributed storage system as the reward and punishment baseline and encourage continuous transcendence. The reward function is as follows:
[0099]
[0100] in, Δ t→0 Indicates the percentage of current bandwidth improvement compared to the initial bandwidth; Δ t→t-1 Indicates the percentage of the current bandwidth increase compared to the previous bandwidth.
[0101] When Δ t→0 When Δ is greater than 0, that is, the current bandwidth is higher than the initial bandwidth, the reward value is generally positive. t→t-1 When it is greater than 0, that is, when the current bandwidth is higher than the previous bandwidth, the reward value is multiplied by a factor greater than 1, and the reward value increases a little; when the current bandwidth is lower than the previous bandwidth, it is multiplied by a factor less than 1, and the reward value decreases a little.
[0102] When Δ t→0 When Δ is less than 0, that is, the current bandwidth is lower than the initial bandwidth, the reward value is generally negative. t→t-1 When it is greater than 0, that is, when the current bandwidth is higher than the previous bandwidth, the reward value is multiplied by a factor less than 1, and the reward value increases a little; when the current bandwidth is lower than the previous bandwidth, it is multiplied by a factor greater than 1, and the reward value decreases a little.
[0103] As an optional embodiment, the parameter tuning method of the distributed storage system further includes:
[0104] Construct an action vector a consisting of the adjustable parameters of the distributed storage system t , and construct a state vector S composed of the state parameters of the distributed storage system t ;
[0105] The process of constructing a first fully connected neural network for recommending adjustable parameters of the distributed storage system according to the state parameters of the distributed storage system includes:
[0106] Constructed according to the state vector St Recommended action vector a t The first fully connected neural network;
[0107] The process of collecting various state parameter values of the distributed storage system and inputting the various state parameter values into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system includes:
[0108] Collect the state parameter values of the distributed storage system and obtain the state vector S composed of the state parameter values t ;
[0109] The state vector S t Input to the first fully connected neural network to obtain the action vector a consisting of the recommended values of each adjustable parameter t .
[0110] Furthermore, the present application also constructs an action vector a composed of various adjustable parameters of the distributed storage system. t , and construct a state vector S composed of the state parameters of the distributed storage system t (The above embodiments have been described in detail, and this application will not repeat them again.) In this application, the core adjustable parameters of the distributed storage system can be selected to construct the action vector a t , for example, by selecting 15 core adjustable parameters of the NFS ganesha module (see Table 5 below), setting the minimum and maximum values of the core adjustable parameters based on expert experience, and concatenating the 15 core adjustable parameters, a 15-dimensional action vector can be obtained:
[0111] a t =[Nb_Worker, Nb_Worker_Queue,...,Multi_Num]
[0112] Table 5
[0113]
[0114]
[0115] The construction principle of the first fully connected neural network (such as the Actor neural network) is as follows: construct a four-layer first fully connected neural network, including an input layer, a first hidden layer, a second hidden layer, and an output layer. The input layer corresponds to the state vector S of the distributed storage system. t, a total of 45 dimensions (the input layer contains 45 neurons); the first hidden layer contains M (set to 400) neurons, and the activation function is Relu (Rectified Linear Unit, linear rectifier function); the second hidden layer contains N (set to 300) neurons, and the activation function is Relu; the output layer corresponds to the action vector a of the distributed storage system t , a total of 15 dimensions (the output layer contains 15 neurons), and the activation function is Sigmoid (S-type function). t Input into the first fully connected neural network to get the recommended action vector a t , at this time the action vector a t The values are all between 0-1.
[0116] Similarly, the construction principle of the second fully connected neural network (such as the Critic neural network) is as follows: construct a four-layer second fully connected neural network, including an input layer, a first hidden layer, a second hidden layer, and an output layer. The input layer corresponds to the action vector a of the distributed storage system. t and the state vector S t , spliced together, a total of 60 (15 + 45) dimensions (the input layer contains 60 neurons); the first hidden layer contains M (set to 400) neurons, and the activation function is Relu; the second hidden layer contains N (set to 300) neurons, and the activation function is Relu; the output layer corresponds to the IO performance parameters of the distributed storage system and contains 1 neuron.
[0117] As an optional embodiment, the training process of the first fully connected neural network and the second fully connected neural network includes:
[0118] Reset the adjustable parameters of the distributed storage system to the default parameters, and collect the state vector S when the client continues to send IO read and write requests within the preset time. t , and after the client sends the IO read and write request, collect the client's bandwidth;
[0119] The state vector collected this time is input into the first fully connected neural network to obtain the action vector a where the recommended values of each adjustable parameter are between 0 and 1. t , and according to the actual minimum and maximum values of each adjustable parameter, the recommended value of each adjustable parameter is mapped to the corresponding minimum and maximum values, and the action vector a is obtained. t The actual corresponding parameter vector;
[0120] Adjusting various adjustable parameters of the distributed storage system according to the parameter vector, and restarting the distributed storage system to make the adjustable parameters take effect;
[0121] When the client continues to send IO read and write requests within the preset time, the state vector S of the distributed storage system under the new configuration is collected. t+1 , and after the client re-issues the IO read and write request, collect the client's bandwidth, and calculate the reward value r of the distributed storage system under the new configuration according to the preset reward function t ;
[0122] The four-tuple (s t a t r t s t+1 ) add the experience replay pool, and return to execute the step of inputting the state vector collected this time into the first fully connected neural network, and stop the return operation when the number of return executions reaches the preset first number, and update the network parameter values of the first fully connected neural network and the second fully connected neural network according to the data in the experience replay pool and the DDPG algorithm;
[0123] After the network parameter values of the first / second fully connected neural network are updated, the step of resetting the adjustable parameters of the distributed storage system to the default parameters is re-executed until the number of re-executions reaches a preset second number, and the training of the first / second fully connected neural network is completed.
[0124] Specifically, the training process of the first fully connected neural network and the second fully connected neural network is (offline learning process):
[0125] 1) Reset the adjustable parameters of the distributed storage system to the default parameters. The client continues to send IO read and write requests within a preset time (such as 100 seconds). When the client continues to send IO read and write requests within the preset time, collect the state vector S of the distributed storage system. t (The system default state is obtained at this time), and after the client sends the IO read and write request, the client's bandwidth is collected (the system default IO performance can be obtained at this time, which is also used for subsequent reward functions).
[0126] 2) Input the state vector collected this time into the first fully connected neural network to obtain the action vector a in which the recommended values of each adjustable parameter are between 0 and 1 t , and according to the actual minimum and maximum values of each adjustable parameter, the recommended value of each adjustable parameter is mapped to the corresponding minimum and maximum values, and the action vector a is obtained. t The actual corresponding parameter vector.
[0127] 3) Adjust the adjustable parameters of the distributed storage system accordingly according to the parameter vector, and restart the distributed storage system to make the adjustable parameters take effect.
[0128] 4) The client continues to issue IO read and write requests within the preset time.
[0129] 5) When the client continues to issue IO read and write requests within the preset time, the state vector S of the distributed storage system under the new configuration is collected t+1 .
[0130] 6) After the client re-issues the IO read and write request, collect the client's bandwidth and calculate the reward value r of the distributed storage system under the new configuration according to the preset reward function t .
[0131] 7) The quaternion (s t a t r t s t+1 ) added to the experience replay pool.
[0132] 8) Steps 2-8 are 1 step, and every 30 steps constitutes a round. At the beginning of each round, step 1 is executed, that is, the adjustable parameters of the distributed storage system are reset to the default parameters.
[0133] 9) At the end of each round, the network parameter values of the first fully connected neural network and the second fully connected neural network are updated based on the data in the experience replay pool and the DDPG (deep deterministic policy gradient algorithm) algorithm (the purpose is to iteratively update the first fully connected neural network and the second fully connected neural network based on the feedback from the distributed storage system until the neural network model converges).
[0134] After the training of the first fully connected neural network and the second fully connected neural network is completed, the first fully connected neural network and the second fully connected neural network can be applied to the actual distributed storage system (online tuning process):
[0135] 1) When the client sends an IO read / write request, the state vector S of the distributed storage system is collected t .
[0136] 2) Input the state vector collected this time into the first fully connected neural network to obtain the action vector a in which the recommended values of each adjustable parameter are between 0 and 1 t , and according to the actual minimum and maximum values of each adjustable parameter, the recommended value of each adjustable parameter is mapped to the corresponding minimum and maximum values, and the action vector a is obtained. t The actual corresponding parameter vector.
[0137] 3) Adjust the adjustable parameters of the distributed storage system accordingly according to the parameter vector, and restart the distributed storage system to make the adjustable parameters take effect.
[0138] 4) The client re-issues the IO read and write request.
[0139] 5) When the client re-issues the IO read / write request, the state vector S of the distributed storage system under the new configuration is collected t+1 .
[0140] 6) After the client re-issues the IO read and write request, collect the client's bandwidth and calculate the reward value r of the distributed storage system under the new configuration according to the preset reward function t .
[0141] 7) The quaternion (s t a t r t s t+1 ) is added to the experience replay pool for further fine-tuning of the first fully connected neural network and the second fully connected neural network.
[0142] 8) Perform multi-step optimization based on the performance improvement of the client.
[0143] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a parameter tuning system for a distributed storage system provided by an embodiment of the present invention.
[0144] The parameter tuning system of the distributed storage system includes:
[0145] Construction module 1, used to construct and train a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system;
[0146] Recommendation module 2, used for collecting various state parameter values of the distributed storage system, and inputting the various state parameter values into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system;
[0147] The adjustment module 3 is used to adjust the adjustable parameters of the distributed storage system according to the recommended values.
[0148] For an introduction to the parameter tuning system provided in this application, please refer to the embodiment of the above-mentioned parameter tuning method, and this application will not go into details here.
[0149] The present application also provides a parameter tuning device for a distributed storage system, comprising:
[0150] Memory for storing computer programs;
[0151] A processor is used to implement the steps of any of the above-mentioned distributed storage system parameter tuning methods when executing a computer program.
[0152] For an introduction to the parameter tuning device provided in this application, please refer to the embodiment of the above-mentioned parameter tuning method, and this application will not go into details here.
[0153] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0154] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A parameter tuning method for a distributed storage system, characterized in that: include: Constructing and training a first fully connected neural network for recommending adjustable parameters of the distributed storage system according to state parameters of the distributed storage system; Collecting each state parameter value of the distributed storage system, and inputting each state parameter value into the first fully connected neural network to obtain recommended values of each adjustable parameter of the distributed storage system; Adjusting the adjustable parameters of the distributed storage system accordingly according to the recommended values; Obtaining the bandwidth of a client that issues an IO read / write request to the distributed storage system; According to the preset reward function Obtain the reward value r corresponding to the distributed storage system; wherein, BW0 is the initial bandwidth of the client; BW t is the current bandwidth of the client; BW t-1 is the last bandwidth of the client; the larger the reward value r is, the better the IO performance of the distributed storage system is.
2. The parameter tuning method of the distributed storage system according to claim 1, characterized in that: The recommended values of the adjustable parameters output by the first fully connected neural network are all between 0 and 1; Then the parameter tuning method of the distributed storage system further includes: Set corresponding minimum and maximum values for the adjustable parameters of the distributed storage system respectively; After obtaining the recommended values of the adjustable parameters of the distributed storage system, before adjusting the adjustable parameters of the distributed storage system accordingly according to the recommended values, the recommended values of the adjustable parameters are mapped between the corresponding minimum and maximum values according to the corresponding minimum and maximum values of the adjustable parameters, so as to adjust the adjustable parameters of the distributed storage system accordingly according to the mapped values of the adjustable parameters.
3. The parameter tuning method of the distributed storage system according to claim 1, characterized in that: The process of collecting the state parameter values of the distributed storage system includes: During the interaction between the distributed storage system and the client, collecting performance indicator parameter values of the distributed storage system under a write operation; The performance index parameter values of the CPU, disk and network card of each storage node of the distributed storage system are collected.
4. The parameter tuning method of the distributed storage system according to claim 3, characterized in that: The parameter tuning method of the distributed storage system also includes: Before inputting the state parameter values into the first fully connected neural network, the collected state parameter values are normalized to input the normalized state parameter values into the first fully connected neural network.
5. The parameter tuning method for a distributed storage system according to any one of claims 1 to 4, characterized in that: The parameter tuning method of the distributed storage system also includes: Constructing and training a second fully connected neural network for predicting IO performance parameters of the distributed storage system according to various state parameters and various adjustable parameters of the distributed storage system; Input each state parameter value and each adjustable parameter value of the distributed storage system into the second fully connected neural network to obtain a predicted value of the IO performance parameter of the distributed storage system; wherein, the larger the predicted value, the better the IO performance of the distributed storage system.
6. The parameter tuning method of the distributed storage system according to claim 5, characterized in that: The parameter tuning method of the distributed storage system also includes: Construct an action vector a composed of the adjustable parameters of the distributed storage system t , and construct a state vector S composed of the state parameters of the distributed storage system t ; The process of constructing a first fully connected neural network for recommending adjustable parameters of the distributed storage system according to the state parameters of the distributed storage system includes: Construct the state vector S according to t The action vector a is recommended t The first fully connected neural network; The process of collecting each state parameter value of the distributed storage system and inputting each state parameter value into the first fully connected neural network to obtain the recommended value of each adjustable parameter of the distributed storage system includes: Collect the state parameter values of the distributed storage system to obtain a state vector s composed of the state parameter values t ; The state vector s t Input into the first fully connected neural network to obtain an action vector a composed of the recommended values of the adjustable parameters t .
7. The parameter tuning method of the distributed storage system according to claim 6, characterized in that: The training process of the first fully connected neural network and the second fully connected neural network includes: Reset the adjustable parameters of the distributed storage system to the default parameters, and when the client continues to send IO read and write requests within a preset time, collect the state vector s t , and after the client sends the IO read / write request, collect the bandwidth of the client; The state vector collected this time is input into the first fully connected neural network to obtain the action vector a where the recommended values of each adjustable parameter are between 0 and 1. t , and according to the minimum and maximum values actually corresponding to each of the adjustable parameters, the recommended values of each adjustable parameter are mapped to the range between the minimum and maximum values corresponding to each of the adjustable parameters, and the action vector a is obtained. t The actual corresponding parameter vector; Adjusting the adjustable parameters of the distributed storage system accordingly according to the parameter vector, and restarting the distributed storage system to make the adjustable parameters take effect; When the client continues to send IO read and write requests within the preset time, the state vector s of the distributed storage system under the new configuration is collected. t+1 , and after the client re-issues the IO read / write request, collect the bandwidth of the client, and calculate the reward value r of the distributed storage system under the new configuration according to the preset reward function t ; The four-tuple (s t a t r t s t+1 ) add the experience replay pool, and return to execute the step of inputting the state vector collected this time into the first fully connected neural network, and stop the return operation when the number of return executions reaches the preset first number, and update the network parameter values of the first fully connected neural network and the second fully connected neural network according to the data in the experience replay pool and the DDPG algorithm; After the network parameter values of the first fully connected neural network and the second fully connected neural network are updated, the step of resetting the adjustable parameters of the distributed storage system to the default parameters is re-executed until the number of re-executions reaches a preset second number, and the training of the first fully connected neural network and the second fully connected neural network is completed.
8. A parameter tuning system for a distributed storage system, characterized in that: include: A construction module, used to construct and train a first fully connected neural network for recommending various adjustable parameters of the distributed storage system according to various state parameters of the distributed storage system; A recommendation module, used for collecting various state parameter values of the distributed storage system, and inputting the various state parameter values into the first fully connected neural network to obtain recommended values of various adjustable parameters of the distributed storage system; An adjustment module, used for adjusting the adjustable parameters of the distributed storage system according to the recommended values; An IO performance evaluation module, used to obtain the bandwidth of a client that issues an IO read / write request to the distributed storage system; According to the preset reward function Obtain the reward value r corresponding to the distributed storage system; wherein, BW0 is the initial bandwidth of the client; BW t is the current bandwidth of the client; BW t-1 is the last bandwidth of the client; the larger the reward value r is, the better the IO performance of the distributed storage system is.
9. A parameter tuning device for a distributed storage system, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the parameter tuning method for a distributed storage system as described in any one of claims 1 to 7 when executing the computer program.
