A log segment management method and device
A segment management and log technology, applied in special data processing applications, file system types, file systems, etc., can solve the problems of metadata performance decline, metadata performance plummeting, and reconstruct log segments, etc., to improve performance and structure. good compatibility
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0038] refer to figure 1 , a log segment management method disclosed in the present invention, comprising the following steps:
[0039] S0: Set the log event quantity threshold to 1024 and the log event size threshold to 4M;
[0040] S1: write log event;
[0041] S2: Determine whether the log event written in S1 is a subtree event; if so, ignore the size of the log event and not include it in the total size of the log event, and update the value of the number of events; if not, obtain the size information of the log event and Include the total size of log events, and update the value of the number of events and the value of the event size;
[0042] S3: Determine whether the number of events reaches 1024 and determine whether the size of the event reaches 4M; if the number of events does not reach 1024 and the size of the event does not reach 4M, then go to S1; otherwise, go to S4;
[0043] S4: Construct a log segment and transfer to S1.
[0044] In the above embodiment 1, ...
Embodiment 2
[0046] refer to figure 2 , a log segment management method disclosed in the present invention, comprising the following steps:
[0047] Set the log event quantity threshold to 1024 and the log event size threshold to 4M;
[0048] Determine whether the written log event is a subtree event;
[0049] Put subtree events into the first log event pool, and put non-subtree events into the second log event pool;
[0050] Count the total number of log events in the first log event pool and the second log event pool as the event quantity value, and count the total size of the log events in the second log event pool as the event size value;
[0051] If the number of events is smaller than the event number threshold of the log segment and the event size is smaller than the event size threshold of the log segment, write the log event in the current log segment; otherwise, construct a new log segment to write the log event.
[0052] In the above-mentioned embodiment 2, we can know that ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


