Namespace performance acceleration by selective SSD caching
In one example, a method includes receiving metadata in the form of a modification to metadata represented by a file system namespace abstraction, and the file system namespace abstraction corresponds to less than the entire file system namespace. Next, the file system namespace abstraction is updated based on the received metadata. Next, a determination is made whether or not caching is enabled for the file system namespace abstraction. If caching is enabled for the file system namespace abstraction, the updated file system namespace abstraction is cached in SSD storage.
1. A non-transitory storage medium having stored therein computer-executable instructions which, when executed by one or more hardware processors, perform the following processes:
receiving metadata in the form of a modification to metadata represented by a file system namespace abstraction, wherein the file system namespace abstraction corresponds to less than an entire file system namespace;
updating the file system namespace abstraction based on the received metadata;
determining if caching is enabled for the file system namespace abstraction; and
when caching is enabled for the file system namespace abstraction, caching the updated file system namespace abstraction in SSD storage.
2. The non-transitory storage medium as recited in claim 1 , wherein the file system namespace abstraction is in the form of an Mtree.
3. The non-transitory storage medium as recited in claim 2 , wherein the Mtree is included in a file system namespace that also includes another Mtree for which caching is not enabled.
4. The non-transitory storage medium as recited in claim 1 , wherein when caching is not enabled for the file system namespace abstraction, the updated file system namespace abstraction is not cached in the SSD storage.
5. The non-transitory storage medium as recited in claim 1 , wherein when caching is enabled for the file system namespace abstraction, the updated file system namespace abstraction is cached in SSD storage in the form of a flattened Btree.
6. The non-transitory storage medium as recited in claim 5 , wherein the flattened Btree includes one or more pages.
7. The non-transitory storage medium as recited in claim 1 , wherein the file system namespace abstraction represents a portion of a file system.
8. The non-transitory storage medium as recited in claim 1 , wherein the file system namespace abstraction is in the form of an Mtree, and the processes further comprise defragmenting the SSD storage by removing cached metadata that corresponds with a deleted Mtree.
9. The non-transitory storage medium as recited in claim 1 , wherein the file system namespace abstraction is in the form of an Mtree, and the processes further comprise allocating a respective specific amount of SSD storage to each of a plurality of Mtrees.
10. A physical device, wherein the physical device comprises:
one or more hardware processors; and
the non-transitory storage medium as recited in claim 1 .
11. The non-transitory storage medium as recited in claim 1 , wherein the file system namespace abstraction is in the form of an Mtree, and the processes further comprise disabling caching for the Mtree.
12. The non-transitory storage medium as recited in claim 11 , wherein the processes further comprise performing a defragmentation process by throwing away cached pages corresponding to the disabled Mtree.
13. The non-transitory storage medium as recited in claim 12 , wherein the defragmentation process is performed according to an allocation of SSD storage.
14. The non-transitory storage medium as recited in claim 12 , wherein the defragmentation process is performed based on page header time stamps.
15. The non-transitory storage medium as recited in claim 1 , wherein the file system namespace abstraction is in the form of an Mtree, and the processes further comprise controlling allocation of SSD storage to each of a plurality of Mtrees, wherein the allocation is based on a weighting scheme.