Understanding the intricacies of file system usage and metering is crucial for effectively managing your OCI (Oracle Cloud Infrastructure) resources. Let’s delve into the details.
Metered File System Utilization
The file storage service in OCI meticulously tracks and reports file system utilization, updating the data hourly. This utilization data stems from the metered bytes value in the APA (Automatic Performance Analyzer). When files are added or removed from your file system, it may take up to an hour for the file storage service to reflect these changes in the reported metered size.
Monitoring File System Usage
OCI’s file storage service seamlessly supports the network file system protocol, enabling users to employ commands such as ‘df’ or ‘du’ from the instance command line tool to monitor usage for mounted file systems.
The ‘df’ command furnishes the metered storage size for your file system, while ‘du’ provides insights into the storage utilized by a directory hierarchy. Notably, the utilization size reported by ‘du’ may exceed the metered bytes value. However, ‘df’ accurately mirrors the metered bytes value, facilitating precise visualization of the file system size.
Snapshot Metered Utilization
Snapshots serve as snapshots in time of your file system, initially incurring no additional usage as they reference the original data instead of duplicating it. Consequently, snapshot usage costs remain constrained.
The metered size of a snapshot is encompassed in the reported metered bytes value of the associated file system. Consider the following scenario for clarity:
Imagine creating a file system named ‘Testfilesystem’ and adding ‘file1’ to it, resulting in a total usage of 1GB, including metadata. Even after creating a snapshot, the metered bytes value remains unchanged until differentiated data emerges.
Understanding Differentiated Data
Now, what happens when you overwrite a portion of ‘file1’? The file system diverges from the snapshot as differentiated data emerges. Consequently, the metered bytes value increases to reflect this change. For instance, if 0.5GB of ‘file1’ is overwritten, the metered bytes value rises to 1.5GB, comprising 1GB from the snapshot and 0.5GB from the differentiated data.
Clone Metered Utilization
Clones, akin to snapshots, initially incur costs based on metadata as they reference the parent file system’s data. The parent file system is metered for shared data with descendant clones, while the clone itself is metered for metadata and incremental changes to its data.
Consider a scenario where a clone named ‘testclone’ is created from ‘Testfilesystem’. Initially, the parent file system is metered for its data and metadata, while the clone is only metered for its metadata. However, upon creating a 2GB file in ‘testclone’, the parent file system is metered for shared data, and ‘testclone’ accrues metering for its metadata along with the 2GB of change data from the new file creation.