This section explains how to configure automated removal of cached data from spoke portals and how to remove cached directories and files from spoke portals by using the qq
CLI.
Before you can configure spoke portal cache management, your Qumulo cluster must have an active portal relationship.
How Cache Management Works in Qumulo Core
By default, Qumulo Core automatically recaches data on spoke portals upon access and maintains a minimum of 5% free capacity on clusters whose spoke portals contain cached data. Qumulo Core removes cached data in the background until it meets its configured free threshold or until it removes all cached data from the spoke portals.
You can configure the automated removal of cached data or remove cached data from spoke portals by using the qq
CLI.
Although this process doesn’t affect data on the hub portal, accessing the portions of spoke portals whose cached data has been removed can incur the same latency as during initial access.
Configuring Automated Removal of Cached Data from Spoke Portals
This section explains how to configure automatic cache management for active spoke portals. To control automatic cache management, you can configure a free threshold. For example, if you set the free threshold setting to 0.05
, Qumulo Core begins to remove cached data from spoke portals when the system is 95% full.
- Depending on the free threshold configuration, the maximum amount of cached data that Qumulo Core can remove is equal to the amount of data that spoke portals consume.
- Spoke portals function as long as Qumulo Core has sufficient capacity for servicing in-flight file system requests. However, having to continuously fetch data from the hub portal can decrease system performance.
- If file system objects unrelated to spoke portals consume all usable capacity on a cluster, clients can experience issues while attemping to access spoke portals.
-
To view the current free threshold, run the
qq portal_get_eviction_settings
command. -
To configure the current free threshold, run the
qq portal_set_eviction_settings
command and specify the free threshold value as a decimal between0.0
and1.0
. In the following example, Qumulo Core begins to remove cached data from spoke portals when the system is 80% full.qq portal_set_eviction_settings \ --free-threshold 0.2
Removing Cached Data from Spoke Portals by Using the qq CLI
This section explains how to free capacity by removing a cached directory, file, or a child file or directory linked to a parent directory.
To Remove a Cached Directory
-
Ensure that the
jq
tool is installed on your system. -
To determine the spoke ID, run the
qq portal_list_spokes
command and compare the spoke portal root directory to the path of the cached directory to be removed. -
To determine the ID of the directory to be removed, run the
qq fs_file_get_attr
command and pipe the output to thejq
tool. For example:qq fs_file_get_attr \ --path /portals/seattle/media/ | \ jq .id
-
Run the
qq portal_evict_tree
command and specify the spoke ID and directory ID. For example:qq portal_evict_tree \ --spoke-id 3 \ --dir-id 29710
Qumulo Core begins to remove the cached directory. The following is example output.
{ "monitor_uri": "v1/tree-delete/jobs/29710" }
-
To view the status of the removal process, run the
qq tree_delete_get
command and specify the directory ID.The following is example output.
id initial_path mode ===== ... ============= =============== 29710 /portals/seattle/media PORTAL_EVICTION
To Remove a Cached File
-
Ensure that the
jq
tool is installed on your system. -
To determine the spoke ID, run the
qq portal_list_spokes
command and compare the spoke portal root directory to the path of the cached file to be removed. -
To determine the ID of the file to be removed, run the
qq fs_file_get_attr
command and pipe the output to thejq
tool. For example:qq fs_file_get_attr \ --path /portals/seattle/project.xml | \ jq .id
-
Run the
qq portal_evict_data
command and specify the spoke ID and file ID. For example:qq portal_evict_data \ --spoke-id 3 \ --file-id 14560
The cached file is removed. The following is example output.
{ "evicted_blocks": 5000 }
To Remove a Cached Link from a Directory to its Child File or Directory
If no links remain to a cached child file or directory, this operation also removes the cached child.
-
Ensure that the
jq
tool is installed on your system. -
To determine the spoke ID, run the
qq portal_list_spokes
command and compare the spoke portal root directory to the path of the of the child file or directory to be removed. -
To determine the ID of the directory whose cached link to a child file is to be removed, run the
qq fs_file_get_attr
command and pipe the output to thejq
tool. For example:qq fs_file_get_attr \ --path /portals/seattle/ | \ jq .id
-
Run the
qq portal_evict_link
and specify the spoke ID, the directory ID, and the name of the cached child file or the path of the cached child directory to be removed. The following example specifies the fileproject.xml
.qq portal_evict_link \ --spoke-id 3 \ --dir-id 54890 \ --name project.xml
The following is example output.
{ "evicted_blocks": 2 }