Quota Usage Calculation via Delta File Table
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
System administrators face challenges in managing disk usage quotas for directories with millions of descendants, as calculating disk space consumption takes hours or days, disrupting productivity and requiring locking out users and processes.
Innovation Solution
A method and system that calculates disk space used by a directory and its descendants while allowing input and output operations, using a delta file table to monitor changes and update the calculation dynamically, ensuring quota enforcement without halting productivity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If disk space calculation is performed for a directory with millions of descendants, then accurate quota information is obtained, but the calculation time increases to hours or days
Solution Approach 1:
The system pre-calculates and stores the disk space consumption of individual files and subdirectories in a data structure (table) before the quota calculation is requested. When a quota calculation is needed, the system retrieves pre-computed values from the table rather than calculating from scratch, dramatically reducing the time required while maintaining accuracy.
Solution Approach 2:
The directory structure is divided into manageable segments (individual files and subdirectories), each with its disk space consumption pre-calculated and stored separately in the table. This segmentation allows the system to efficiently aggregate results by summing pre-computed values rather than traversing and calculating the entire directory tree simultaneously.
2Measurement precision
If disk space calculation is performed for quota enforcement, then accurate quota control is achieved, but user and process access to the directory is halted
Solution Approach 1:
The system performs disk space calculations using pre-stored data in the table during periods when quota enforcement is needed, rather than blocking operations to compute values in real-time. This allows quota control to be maintained without halting user and process access to directories.
Solution Approach 2:
The system uses a copied representation of disk space data (stored in the table) rather than requiring access to actual files and directories during calculation. This copy-based approach enables quota enforcement without locking directories, as the calculation operates on stored metadata rather than live file systems.
3Speed
If real-time disk space calculation is performed, then immediate quota enforcement is possible, but system operations are disrupted
Solution Approach 1:
The system prepares disk space data in advance and stores it in a readily accessible table structure. When quota enforcement is needed, the system immediately retrieves and aggregates pre-computed values from the table, achieving fast quota enforcement without disrupting ongoing system operations.
Solution Approach 2:
The table data structure serves as an intermediary between the file system and quota enforcement mechanism. It stores pre-calculated disk space information, allowing the quota system to obtain immediate answers without directly accessing or blocking file system operations, thus maintaining system productivity while enabling fast quota control.
Data Source
AI summary
A method and system for computing disk space used by a directory and its descendants that may proceed while input and output are occurring that involve the directory and any of its descendants. A calculation of the total amount of disk space consumed by a set of objects is commenced. While performing the calculation, changes to the objects are monitored. If a change to one or more of the objects affects the disk space consumed by the objects, the calculation is changed so that the total reflects the change to the one or more objects.


