CN117827087A - Log data dump method and device, storage medium and electronic equipment - Google Patents

Log data dump method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117827087A
CN117827087A CN202311596664.4A CN202311596664A CN117827087A CN 117827087 A CN117827087 A CN 117827087A CN 202311596664 A CN202311596664 A CN 202311596664A CN 117827087 A CN117827087 A CN 117827087A
Authority
CN
China
Prior art keywords
storage device
dump
log data
dumped
storage devices
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311596664.4A
Other languages
Chinese (zh)
Inventor
谢鹏
张建刚
赵鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311596664.4A priority Critical patent/CN117827087A/en
Publication of CN117827087A publication Critical patent/CN117827087A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application provides a log data dumping method, a log data dumping device, a storage medium and electronic equipment, and relates to the technical field of computers, wherein the log data dumping method comprises the following steps: determining a dump time slice of each storage device based on the idle time period of each storage device; determining the dump time length of each storage device based on the median of the time length of the dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; and based on the target dump sequence and the dump duration of each storage device, sequentially dumping the log data to be dumped of the storage devices to the external storage device in the dump time slice of each storage device. The log data dumping method, the log data dumping device, the storage medium and the electronic equipment are used for realizing efficient execution of dumping through combining the dumping sequence of the storage equipment, the dumping time slices and the data volume of dump log data.

Description

Log data dump method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a log data dumping method, a log data dumping device, a storage medium, and an electronic device.
Background
A storage area network (Storage Area Network, SAN) is a computer data storage solution that utilizes high-speed network connections to connect storage devices to computer systems. A storage area network SAN can provide high capacity, high performance storage resources and shared storage space for multiple servers. When a user accesses a resource stored in the storage area network SAN, more log data is generated, and in order to avoid the loss of the log data, a dump operation is required to be performed on the log data.
In the related art, log data may be dumped to an external storage device by means of periodic dumping, event-triggered dumping, and real-time dumping. However, such a dumping manner does not consider the influence of the dumping process on the system performance, which may not only result in dump failure, but also affect the performance of the storage area network SAN, and the dumping efficiency is low.
Disclosure of Invention
The invention aims to provide a log data dumping method, a log data dumping device, a storage medium and electronic equipment, which are used for realizing efficient execution of dumping through combining a dumping sequence of the storage equipment, a dumping time slice and a data volume of dump log data.
The application provides a log data dumping method, which comprises the following steps:
acquiring log data to be dumped of each storage device in the plurality of storage devices, and determining a dump time slice of each storage device based on an idle time period of each storage device; the dump time slice is a time period for the storage device to perform log dump; determining a dump time length of each storage device based on a time length median of dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
Optionally, the determining the dump time slice of each storage device based on the idle time period of each storage device includes: acquiring a historical performance numerical value record of a target storage device, and dividing time periods of the target storage device according to performance numerical values of all moments in the historical performance numerical value record to obtain a plurality of time periods to be confirmed; calculating the average value and the mean square error of the performance values in each time period to be confirmed in the time periods to be confirmed, and determining the time period to be confirmed with the duration longer than the preset duration and the minimum target weighted average value in the time periods to be confirmed as the dump time slice of the target storage device; wherein the target storage device is any one of the plurality of storage devices; the target weighted average value is the average value obtained by weighted summation of the average value of the performance numerical value and the mean square error of the performance numerical value.
Optionally, the determining, based on the median of the lengths of the dump time slices of the respective storage devices in the plurality of storage devices, the dump time length of each storage device includes: acquiring the duration of the dump time slice of each storage device in the plurality of storage devices, and calculating the median of the duration of the dump time slice of each storage device to obtain the dump duration of each storage device.
Optionally, based on the target dump sequence and the dump duration of each storage device, the dumping log data to be dumped of the plurality of storage devices is dumped to the external storage device in turn in the dump time slice of each storage device, including: and under the condition that dump time slices of any two storage devices of the plurality of storage devices are not overlapped and the total quantity of log data to be dumped of the plurality of storage devices is smaller than or equal to the total quantity of receivable data of the external storage device, the log data to be dumped of the plurality of storage devices are dumped into the external storage device in sequence in the dump time slices of each storage device.
Optionally, based on the target dump sequence and the dump duration of each storage device, the dumping log data to be dumped of the plurality of storage devices is dumped to the external storage device in turn in the dump time slice of each storage device, including: when the dump time slices of any two storage devices do not overlap and the total amount of log data to be dumped of the storage devices is larger than the total amount of receivable data of the external storage device, calculating the corresponding total amount of dump data of each storage device when the log data dump operation is finished based on the target dump sequence and the data amount of the log data to be dumped of each storage device, and determining that the first storage device, which corresponds to the total amount of dump data when the log data dump operation is finished and is larger than or equal to the total amount of receivable data, is a suspension storage device; sequentially dumping the storage devices positioned in front of the suspension storage device and the log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device according to the dumping sequence; if the data volume of the remaining log data to be dumped of the suspension storage device is zero under the condition that the external storage device cannot receive more log data to be dumped, triggering a first alarm notification; otherwise, triggering a second alarm notification; the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
Optionally, based on the target dump sequence and the dump duration of each storage device, the dumping log data to be dumped of the plurality of storage devices is dumped to the external storage device in turn in the dump time slice of each storage device, including: and when two overlapped storage devices with overlapped dump time slices exist in the storage devices and the total quantity of log data to be dumped of the storage devices is smaller than or equal to the total quantity of receivable data of the external storage device, dumping the log data to be dumped of the overlapped storage devices with the front dump sequence to the external storage device based on the dump duration, and dumping the log data to be dumped of the overlapped storage devices with the rear dump sequence to the external storage device in the dump time slices of the non-overlapped part.
Optionally, based on the target dump sequence and the dump duration of each storage device, the dumping log data to be dumped of the plurality of storage devices is dumped to the external storage device in turn in the dump time slice of each storage device, including: when two overlapped storage devices with overlapped dump time slices exist in the storage devices and the total amount of log data to be dumped of the storage devices is larger than the total amount of receivable data of the external storage device, calculating the corresponding dump data total amount of each storage device at the end of executing log data dumping operation, and determining the first storage device with the corresponding dump data total amount being larger than or equal to the total amount of receivable data at the end of executing log data dumping operation as a suspension storage device; when the two overlapped storage devices are not the suspension storage devices, dumping the log data to be dumped of the overlapped storage devices with the front dumping sequence into the external storage device based on the dumping duration, and dumping the log data to be dumped of the overlapped storage devices with the rear sequence into the external storage device in a dumping time slice of the non-overlapped part; when the overlapped storage device with the front dump sequence is the suspension storage device, sequentially dumping the storage devices positioned in front of the suspension storage device and log data to be dumped in the suspension storage device to the external storage device according to the dump sequence, and triggering a first alarm notification if the data volume of the rest log data to be dumped of the suspension storage device is zero when the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; when the overlapped storage device with the back dump sequence is the suspension storage device, dumping the log data to be dumped of the overlapped storage device with the front dump sequence to the external storage device based on the dump duration, dumping the log data to be dumped of the overlapped storage device with the back dump sequence to the external storage device in a dump time slice of a non-overlapped part, and triggering a first alarm notification if the data quantity of the residual log data to be dumped of the suspension storage device is zero under the condition that the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
The application also provides a log data dumping device, which comprises:
the acquisition module is used for acquiring log data to be dumped of each storage device in the plurality of storage devices; a determining module, configured to determine a dump time slice of each storage device based on an idle period of each storage device; the dump time slice is a time period for the storage device to perform log dump; the determining module is further used for determining the dump time length of each storage device based on the median of the time length of the dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; the dump module is used for determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of the dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to the external storage device in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
Optionally, the acquiring module is further configured to acquire a historical performance numerical value record of the target storage device, and divide a time period of the target storage device according to performance numerical values at each moment in the historical performance numerical value record, so as to obtain a plurality of time periods to be confirmed; the determining module is specifically configured to calculate an average value and a mean square error of performance values in each of the multiple time periods to be confirmed, and determine, as a dump time slice of the target storage device, a time period to be confirmed in which a duration of the multiple time periods to be confirmed is greater than a preset duration and a target weighted average value is minimum; wherein the target storage device is any one of the plurality of storage devices; the target weighted average value is the average value obtained by weighted summation of the average value of the performance numerical value and the mean square error of the performance numerical value.
Optionally, the acquiring module is further configured to acquire a duration of a dump time slice of each storage device in the plurality of storage devices; the determining module is specifically configured to calculate a median of a duration of the dump time slice of each storage device, so as to obtain a dump duration of each storage device.
Optionally, the dumping module is specifically configured to dump the log data to be dumped of the plurality of storage devices to the external storage device in sequence in a dumping time slice of each storage device when the dumping time slices of any two storage devices of the plurality of storage devices do not overlap, and the total amount of log data to be dumped of the plurality of storage devices is less than or equal to the total amount of receivable data of the external storage device.
Optionally, the dump module is specifically configured to calculate, based on the target dump order and a data amount of log data to be dumped of each storage device, a total amount of dump data corresponding to each storage device when the log data dump operation is finished, and determine, as a suspension storage device, a first storage device whose total amount of dump data corresponding to the log data dump operation is finished is greater than or equal to the total amount of receivable data when the log data dump operation is finished, when dump time slices of any two storage devices of the plurality of storage devices do not overlap and the total amount of log data to be dumped of the plurality of storage devices is greater than the total amount of receivable data of the external storage device; the dumping module is specifically configured to dump the storage devices located before the suspension storage device and log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device in sequence according to the dumping sequence; the dump module is specifically further configured to trigger a first alarm notification if the data amount of the remaining log data to be dumped of the suspension storage device is zero in a case that the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
Optionally, the dumping module is specifically configured to dump, when two overlapped storage devices with overlapping dump time slices exist in the plurality of storage devices and the total amount of log data to be dumped of the plurality of storage devices is less than or equal to the total amount of receivable data of the external storage device, log data to be dumped of an overlapped storage device with a front dump sequence into the external storage device based on the dump duration, and dump log data to be dumped of an overlapped storage device with a rear dump sequence into the external storage device in a dump time slice of a non-overlapping portion.
Optionally, the dump module is specifically configured to calculate a total amount of dump data corresponding to each storage device when the log data dump operation is performed is finished, and determine, as the suspension storage device, a first storage device whose total amount of dump data corresponding to the log data dump operation is greater than or equal to the total amount of receivable data when the log data dump operation is performed is finished, in a case where two overlapping storage devices with dump time slices overlapping exist in the plurality of storage devices, and the total amount of log data to be dumped of the plurality of storage devices is greater than the total amount of receivable data of the external storage device; the dump module is specifically further configured to dump log data to be dumped of the overlapping storage device with a front dump order to the external storage device based on the dump duration, and dump log data to be dumped of the overlapping storage device with a rear dump order to the external storage device in a dump time slice of a non-overlapping portion when the two overlapping storage devices are not the suspension storage device; the dump module is specifically further configured to, when the overlapping storage device with the front dump order is the suspension storage device, dump the storage device located before the suspension storage device and log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device according to the dump order, and trigger a first alarm notification if the data size of the remaining log data to be dumped of the suspension storage device is zero when the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the dumping module is specifically configured to dump log data to be dumped of an overlapping storage device with a front dumping sequence to the external storage device based on the dumping duration when the overlapping storage device with the rear dumping sequence is the suspension storage device, dump log data to be dumped of the overlapping storage device with the rear dumping sequence to the external storage device in a dumping time slice of a non-overlapping part, and trigger a first alarm notification if the data amount of the remaining log data to be dumped of the suspension storage device is zero when the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
The present application also provides a computer program product comprising computer programs/instructions which when executed by a processor implement the steps of a log data dump method as described in any one of the above.
The application also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the log data dump method as described in any one of the above when executing the program.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the log data dump method as described in any of the above.
The log data dumping method, the log data dumping device, the storage medium and the electronic equipment provided by the application firstly acquire log data to be dumped of each storage device in the plurality of storage devices, and determine dump time slices of each storage device based on idle time periods of each storage device; the dump time slice is a time period for the storage device to perform log dump; then, determining the dump time length of each storage device based on the median of the dump time slices of the storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; finally, determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice. In this way, efficient execution of the dump is achieved by combining the dump order of the storage devices, the dump time slices, and the data volume of the dump log data.
Drawings
In order to more clearly illustrate the technical solutions of the present application or the prior art, the following description will briefly introduce the drawings used in the embodiments or the description of the prior art, and it is obvious that, in the following description, the drawings are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a storage area network provided herein;
FIG. 2 is a schematic diagram of a scheduling module according to the present application;
FIG. 3 is a schematic flow chart of a log data dumping method provided in the present application;
FIG. 4 is a second flowchart of a log data dumping method provided in the present application;
FIG. 5 is a schematic diagram of a log data dump device according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is apparent that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type and not limited to the number of objects, e.g., the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The following description is made with respect to terms related to embodiments of the present application:
a storage area network (Storage Area Network, SAN) is a computer data storage solution that utilizes high-speed network connections to connect storage devices to computer systems. A SAN can provide high capacity, high performance storage resources and shared storage space for multiple servers. The major components of a SAN include storage devices (e.g., disk arrays), storage switches, and host adapters. Storage devices typically consist of multiple disks, which are connected to a computer network through a storage switch. The host adapter is then responsible for sending data from the server to the storage device or receiving data from the storage device. The main advantages of SAN are that it can provide high availability, high performance and flexibility. By managing storage resources independently of the server, the SAN may enable storage resource sharing and centralized management, which makes management of storage resources more flexible and efficient. In addition, the SAN also supports key functions such as data backup, recovery, disaster recovery and the like, and can provide reliable data protection and fault tolerance performance. In summary, a Storage Area Network (SAN) is a storage solution based on a high-speed network connection that can provide high-capacity, high-performance storage resources and provide shared storage space for multiple servers.
As shown in fig. 1, a SAN storage network architecture to which the log data dumping method provided in the embodiment of the present application is applied; the SAN adopts an extensible network topology structure to connect servers and storage devices, each storage device is not affiliated to any server, and all the storage devices can be shared as peer-to-peer resources among all the network servers. Currently common SANs are of two types, a mesh channel FC SAN, which is a small computer system interface (Small Computer System Interface, SCSI) protocol that forwards over fibre channel, and a fibre channel IP SAN, which forwards SCSI protocol over TCP/IP channel. The user device may access and use the resources provided by the storage through a local area network. When multiple users use the resource at the same time, more logs are generated due to larger service concurrency, and then dump operation is needed to be carried out on the logs.
Under the SAN storage network architecture, the storage system generates a plurality of system logs along with the increase of the running time, particularly under the condition of high concurrency of input and output IO of a host, the system logs are proliferated, and the system logs are all persisted under the catalog of the storage device, the catalog is limited in capacity, when the capacity limit is reached, old system logs under the catalog are covered or new system logs cannot be written, and finally, the loss of log records is caused, so that the fault elimination, performance analysis or security audit when needed are affected.
Aiming at the technical problems, the common solutions in the related art are as follows: 1) Periodic dumping of the storage device log (periodically copying log information of the storage device to an external storage medium, such as a hard disk, tape, or network storage device, in a set time interval); 2) Storing device log event trigger dump (automatically dumping log information to an external storage medium when a specific event occurs, such as device failure, error occurrence or storage capacity reaches a certain threshold); 3) Storage device log real-time dump (transfer of storage device log information to a remote server or log management system in real-time for real-time monitoring and analysis). The common solution in the industry is only one-time willingness to dump the storage log to the external storage medium, but the busyness of the storage device and the external storage medium is not considered, for example, the periodic dump time is too short, which can cause frequent task switching and increase the system overhead; too long a time may cause some tasks to occupy CPU resources of the central processing unit for a long time, affecting the response speed of other tasks. If the dump is unsuccessful, the log loss problem still cannot be solved. Particularly, in a data center, a plurality of sets of storage devices are used for centrally dumping logs to the same dumping server, and when the storage devices are more, if dumping time slices among the sets of storage devices cannot be coordinated, simultaneous dumping of the plurality of sets of devices can occur, the admission capacity of the dumping server is affected, the dumping efficiency is affected, and dumping failure can be caused. Therefore, in the log dumping, considering the dumping sequence, time slices and dump log amount of the storage device and the external storage medium is a problem to be solved urgently for improving the log dumping efficiency.
Aiming at the technical problems in the related art, the log data dumping method provided by the embodiment of the application obtains the dumping sequence, the dumping time slice and the dumping log quantity through negotiation between a plurality of storage devices and an external storage medium, and then efficiently dumps. The method comprises the steps that a scheduling module is arranged between a plurality of storage devices and an external storage medium, and the scheduling module is mainly used for monitoring idle time periods and transmittable log amounts of the plurality of devices and simultaneously obtaining the idle time periods and the receivable log amounts of the external storage medium. The method combines the storage devices to obtain the dump sequence among the storage devices, the dump time slice and the dump log quantity of each storage device, and the storage devices and the external storage medium can cooperate to efficiently finish log dump work. This is very beneficial for scenarios where traffic concurrency is high under SAN storage network architecture.
The log data dumping method provided by the embodiment of the application has the following advantages: 1. function of the scheduling module: the scheduling module is a core component of the whole system, and is mainly used for monitoring idle time periods and transmittable log amounts of a plurality of storage devices and simultaneously acquiring the idle time periods and the receivable log amounts of an external storage medium. By analyzing this information, the scheduling module may integrate factors such as device load, storage capacity, transmission speed, etc. to determine the dump order, dump time slices, and dump log amounts. 2. Determination of dump sequence: the scheduling module may determine a dump order based on idle periods of the plurality of storage devices, the amount of transferable logs, and the device load. By reasonably arranging the dump sequence, resource contention and performance degradation caused by simultaneous dumping of multiple devices can be avoided. 3. Determination of dump time slices: through negotiation, the storage device and the external storage medium may determine the time slices allocated for each device. In this way, the problem that some devices occupy excessive resources in the dumping process, so that the dumping efficiency of other devices is reduced can be avoided. 4. Control of dump log data volume: for efficient dumping, the storage device and external storage medium may determine the amount of log that should be dumped per time slice to avoid excessive log information accumulation, affecting the speed and efficiency of the dump.
As shown in fig. 2, the operation modes of the scheduling module include: after the external storage medium required by log dumping is configured on the storage device, the scheduling module starts to work, and the main function of the scheduling module is to monitor the idle time periods and the transmittable log amounts of the plurality of storage devices and simultaneously acquire the idle time periods and the receivable log amounts of the external storage medium. By analyzing this information, the scheduling module may integrate factors such as device load, storage capacity, transmission speed, etc. to determine the dump order, dump time slices, and dump log amounts.
The log data dumping method provided by the embodiment of the application is described in detail below through specific embodiments and application scenes thereof with reference to the accompanying drawings.
As shown in fig. 3, a log data dumping method provided in an embodiment of the present application may include the following steps 301 to 303:
step 301, obtaining log data to be dumped of each storage device in the plurality of storage devices, and determining a dump time slice of each storage device based on an idle time period of each storage device; the dump time slice is a time period for the storage device to perform log dump.
By way of example, in the log data dumping method provided in the embodiment of the present application, first, idle time periods of a plurality of storage devices need to be acquired, a time period with a service pressure is obtained based on a historical performance value of each storage device, and a time period with a small service pressure is reserved, that is, the idle time period, and the idle time period can confirm the dumping sequence of each storage device; acquiring the duration median of the idle time period, wherein the duration exceeds the median, and if dump is carried out according to the real duration, the dump task can occupy the CPU resource for a long time, so that the execution of other tasks is influenced.
Specifically, the step 301 may include the following steps 301a1 and 301a2:
step 301a1, a historical performance numerical record of a target storage device is obtained, and time segments of the target storage device are divided according to performance numerical values at all times in the historical performance numerical record, so that a plurality of time segments to be confirmed are obtained.
Step 301a2, calculating an average value and a mean square error of the performance values in each of the plurality of time periods to be confirmed, and determining the time period to be confirmed with the duration longer than a preset duration and the minimum target weighted average value in the plurality of time periods to be confirmed as a dump time slice of the target storage device.
Wherein the target storage device is any one of the plurality of storage devices; the target weighted average value is the average value obtained by weighted summation of the average value of the performance numerical value and the mean square error of the performance numerical value.
It can be understood that the time period with lower average value of the performance values and smaller fluctuation of the performance values is determined as the idle time period, so that the dump efficiency of the log data can be effectively improved.
Step 302, determining a dump duration of each storage device based on a median of durations of dump time slices of each storage device in the plurality of storage devices.
The dump duration is the maximum duration consumed by the storage device for dumping log data in the dump time slice.
Specifically, the step 302 may include the following steps 302a:
step 302a, obtaining a duration of a dump time slice of each storage device in the plurality of storage devices, and calculating a median of the duration of the dump time slice of each storage device to obtain the dump duration of each storage device.
It can be understood that the dump operation is executed according to the median of the dump time slice duration, so that the dump task can be prevented from occupying system resources for a long time, and further, the execution of other tasks is prevented from being influenced.
Step 303, determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of the dump time slices of each storage device, and sequentially dumping the log data to be dumped of the plurality of storage devices to an external storage device in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device.
In the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
For example, when executing the dump operation of the log data to be dumped, further combining the current load and the transmission speed of the storage device to determine, if the load of the storage device in the dump time slice is higher and the transmission speed is lower, the dump operation of the log data to be dumped may not be executed.
For example, after the dump time slice, the dump duration, and the target dump sequence of each storage device are acquired, the log data to be dumped of the plurality of storage devices may be sequentially dumped to the external storage device within the dump time slice of each storage device.
It should be noted that, the storage device performs the dump of the log data to be dumped according to the dump duration in the corresponding dump time slice, so that all the log data to be dumped in the storage device are dumped to the external storage device at one time, and therefore, multiple rounds of dump operations are required to be performed, and each dump operation can be performed according to the method steps provided by the embodiments of the present application.
In an exemplary embodiment of the present application, the dumping operation of the log data to be dumped may be divided into the following four cases, and the corresponding operations are executed in combination with the differences of the specific cases.
Case 1:
in case 1, there is no overlap in dump time slices of any two storage devices in the plurality of storage devices, and the total amount of log data to be dumped of the plurality of storage devices is smaller than or equal to the total amount of receivable data of the external storage device.
Specifically, the step 303 may include the following step 303a:
step 303a, in a case where dump time slices of any two storage devices of the plurality of storage devices do not overlap, and a total amount of log data to be dumped of the plurality of storage devices is less than or equal to a total amount of receivable data of the external storage device, sequentially dumping the log data to be dumped of the plurality of storage devices to the external storage device in a dump time slice of each storage device.
When the idle time periods of each storage device are not overlapped and the total log quantity of the multiple stored dumps does not exceed the receivable total capacity of the external storage medium, the dump can be orderly performed according to the median duration of the idle time periods and the dump log quantity, after all the dump is completed, the residual logs exceeding the median duration are obtained again, and the dump is performed for the median duration of the time period with relatively smaller residual historical performance service pressure until the dump is completed.
Case 2:
in case 2, there is no overlap in dump time slices of any two of the plurality of storage devices, and a total amount of log data to be dumped of the plurality of storage devices is greater than a total amount of receivable data of the external storage device.
Specifically, the above step 303 may include the following steps 303b1 to 303b3:
step 303b1, calculating a corresponding dump data total amount of each storage device at the end of the log data dump operation, and determining a first storage device, which has a corresponding dump data total amount greater than or equal to the receivable data total amount at the end of the log data dump operation, as a suspension storage device based on the target dump order and the data amount of the log data to be dumped of each storage device, when dump time slices of any two storage devices of the plurality of storage devices do not overlap and the total amount of log data to be dumped of the plurality of storage devices is greater than the receivable data total amount of the external storage device.
Step 303b2, sequentially dumping the storage devices located before the suspension storage device and log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device according to the dump sequence.
Step 303b3, triggering a first alarm notification if the data volume of the remaining log data to be dumped of the suspension storage device is zero under the condition that the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification.
The suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
For example, when idle periods of each storage device do not overlap, and the total log amount of the plurality of stored dumps exceeds the total receivable capacity of the external storage medium, the storage devices exceeding the total receivable capacity of the external storage medium may be calculated, and dump is performed according to the order of the idle periods, and dump is performed according to the median duration of the idle periods, where the following 2 cases are processed in time division: 1. if the storage device exceeding the total capacity of the external storage medium just dumps or fully dumps, notifying the user that the log of the subsequent device is not dumped, and reminding the user of timely capacity expansion. 2. If the log of the storage device exceeding the total capacity of the external storage medium is partially dumped, notifying the user that the logs of the current device and the subsequent devices are not dumped, and reminding the user of timely capacity expansion.
Case 3:
in case 3, there are two overlapping storage devices in which dump time slices overlap, and the total amount of log data to be dumped of the plurality of storage devices is smaller than or equal to the total amount of receivable data of the external storage device.
Specifically, the step 303 may further include the following step 303c:
step 303c, in the case that two overlapped storage devices with overlapping dump time slices exist in the plurality of storage devices, and the total amount of log data to be dumped of the plurality of storage devices is smaller than or equal to the total amount of receivable data of the external storage device, dumping the log data to be dumped of the overlapped storage device with the front dump sequence into the external storage device based on the dump duration, and dumping the log data to be dumped of the overlapped storage device with the rear dump sequence into the external storage device in the dump time slices of the non-overlapped part.
When the idle time periods of each storage device overlap, and the total log amount of the multiple stored dumps does not exceed the receivable total capacity of the external storage medium, two storage devices with overlapping digits in the idle time periods can be stored, who starts dumping first, another device dumps only the time period of the non-overlapping part according to the median duration, and after all the devices complete one round of log dumping, the median duration of the time period with relatively smaller residual historical performance business pressure is acquired again for dumping until completion.
Case 4:
in case 4, there are two overlapping storage devices in which dump slots overlap, and the total amount of log data to be dumped of the plurality of storage devices is greater than the total amount of receivable data of the external storage device.
Specifically, the above step 303 may further include the following steps 303d1 to 303d4:
in step 303d1, when two overlapping storage devices with overlapping dump time slices exist in the plurality of storage devices, and the total amount of log data to be dumped of the plurality of storage devices is greater than the total amount of receivable data of the external storage device, calculating the corresponding total amount of dump data of each storage device at the end of executing the log data dumping operation, and determining the first storage device with the corresponding total amount of dump data greater than or equal to the total amount of receivable data at the end of executing the log data dumping operation as the suspension storage device.
Step 303d2, in the case that neither of the two overlapped storage devices is the suspension storage device, of dumping the log data to be dumped of the overlapped storage device with the front dumping order into the external storage device based on the dumping duration, and dumping the log data to be dumped of the overlapped storage device with the rear dumping order into the external storage device in the dumping time slice of the non-overlapped part.
Step 303d3, in the case that the overlapping storage device with the front dump order is the suspension storage device, sequentially dumping the storage devices located before the suspension storage device and the log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device according to the dump order, and in the case that the external storage device cannot receive more log data to be dumped, triggering a first alarm notification if the data volume of the remaining log data to be dumped in the suspension storage device is zero; otherwise, triggering a second alarm notification.
Step 303d4, in the case that the overlapping storage device with the back sequence is the suspension storage device, dumping log data to be dumped of the overlapping storage device with the front sequence into the external storage device based on the dumping duration, dumping log data to be dumped of the overlapping storage device with the back sequence into the external storage device in a dumping time slice of a non-overlapping part, and triggering a first alarm notification if the data amount of the remaining log data to be dumped of the suspension storage device is zero in the case that the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification.
The suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
When the idle time periods of each storage device overlap, and the total log amount of the multiple stored dumps exceeds the receivable total capacity of the external storage medium, two storage devices with overlapping digits in the idle time periods can be stored, who starts dumping first, another device only dumps the time periods of the non-overlapping parts according to the median duration, and after all the devices complete one round of log dumping, the median duration of the time period with relatively smaller residual historical performance service pressure is acquired again for dumping until completion. The following 2 cases are handled at this time: 1. if the storage device exceeding the total capacity of the external storage medium just dumps or fully dumps, notifying the user that the log of the subsequent device is not dumped, and reminding the user of timely capacity expansion. 2. If the log of the storage device exceeding the total capacity of the external storage medium is partially dumped, notifying the user that the logs of the current device and the subsequent devices are not dumped, and reminding the user of timely capacity expansion.
For example, as shown in fig. 4, a detailed flowchart of a log data dumping method according to an embodiment of the present application is shown. Taking the storage domain network system as an example, the storage domain network system includes a storage device a, a storage device B and a storage device C, the dump time periods (i.e. the dump time slices) corresponding to each storage device are respectively TA, TB and TC, and the median TD1 of the dump time period can be calculated according to the duration of the dump time period of each storage device. When the idle periods of the storage devices overlap, the log data may be dumped using a shorter dump duration TD2 for the storage device whose dump order is later.
Firstly, obtaining log data to be dumped of each storage device in the plurality of storage devices, and determining dump time slices of each storage device based on idle time periods of each storage device; the dump time slice is a time period for the storage device to perform log dump; then, determining the dump time length of each storage device based on the median of the dump time slices of the storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; finally, determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice. In this way, efficient execution of the dump is achieved by combining the dump order of the storage devices, the dump time slices, and the data volume of the dump log data.
It should be noted that, in the log data dumping method provided in the embodiment of the present application, the execution body may be a log data dumping device, or a control module in the log data dumping device for executing the log data dumping method. In the embodiment of the present application, a log data dumping device is described by taking a log data dumping method performed by the log data dumping device as an example.
In the embodiment of the application, the method is shown in the drawings. The log data dumping method is exemplified by a figure in combination with the embodiment of the application. In specific implementation, the log data dumping method shown in the above method drawings may be further implemented in combination with any other drawing that may be combined and is illustrated in the above embodiment, which is not described herein again.
The log data dumping device provided by the application is described below, and the log data dumping method described below and the log data dumping method described above can be referred to correspondingly.
Fig. 5 is a schematic structural diagram of a log data dumping device provided in an embodiment of the present application, and as shown in fig. 5, the log data dumping device specifically includes:
an obtaining module 501, configured to obtain log data to be dumped of each storage device in the plurality of storage devices; a determining module 502, configured to determine a dump time slice of each storage device based on an idle period of each storage device; the dump time slice is a time period for the storage device to perform log dump; a determining module 502, configured to determine a dump duration for each storage device based on a median of durations of dump time slices of respective storage devices in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; a dump module 503, configured to determine a target dump sequence of each storage device in the plurality of storage devices based on a sequence of dump time slices of each storage device, and dump log data to be dumped of the plurality of storage devices to an external storage device in turn in a dump time slice of each storage device based on the target dump sequence and a dump duration of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
Optionally, the obtaining module 501 is further configured to obtain a historical performance value record of the target storage device, and divide a time period of the target storage device according to performance values at each moment in the historical performance value record, so as to obtain a plurality of time periods to be confirmed; the determining module 502 is specifically configured to calculate an average value and a mean square error of performance values in each of the plurality of time periods to be confirmed, and determine, as a dump time slice of the target storage device, a time period to be confirmed in which a duration of the plurality of time periods to be confirmed is greater than a preset duration and a target weighted average value is minimum; wherein the target storage device is any one of the plurality of storage devices; the target weighted average value is the average value obtained by weighted summation of the average value of the performance numerical value and the mean square error of the performance numerical value.
Optionally, the obtaining module 501 is further configured to obtain a duration of a dump time slice of each storage device in the plurality of storage devices; the determining module 502 is specifically configured to calculate a median of a duration of the dump time slice of each storage device, so as to obtain a dump duration of each storage device.
Optionally, the dumping module 503 is specifically configured to dump the log data to be dumped of the plurality of storage devices to the external storage device in sequence in a dumping time slice of each storage device when there is no overlapping of dumping time slices of any two storage devices of the plurality of storage devices and the total amount of log data to be dumped of the plurality of storage devices is less than or equal to the total amount of receivable data of the external storage device.
Optionally, the dumping module 503 is specifically configured to calculate, based on the target dumping order and the data amount of log data to be dumped of each storage device, a total amount of dump data corresponding to each storage device when the log data dumping operation is finished, and determine, as a suspension storage device, a first storage device whose total amount of dump data corresponding to the log data dumping operation is finished is greater than or equal to the total amount of receivable data when the log data dumping operation is finished, when dump time slices of any two storage devices of the plurality of storage devices do not overlap and the total amount of log data to be dumped of the plurality of storage devices is greater than the total amount of receivable data of the external storage device; the dumping module 503 is specifically further configured to dump, in the dumping order, a storage device located before the suspension storage device in the plurality of storage devices and log data to be dumped in the suspension storage device to the external storage device in sequence; the dump module 503 is specifically further configured to trigger a first alarm notification if the data amount of the remaining log data to be dumped of the suspension storage device is zero in a case that the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
Optionally, the dumping module 503 is specifically configured to dump, in a case where two overlapping storage devices with overlapping dump time slices exist in the plurality of storage devices, and the total amount of log data to be dumped of the plurality of storage devices is less than or equal to the total amount of receivable data of the external storage device, the log data to be dumped of the overlapping storage device with the front dump order into the external storage device based on the dump duration, and dump, in a dump time slice of a non-overlapping portion, the log data to be dumped of the overlapping storage device with the rear dump order into the external storage device.
Optionally, the dumping module 503 is specifically configured to calculate a total amount of dump data corresponding to each storage device when the log data dumping operation is performed is finished, and determine, as a suspension storage device, a first storage device whose total amount of dump data corresponding to the log data dumping operation is greater than or equal to the total amount of receivable data when the log data dumping operation is performed is finished, in a case where two overlapping storage devices with overlapping dump time slices exist in the plurality of storage devices and the total amount of log data to be dumped of the plurality of storage devices is greater than the total amount of receivable data of the external storage device; the dumping module 503 is specifically further configured to dump, when neither of the two overlapped storage devices is the suspension storage device, log data to be dumped of an overlapped storage device with a front dumping sequence into the external storage device based on the dumping duration, and dump log data to be dumped of an overlapped storage device with a rear sequence into the external storage device in a dumping time slice of a non-overlapped part; the dumping module 503 is specifically further configured to, when the overlapping storage device with the front dumping order is the suspension storage device, dump the storage device located before the suspension storage device and log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device according to the dumping order, and trigger a first alarm notification if the data amount of the remaining log data to be dumped of the suspension storage device is zero when the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the dumping module 503 is specifically further configured to dump log data to be dumped of an overlapping storage device with a front dumping sequence to the external storage device based on the dumping duration when the overlapping storage device with the rear dumping sequence is the suspension storage device, and dump log data to be dumped of the overlapping storage device with the rear dumping sequence to the external storage device in a dumping time slice of a non-overlapping part, and meanwhile, trigger a first alarm notification if the data amount of the remaining log data to be dumped of the suspension storage device is zero when the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification; the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
The log data dumping device provided by the application firstly acquires log data to be dumped of each storage device in the plurality of storage devices, and determines dump time slices of each storage device based on idle time periods of each storage device; the dump time slice is a time period for the storage device to perform log dump; then, determining the dump time length of each storage device based on the median of the dump time slices of the storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; finally, determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice. In this way, efficient execution of the dump is achieved by combining the dump order of the storage devices, the dump time slices, and the data volume of the dump log data.
Fig. 6 illustrates a physical schematic diagram of an electronic device, as shown in fig. 6, which may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. Processor 610 may call logic instructions in memory 630 to perform a log data dump method comprising: acquiring log data to be dumped of each storage device in the plurality of storage devices, and determining a dump time slice of each storage device based on an idle time period of each storage device; the dump time slice is a time period for the storage device to perform log dump; determining a dump time length of each storage device based on a time length median of dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform a log data dumping method provided by the above methods, the method comprising: acquiring log data to be dumped of each storage device in the plurality of storage devices, and determining a dump time slice of each storage device based on an idle time period of each storage device; the dump time slice is a time period for the storage device to perform log dump; determining a dump time length of each storage device based on a time length median of dump time slices of each storage device in the plurality of storage devices;
The dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
In yet another aspect, the present application further provides a computer readable storage medium having stored thereon a computer program which when executed by a processor is implemented to perform the log data dumping method provided above, the method comprising: acquiring log data to be dumped of each storage device in the plurality of storage devices, and determining a dump time slice of each storage device based on an idle time period of each storage device; the dump time slice is a time period for the storage device to perform log dump; determining a dump time length of each storage device based on a time length median of dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice; determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device; in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (10)

1. A log data dump method for use in a storage area network system, the system comprising a plurality of storage devices, the method comprising:
acquiring log data to be dumped of each storage device in the plurality of storage devices, and determining a dump time slice of each storage device based on an idle time period of each storage device; the dump time slice is a time period for the storage device to perform log dump;
determining a dump time length of each storage device based on a time length median of dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice;
Determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to external storage devices in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device;
in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
2. The method of claim 1, wherein determining a dump time slice for each storage device based on the idle period of each storage device comprises:
acquiring a historical performance numerical value record of a target storage device, and dividing time periods of the target storage device according to performance numerical values of all moments in the historical performance numerical value record to obtain a plurality of time periods to be confirmed;
calculating the average value and the mean square error of the performance values in each time period to be confirmed in the time periods to be confirmed, and determining the time period to be confirmed with the duration longer than the preset duration and the minimum target weighted average value in the time periods to be confirmed as the dump time slice of the target storage device;
Wherein the target storage device is any one of the plurality of storage devices; the target weighted average value is the average value obtained by weighted summation of the average value of the performance numerical value and the mean square error of the performance numerical value.
3. The method of claim 1, wherein the determining a dump duration for each storage device based on a median of durations of dump time slices for respective storage devices of the plurality of storage devices comprises:
acquiring the duration of the dump time slice of each storage device in the plurality of storage devices, and calculating the median of the duration of the dump time slice of each storage device to obtain the dump duration of each storage device.
4. The method of claim 1, wherein the sequentially dumping the log data to be dumped of the plurality of storage devices to the external storage device in the dump time slice of each storage device based on the target dump order and the dump duration of each storage device comprises:
and under the condition that dump time slices of any two storage devices of the plurality of storage devices are not overlapped and the total quantity of log data to be dumped of the plurality of storage devices is smaller than or equal to the total quantity of receivable data of the external storage device, the log data to be dumped of the plurality of storage devices are dumped into the external storage device in sequence in the dump time slices of each storage device.
5. The method of claim 1, wherein the sequentially dumping the log data to be dumped of the plurality of storage devices to the external storage device in the dump time slice of each storage device based on the target dump order and the dump duration of each storage device comprises:
when the dump time slices of any two storage devices do not overlap and the total amount of log data to be dumped of the storage devices is larger than the total amount of receivable data of the external storage device, calculating the corresponding total amount of dump data of each storage device when the log data dump operation is finished based on the target dump sequence and the data amount of the log data to be dumped of each storage device, and determining that the first storage device, which corresponds to the total amount of dump data when the log data dump operation is finished and is larger than or equal to the total amount of receivable data, is a suspension storage device;
sequentially dumping the storage devices positioned in front of the suspension storage device and the log data to be dumped in the suspension storage device in the plurality of storage devices to the external storage device according to the dumping sequence;
If the data volume of the remaining log data to be dumped of the suspension storage device is zero under the condition that the external storage device cannot receive more log data to be dumped, triggering a first alarm notification; otherwise, triggering a second alarm notification;
the suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
6. The method of claim 1, wherein the sequentially dumping the log data to be dumped of the plurality of storage devices to the external storage device in the dump time slice of each storage device based on the target dump order and the dump duration of each storage device comprises:
and when two overlapped storage devices with overlapped dump time slices exist in the storage devices and the total quantity of log data to be dumped of the storage devices is smaller than or equal to the total quantity of receivable data of the external storage device, dumping the log data to be dumped of the overlapped storage devices with the front dump sequence to the external storage device based on the dump duration, and dumping the log data to be dumped of the overlapped storage devices with the rear dump sequence to the external storage device in the dump time slices of the non-overlapped part.
7. The method of claim 1, wherein the sequentially dumping the log data to be dumped of the plurality of storage devices to the external storage device in the dump time slice of each storage device based on the target dump order and the dump duration of each storage device comprises:
when two overlapped storage devices with overlapped dump time slices exist in the storage devices and the total amount of log data to be dumped of the storage devices is larger than the total amount of receivable data of the external storage device, calculating the corresponding dump data total amount of each storage device at the end of executing log data dumping operation, and determining the first storage device with the corresponding dump data total amount being larger than or equal to the total amount of receivable data at the end of executing log data dumping operation as a suspension storage device;
when the two overlapped storage devices are not the suspension storage devices, dumping the log data to be dumped of the overlapped storage devices with the front dumping sequence into the external storage device based on the dumping duration, and dumping the log data to be dumped of the overlapped storage devices with the rear sequence into the external storage device in a dumping time slice of the non-overlapped part;
When the overlapped storage device with the front dump sequence is the suspension storage device, sequentially dumping the storage devices positioned in front of the suspension storage device and log data to be dumped in the suspension storage device to the external storage device according to the dump sequence, and triggering a first alarm notification if the data volume of the rest log data to be dumped of the suspension storage device is zero when the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification;
when the overlapped storage device with the back dump sequence is the suspension storage device, dumping the log data to be dumped of the overlapped storage device with the front dump sequence to the external storage device based on the dump duration, dumping the log data to be dumped of the overlapped storage device with the back dump sequence to the external storage device in a dump time slice of a non-overlapped part, and triggering a first alarm notification if the data quantity of the residual log data to be dumped of the suspension storage device is zero under the condition that the external storage device cannot receive more log data to be dumped; otherwise, triggering a second alarm notification;
The suspension storage device is the last storage device for executing log data dump in the plurality of storage devices; the first alert notification includes: the dump sequence is that the log data to be dumped of other storage devices after the suspension storage device is not dumped; the second alert notification includes: the dump log data of other storage devices after the suspension storage device is not completed in the dump sequence.
8. A log data dump apparatus for use in a storage area network system, the system comprising a plurality of storage devices, the apparatus comprising:
the acquisition module is used for acquiring log data to be dumped of each storage device in the plurality of storage devices;
a determining module, configured to determine a dump time slice of each storage device based on an idle period of each storage device; the dump time slice is a time period for the storage device to perform log dump;
the determining module is further configured to determine a dump duration for each storage device based on a median of durations of dump time slices of each storage device in the plurality of storage devices; the dump duration is the maximum duration consumed by dump log data of the storage device in a dump time slice;
The dump module is used for determining a target dump sequence of each storage device in the plurality of storage devices based on the sequence of the dump time slices of each storage device, and sequentially dumping log data to be dumped of the plurality of storage devices to the external storage device in the dump time slices of each storage device based on the target dump sequence and the dump time length of each storage device;
in the process of executing log data dump, the dump duration of the storage device does not exceed the duration of the dump time slice.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the log data dump method of any one of claims 1 to 7 when the program is executed.
10. A computer readable storage medium, having stored thereon a computer program which, when executed by a processor, implements the steps of the log data dump method of any one of claims 1 to 7.
CN202311596664.4A 2023-11-27 2023-11-27 Log data dump method and device, storage medium and electronic equipment Pending CN117827087A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311596664.4A CN117827087A (en) 2023-11-27 2023-11-27 Log data dump method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311596664.4A CN117827087A (en) 2023-11-27 2023-11-27 Log data dump method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117827087A true CN117827087A (en) 2024-04-05

Family

ID=90518022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311596664.4A Pending CN117827087A (en) 2023-11-27 2023-11-27 Log data dump method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117827087A (en)

Similar Documents

Publication Publication Date Title
US8850141B2 (en) System and method for mirroring data
US20190197028A1 (en) Database management system with database hibernation and bursting
CN110830283B (en) Fault detection method, device, equipment and system
CN105138276B (en) Data storage method and data storage system
CN111209110B (en) Task scheduling management method, system and storage medium for realizing load balancing
CN109445927B (en) Task management method and device for storage cluster
CN108924202B (en) Distributed cluster data disaster tolerance method and related device
CN108924195A (en) A kind of unidirectional heartbeat mechanism implementation method, device, equipment and system
CN112272291B (en) Video storage method, device, management equipment and readable storage medium
CN105141400A (en) High-availability cluster management method and related equipment
CN101137984A (en) Systems, methods, and software for distributed loading of databases
CN107623703A (en) Global transaction identifies GTID synchronous method, apparatus and system
CN111176888A (en) Cloud storage disaster recovery method, device and system
CN108512753B (en) Method and device for transmitting messages in cluster file system
CN108156040A (en) A kind of central control node in distribution cloud storage system
EP3660679B1 (en) Data backup method, device and system
CN114844809A (en) Multi-factor arbitration method and device based on network heartbeat and kernel disk heartbeat
CN101855839B (en) Method for doubly backing up files asynchronously
CN117827087A (en) Log data dump method and device, storage medium and electronic equipment
CN111309515B (en) Disaster recovery control method, device and system
CN109302319B (en) Message pool distributed cluster and management method thereof
CN109474694A (en) A kind of management-control method and device of the NAS cluster based on SAN storage array
CN111158899A (en) Data acquisition method, data acquisition device, task management center and task management system
CN108279850B (en) Data resource storage method
KR100274848B1 (en) Network management method for network management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination