$ vars [global options] vacuum [options]
- Specify the number of latest key items to keep. Keys older than
<count>value will be deleted. Can be used along with
--time. Must use one or both of
- Specify the time period of latest key items to keep. Keys older
<time>value will be deleted. Use
mfor minutes and
sfor seconds. If the item has
deleted=0then it is not deleted. Can be used along with
--keep. Must use one or both of
Global options are detailed here.
- Specify the DynamoDB table name to use. Default is
- Specify the target AWS region.
- Vacuum aggressively; this will consume most available capacity.
- Show help message.
vacuum command runs garbage collection, deleting expired keys
and outdated versions of keys. When invoked with the
--time=<time> option, it deletes key items older than the specified
time. When invoked with the
--keep=<count> option, it
preserves the specified number of latest key items and deletes older key
items. You may declare a target region with
--region=<name> and a target Vars table in DynamoDB with
--ddb-table-name=<name>. You may also elect to vacuum aggressively
by setting the
--full option, which decreases the delay
vacuum deletes but also consumes more DynamoDB read/write
vacuum can be run with a cron job. The Fugue
vacuum in this way every hour to delete
expired keys and key versions that are greater than 24 hours old from
fugue-vars-store DynamoDB table.
--time options together¶
You can use the
--keep option in conjunction with
--time. Vars prioritizes the options in a way that results in a
greater number of deleted keys.
For example, if you have 100 key items in your Vars DynamoDB table, 75
of which are more than 5 minutes old, you can use
-k 50 and
-t 5m, and
vacuum will prioritize the
-t option, which
results in a deletion of the 75 oldest keys:
vars -v vacuum -k 100 -t 5m
-v option in the command above enables verbosity mode, which in this case reports how many key versions are deleted for each key.
Similarly, if you have 100 key items in your Vars DynamoDB table, 75 of
which are more than 5 minutes old, you can use
-k 10 and
vacuum will prioritize the
-k option, which results in a
deletion of the 90 oldest keys:
vars -v vacuum -k 10 -t 5m
h for hours,
m for minutes, and
s for seconds with the
--full option to decrease delay between
--full option to vacuum aggressively, which
removes the delay between
vacuum deletes. This consumes more of your
DynamoDB read/write capacity.
For example, the following command deletes all but one key item in your Vars DynamoDB table, and deletes them immediately, rather than using a delay between deletes:
vars -v vacuum -k 1 --full
This also creates a spike in consumed capacity. You can check your
DynamoDB capacity at any time by visiting the DynamoDB Dashboard in the
Click on “Tables” in the left sidebar, select your table name from the
list (default table name is
fugue-vars-store), and then click on the
“Capacity” tab to adjust your read/write capacity units. You can also
click on the “Metrics” tab to see CloudWatch graphs of consumed
read/write capacity, put latency, and other metrics.