A method to prevent disk overflow
By acquiring the log growth trend and other parameters of small-capacity disks, β0 is dynamically adjusted to prevent overflow, thus solving the problem of small-capacity disk overflow and achieving stable disk use.
Patent Information
- Application Number
- CN202310617381.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-05-26
AI Technical Summary
Small-capacity disks are prone to overflow in practical applications, and existing technologies are unable to effectively prevent disk overflow.
By acquiring current and historical log growth trends, compression time ratio, log compression ratio, and factory file usage ratio, the value of β0 is dynamically adjusted to perform log compression and transfer steps, thus avoiding disk overflow.
It effectively reduces the probability of disk overflow, avoids frequent compression and transfer, and improves the stability and security of disk use.
Smart Images

Figure CN116662277B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing technology, and in particular to a method for preventing disk overflow. Background Technology
[0002] Smaller storage disks are cheaper, but in real-world applications, disk overflow can occur due to their limited capacity, such as 8GB, 16GB, 32GB, and 64GB disks. Preventing disk overflow is a pressing technical problem that needs to be addressed. Summary of the Invention
[0003] The purpose of this invention is to provide a method for preventing disk overflow.
[0004] According to the present invention, a method for preventing disk overflow is provided, comprising the following steps:
[0005] S100, obtain the percentage β of the target disk occupied by the log at the current collection time.
[0006] S200, if β≥β0, then execute the preset log compression and transfer steps; β0 is the preset first percentage, and the methods for obtaining β0 include:
[0007] S010, obtain the maximum value A of the log growth trend within the historical time period; when the duration T' of the historical time period is less than 7 calendar days, A = max(a1, a2, ..., a n ,…,a N ), a n This refers to the log growth trend value corresponding to the nth collection moment within the most recent 24 hours in the historical time period, obtained in chronological order. The value of n ranges from 1 to N, where N is the number of collection moments included in the 24 hours. n =b n -b n-1 b n b represents the percentage increase in the target disk usage of logs within the time period from the (n-1)th collection moment to the nth collection moment, obtained chronologically from the most recent 24 hours in the historical time period. n-1 This represents the percentage increase in the target disk occupied by logs during the period from the (n-2)th to the (n-1)th collection time, within the 24 hours closest to the current collection time in the historical time period, obtained in chronological order.
[0008] S020, obtain the compression time ratio k1.
[0009] S030, get the log compression ratio c.
[0010] S040, obtain the percentage β2 of the target disk occupied by the factory files.
[0011] S050, obtain β0=|β2+(β1-β2) / (1+c+k1×A / T0)|, where β1 is the preset maximum occupancy percentage of the target disk, 90%≤β1<100%, T0 is the time difference between any two adjacent acquisition times, and || is the modulus.
[0012] Compared with the prior art, the present invention has at least the following beneficial effects:
[0013] This invention obtains the percentage β of the target disk occupied by logs at the current collection time. If β is greater than or equal to a preset first percentage, preset log compression and transfer steps are executed. This invention provides a preferred method for obtaining β0, wherein the maximum value A of the log growth trend within a historical time period is obtained, as well as the compression time ratio k1, log compression ratio c, and the percentage β2 occupied by the factory file are obtained, and the value of β0 is obtained based on these parameters. The value of β0 is based on the maximum value A of the log growth trend within a historical time period to predict the percentage of the target disk occupied by newly added logs during the compression process. It also considers the percentage of the target disk occupied by the factory file and the percentage of the target disk occupied after log compression. This ensures that the value of β0 can meet the requirement that the target disk does not overflow during log compression, and that the value of β0 is not too small, thus avoiding frequent log compression and transfer. Furthermore, this invention uses the preset maximum occupancy percentage β1 of the target disk (90% ≤ β1 < 100%) as a reference value for target disk overflow when obtaining β0, further reducing the probability of target disk overflow during log compression and further avoiding the problem of target disk overflow during log compression. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart of a method for preventing disk overflow provided in Embodiment 1 of the present invention;
[0016] Figure 2 This is a flowchart of the method for obtaining β0 provided in Embodiment 1 of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Example 1
[0019] According to this embodiment, as Figure 1 As shown, a method for preventing disk overflow is provided, including the following steps:
[0020] S100, obtain the percentage β of the target disk occupied by the log at the current collection time.
[0021] Optionally, in this embodiment, the target disk is a firewall disk with a storage space of less than or equal to 64G.
[0022] S200, if β≥β0, then execute the preset log compression and transfer steps.
[0023] In this embodiment, during the execution of the preset log compression and transfer steps, the connection to the database written to the target disk is not continuously opened to record the logs during the compression and transfer process, thus avoiding the problem of losing logs during compression and transfer.
[0024] Optionally, the logs to be compressed are those other than system logs and operation logs, including event correlation logs, IP blacklist logs, abnormal event logs, and security protection logs.
[0025] Those skilled in the art will understand that the log compression and transfer process is existing technology and will not be described in detail here. Preferably, the log compression process uses 9 levels of compression, and the data after 9 levels of compression is further encrypted and compressed to improve the security of the log; the encrypted and compressed file is sent to the log server via the Simple File Transfer Protocol (TFTP), and the file is deleted after successful transmission, and the database tables on the disk are cleaned up to free up disk space.
[0026] In this invention, β0 is a preset first percentage, such as... Figure 2 As shown, the methods for obtaining β0 include:
[0027] S010, obtain the maximum value A of the log growth trend within the historical time period; when the duration T' of the historical time period is less than 7 calendar days, A = max(a1, a2, ..., a n ,…,a N ), a nThis refers to the log growth trend value corresponding to the nth collection moment within the most recent 24 hours in the historical time period, obtained in chronological order. The value of n ranges from 1 to N, where N is the number of collection moments included in the 24 hours. n =b n -b n-1 b n b represents the percentage increase in the target disk usage of logs within the time period from the (n-1)th collection moment to the nth collection moment, obtained chronologically from the most recent 24 hours in the historical time period. n-1 This represents the percentage increase in the target disk occupied by logs during the period from the (n-2)th to the (n-1)th collection time, within the 24 hours closest to the current collection time in the historical time period, obtained in chronological order.
[0028] It should be understood that when b n -b n-1 When <0, a n A value less than 0 indicates a negative log growth trend, meaning the logs are in a negative growth trend.
[0029] Optional, T0 = 10s.
[0030] Preferably, when the duration T' of the historical period is greater than or equal to 7 calendar days and less than 14 calendar days, A = max(max(a1,a2,…,a…)). n ,…,a N ),max(h1,h2,…,h n ,…,h N )), h n h represents the log growth trend value corresponding to the nth collection time within the same day in a historical time period, obtained in chronological order. n =r n -r n-1 r n r represents the percentage increase in the target disk usage of logs within the time period from the (n-1)th collection time to the nth collection time, obtained chronologically on the same day within a historical timeframe. n-1 This represents the percentage increase in the target disk usage of logs during the period from the (n-2)th to the (n-1)th collection time within the same day in the historical time period, obtained in chronological order.
[0031] This invention, when the duration T' of the historical time period is greater than or equal to 7 calendar days and less than 14 calendar days, combines the percentage of the target disk occupied by logs in the 24 hours most recent to the current collection time within the historical time period and the percentage of the target disk occupied by logs at each collection time within the same day within the historical time period. The 24 hours most recent to the current collection time within the historical time period can be used to characterize the recent changes in the percentage of the target disk occupied by logs. The same day within the historical time period can be used to characterize the changes in the percentage of the target disk occupied by logs with a weekday pattern (i.e., similar changes in the percentage of the target disk occupied by logs among calendar days of the same day, Monday / Tuesday / Wednesday / Thursday / Friday / Saturday / Sunday). In this invention, A = max(max(a1,a2,…,a…) n ,…,a N ),max(h1,h2,…,h n ,…,h N This can better meet the requirement that the target disk does not overflow during the log compression process.
[0032] It should be understood that if the current data collection time is Monday, then the same day in the historical time period refers to Monday in the historical period; if the current data collection time is Tuesday, then the same day in the historical time period refers to Tuesday in the historical period, and so on.
[0033] Preferably, when the duration T' of the historical period is greater than or equal to 14 calendar days, A = max(max(h) 1 1,h 1 2,…,h 1 n ,…,h 1 N ),max(h 2 1,h 2 2,…,h 2 n ,…,h 2 N ),…,max(h q 1,h q 2,…,h q n ,…,h q N ),…,max(h Q 1,h Q 2,…,h Q n ,…,h Q N )), h q n h represents the log growth rate at the nth collection time on the qth day within a historical time period, obtained chronologically. qn =r q n -r q n-1 r q n r represents the percentage increase in the target disk usage of the logs during the time interval from the (n-1)th collection time to the nth collection time within the qth collection day in the historical time period, obtained chronologically. n-1 This represents the percentage increase in the target disk occupied by the logs during the period from the (n-2)th to the (n-1)th collection time on the same day within the qth historical time period, obtained in chronological order. The value of q ranges from 1 to Q, where Q is the number of whole weeks included in the historical time period.
[0034] This invention, when the historical time period is longer than 14 calendar days, combines the percentage of target disk occupied by logs at each collection time on each day within the historical time period, and fully considers the weekday pattern of the change in the percentage of target disk occupied by logs (i.e., the change in the percentage of target disk occupied by logs is relatively similar among calendar days of the same day, Monday / Tuesday / Wednesday / Thursday / Friday / Saturday / Sunday). In this invention, A = max(max(h 1 1,h 1 2,…,h 1 n ,…,h 1 N ),max(h 2 1,h 2 2,…,h 2 n ,…,h 2 N ),…,max(h q 1,h q 2,…,h q n ,…,h q N ),…,max(h Q 1,h Q 2,…,h Q n ,…,h Q N This can better meet the requirement that the target disk does not overflow during the log compression process.
[0035] It should be understood that if the current data collection time is Monday, then the same day in the historical time period refers to Monday in the historical period, and the qth same day obtained in chronological order in the historical time period refers to the qth Monday obtained in chronological order in the historical time period; if the current data collection time is Tuesday, then the same day in the historical time period refers to Tuesday in the historical period, and the qth same day obtained in chronological order in the historical time period refers to the qth Tuesday obtained in chronological order in the historical time period; and so on.
[0036] S020, obtain the compression time ratio k1.
[0037] According to the present invention, the compression time ratio is the ratio of the time required for compression to the percentage of the target disk occupied before the log is compressed.
[0038] S030, get the log compression ratio c.
[0039] According to the present invention, the log compression ratio is the ratio of the percentage of the target disk occupied by the compressed package after log compression to the percentage of the target disk occupied by the uncompressed log.
[0040] S040, obtain the percentage β2 of the target disk occupied by the factory files.
[0041] According to the present invention, the percentage of the target disk occupied by the factory files is an attribute parameter of the target disk and can be directly obtained.
[0042] S050, obtain β0=|β2+(β1-β2) / (1+c+k1×A / T0)|, where β1 is the preset maximum occupancy percentage of the target disk, 90%≤β1<100%, T0 is the time difference between any two adjacent acquisition times, and || is the modulus.
[0043] Optional, β1 = 95%.
[0044] This invention obtains the percentage β of the target disk occupied by logs at the current collection time. If β is greater than or equal to a preset first percentage, preset log compression and transfer steps are executed. This invention provides a preferred method for obtaining β0, wherein the maximum value A of the log growth trend within a historical time period is obtained, as well as the compression time ratio k1, log compression ratio c, and the percentage β2 occupied by the factory file are obtained, and the value of β0 is obtained based on these parameters. The value of β0 is based on the maximum value A of the log growth trend within a historical time period to predict the percentage of the target disk occupied by newly added logs during the compression process. It also considers the percentage of the target disk occupied by the factory file and the percentage of the target disk occupied after log compression. This ensures that the value of β0 can meet the requirement that the target disk does not overflow during log compression, and that the value of β0 is not too small, thus avoiding frequent log compression and transfer. Furthermore, this invention uses the preset maximum occupancy percentage β1 of the target disk (0.9≤β1<1) as a reference value for target disk overflow when obtaining β0, further reducing the probability of target disk overflow during log compression and further avoiding the problem of target disk overflow during log compression.
[0045] Example 2
[0046] The difference between this embodiment and Embodiment 1 is that, in Embodiment 1, the connection to the database written to the target disk is not interrupted during the execution of the preset log compression and transfer steps; while in this embodiment, the preset log compression and transfer steps include:
[0047] S210, obtain the maximum value D of the log growth trend within the target time period; D = max(d1, d2, ..., d... m ,…,d M ), d m This refers to the log growth trend value corresponding to the m-th collection time point within the target time period, obtained in chronological order. The value of m ranges from 1 to M, where M is the number of collection times included in the target time period. m =e m -e m-1 e m e represents the percentage increase in the target disk usage of logs during the time interval from the (m-1)th collection time to the mth collection time, obtained chronologically within the target time period. m-1 The percentage increase in the target disk occupied by the log during the time period from the (m-2)th collection time to the (m-1)th collection time, obtained in chronological order within the target time period; the target time period is the time period that is before the current collection time and is no more than a preset second time threshold.
[0048] Optionally, the second time threshold is 5 minutes.
[0049] S220, obtain the target disk usage percentage required at the current acquisition time α=β2+((D+a') / T0)×(β×k1) + β(1+c); a' represents the percentage increase in the target disk occupied by the log during the time period from the previous collection time to the current collection time.
[0050] In this invention, D represents the maximum value of the log growth trend within the target time period. The target time period is a time period consisting of the time interval not exceeding a preset second time threshold from the current collection time. The target time period is a period that is relatively close to the current time in the historical time period, which can characterize the recent change in the percentage of the target disk occupied by logs. This makes it more accurate to predict whether the compression and transfer of logs from the current time will result in disk overflow during the compression process based on D+a', and further reduces the probability of disk overflow during the compression and transfer process.
[0051] S230, if α≥100%, then execute the preset first log compression and transfer step; if α<100%, then execute the preset second log compression and transfer step; the preset first log compression and transfer step includes disconnecting the connection to the database written to the target disk during the compression and transfer process, and the preset second log compression and transfer step includes not disconnecting the connection to the database written to the target disk during the compression and transfer process.
[0052] Compared to Embodiment 1, S210-S230 of this embodiment further determines the relationship between the target disk occupancy percentage α required at the current acquisition time and 1. When α≥1, a first log compression and transfer step is executed, disconnecting the connection to the database written to the target disk during compression and transfer to avoid disk overflow during compression and transfer. When α<1, a second log compression and transfer step is executed, without disconnecting the connection to the database written to the target disk during compression and transfer to record logs during compression and transfer, avoiding log loss during compression and transfer. Moreover, this invention uses 100% as the comparison object for α, instead of β1, which is more consistent with the situation where overflow only occurs when the target disk occupancy reaches 100%, effectively increasing the probability of executing the second log compression and transfer step and reducing log loss during compression and transfer.
[0053] Example 3
[0054] The difference between this embodiment and Embodiment 1 is that this embodiment further includes the following before S100:
[0055] S001, Obtain the time t required for the target disk occupancy percentage to reach β1 during the test phase, t = max(t1, t2, ..., t i ,…,t P ), t i β is the time required for the target disk occupancy percentage to reach β1 in the i-th test round during the testing phase. The value of i ranges from 1 to P, where P is the number of test rounds included in the testing phase.
[0056] According to this embodiment, the purpose of the testing phase is to obtain the time required for the target disk to reach the occupancy percentage β1, so as to predict the time required for the target disk to reach the occupancy percentage β1 in the application scenario. Optionally, the testing phase is to place the target disk in the earliest preset time in the application scenario.
[0057] S002, if t is less than the preset first time threshold, then execute S100; otherwise, do not execute S100.
[0058] According to the present invention, the first time threshold is an empirical value.
[0059] According to this embodiment, the growth rate of logs varies depending on the application scenario of the disk. Therefore, the time required for the occupancy percentage of disks with the same storage space to reach β1 will also vary. This embodiment, in conjunction with the application scenario of the target disk, determines whether the target disk needs to execute the disk overflow prevention method S100-S200 based on the time required for the target disk's occupancy percentage to reach β1 during the testing phase. If the required time is less than a preset first time threshold, the disk overflow prevention method S100-S200 is executed to prevent the disk from overflowing in a relatively short period of time. If the required time is greater than or equal to the preset first time threshold, the disk overflow prevention method S100-S200 is not executed, thereby reducing the total number of task threads of the processor and improving the processor's operating efficiency.
[0060] Example 4
[0061] The difference between this embodiment and Embodiment 3 is that the preset log compression and transfer steps in this embodiment include:
[0062] S210, obtain the maximum value D of the log growth trend within the target time period; D = max(d1, d2, ..., d... m ,…,d M ), d m This refers to the log growth trend value corresponding to the m-th collection time point within the target time period, obtained in chronological order. The value of m ranges from 1 to M, where M is the number of collection times included in the target time period. m =e m -em-1 e m e represents the percentage increase in the target disk usage of logs during the time interval from the (m-1)th collection time to the mth collection time, obtained chronologically within the target time period. m-1 The percentage increase in the target disk occupied by the log during the time period from the (m-2)th collection time to the (m-1)th collection time, obtained in chronological order within the target time period; the target time period is the time period consisting of the time not exceeding a preset second time threshold from the current collection time.
[0063] Optionally, the second time threshold is 5 minutes.
[0064] S220, obtain the target disk usage percentage required at the current acquisition time α=β2+((D+a') / T0)×(β×k1) + β(1+c); a' represents the percentage increase in the target disk occupied by the log during the time period from the previous collection time to the current collection time.
[0065] In this invention, D represents the maximum value of the log growth trend within the target time period. The target time period is a time period consisting of the time that is no more than a preset second time threshold from the current collection time. The target time period is a period that is relatively close to the current time in the historical time period, which can characterize the change in the percentage of the target disk occupied by the recent logs. This makes it more accurate to predict whether the log compression and transfer from the current time will cause a disk overflow during the compression process based on D+a', and further reduces the probability of disk overflow during the compression and transfer process.
[0066] S230, if α≥100%, then execute the preset first log compression and transfer step; if α<100%, then execute the preset second log compression and transfer step; the preset first log compression and transfer step includes disconnecting the connection to the database written to the target disk during the compression and transfer process, and the preset second log compression and transfer step includes not disconnecting the connection to the database written to the target disk during the compression and transfer process.
[0067] Compared to Embodiment 3, S210-S230 of this embodiment further determines the relationship between the target disk occupancy percentage α required at the current acquisition time and 1. When α≥1, a first log compression and transfer step is executed, disconnecting the connection to the database written to the target disk during compression and transfer to avoid disk overflow during compression and transfer. When α<1, a second log compression and transfer step is executed, without disconnecting the connection to the database written to the target disk during compression and transfer to record logs during compression and transfer, avoiding log loss during compression and transfer. Moreover, this invention uses 100% as the comparison object for α, instead of β1, which is more consistent with the situation where overflow only occurs when the target disk occupancy reaches 100%, effectively increasing the probability of executing the second log compression and transfer step and reducing log loss during compression and transfer.
[0068] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A method for preventing disk overflow, characterized in that, Includes the following steps: S100, obtain the percentage β of the target disk occupied by the log at the current collection time; S200, if β≥β0, then execute the preset log compression and transfer steps; β0 is a preset first percentage, and the methods for obtaining β0 include: S010, retrieve the maximum value A of the log growth trend within a historical time period; When the duration T' of the historical time period is less than 7 calendar days, A = max(a1, a2, ..., a n ,…,a N ), a n This refers to the log growth trend value corresponding to the nth collection moment within the most recent 24 hours in the historical time period, obtained in chronological order. The value of n ranges from 1 to N, where N is the number of collection moments included in the 24 hours. n =b n -b n-1 b n b represents the percentage increase in the target disk usage of logs within the 24 hours most recent in the historical time period, obtained chronologically from the (n-1)th collection time to the nth collection time. n-1 This represents the percentage increase in the target disk occupied by the logs during the period from the (n-2)th to the (n-1)th collection time, within the 24 hours closest to the current collection time in the historical time period, obtained in chronological order. S020, obtain the compression time ratio k1; S030, Get the log compression ratio c; S040, obtain the percentage β2 of the target disk occupied by the factory files; S050, obtain β0=|β2+(β1-β2) / (1+c+k1×A / T0)|, where β1 is the preset maximum occupancy percentage of the target disk, 90%≤β1<100%, T0 is the time difference between any two adjacent acquisition times, and || is the modulus.
2. The method for preventing disk overflow according to claim 1, characterized in that, In S010, when the duration T' of the historical time period is greater than or equal to 7 calendar days and less than 14 calendar days, A = max(max(a1,a2,…,a…)). n ,…,a N ),max(h1,h2,…,h n ,…,h N )), h n h represents the log growth trend value corresponding to the nth collection time within the same day in a historical time period, obtained in chronological order. n =r n -r n-1 r n r represents the percentage increase in the target disk usage of logs within the time period from the (n-1)th collection time to the nth collection time, obtained chronologically on the same day within a historical timeframe. n-1 This represents the percentage increase in the target disk usage of logs during the period from the (n-2)th to the (n-1)th collection time within the same day in the historical time period, obtained in chronological order.
3. The method for preventing disk overflow according to claim 1, characterized in that, In S010, when the duration T' of the historical time period is greater than or equal to 14 calendar days, A = max(max(h) 1 1,h 1 2,…,h 1 n ,…,h 1 N ),max(h 2 1,h 2 2,…,h 2 n ,…,h 2 N ),…,max(h q 1,h q 2,…,h q n ,…,h q N ),…,ma x(h Q 1,h Q 2,…,h Q n ,…,h Q N )), h q n h represents the log growth rate at the nth collection time on the qth day within a historical time period, obtained chronologically. q n =r q n -r q n-1 r q n r represents the percentage increase in the target disk usage of the logs during the time interval from the (n-1)th collection time to the nth collection time within the qth collection day in the historical time period, obtained chronologically. n-1 This represents the percentage increase in the target disk occupied by the logs during the period from the (n-2)th to the (n-1)th collection time on the same day within the qth historical time period, obtained in chronological order. The value of q ranges from 1 to Q, where Q is the number of whole weeks included in the historical time period.
4. The method for preventing disk overflow according to claim 1, characterized in that, The target disk has a storage space of less than or equal to 64G.
5. The method for preventing disk overflow according to claim 1, characterized in that, Prior to S100, there were also: S001, Obtain the time t required for the target disk occupancy percentage to reach β1 during the test phase, t = max(t1, t2, ..., t i ,…,t P ), t i β1 is the time required for the target disk occupancy percentage to reach β1 in the i-th test round during the test phase. The value of i ranges from 1 to P, where P is the number of test rounds included in the test phase. S002, if t is less than the preset first time threshold, then execute S100; otherwise, do not execute S100.
6. The method for preventing disk overflow according to claim 1, characterized in that, The preset log compression and transfer steps described in S200 include: S210, obtain the maximum value D of the log growth trend within the target time period; D = max(d1, d2, ..., d... m ,…,d M ), d m This refers to the log growth trend value corresponding to the m-th collection time point within the target time period, obtained in chronological order. The value of m ranges from 1 to M, where M is the number of collection times included in the target time period. m =e m -e m-1 e m e represents the percentage increase in the target disk usage of logs during the time interval from the (m-1)th collection time to the mth collection time, obtained chronologically within the target time period. m-1 The percentage increase in the target disk occupied by the log during the time period from the (m-2)th collection time to the (m-1)th collection time, obtained in chronological order within the target time period; the target time period is the time period that is before the current collection time and no more than a preset second time threshold from the current collection time. S220, obtain the target disk usage percentage required at the current acquisition time α=β2+((D+a') / T0)×(β×k1) + β(1+c); a' represents the percentage increase in the target disk occupied by the log during the time period from the previous collection time to the current collection time. S230, if α≥100%, then execute the preset first log compression and transfer step; if α<100%, then execute the preset second log compression and transfer step; the preset first log compression and transfer step includes disconnecting the connection to the database written to the target disk during the compression and transfer process, and the preset second log compression and transfer step includes not disconnecting the connection to the database written to the target disk during the compression and transfer process.
7. The method for preventing disk overflow according to claim 1, characterized in that, β1=95%。 8. The method for preventing disk overflow according to claim 1, characterized in that, T0 = 10s.
9. The method for preventing disk overflow according to claim 6, characterized in that, The second time threshold is 5 minutes.
Citation Information
Patent Citations
Log collection method, device and equipment
CN114185761A
Staggered merging in log-structured merge forests
US20210216517A1