What does the Overview tab provide a quick view of in Resource Monitor select all that apply?
To help control costs and avoid unexpected credit usage caused by running warehouses, Snowflake provides resource monitors. A virtual warehouse consumes Snowflake credits while it runs. Show
A resource monitor can be used to monitor credit usage by user-managed virtual warehouses and virtual warehouses used by cloud services, however it can only suspend user-managed warehouses based on credit usage thresholds. Credit usage for cloud services may continue after a user-managed warehouse is suspended. The number of credits consumed depends on the size of the warehouse and how long it runs. Limits can be set for a specified interval or date range. When these limits are reached and/or are approaching, the resource monitor can trigger various actions, such as sending alert notifications and/or suspending user-managed warehouses. Resource monitors can only be created by account administrators (i.e. users with the ACCOUNTADMIN role); however, account administrators can choose to enable users with other roles to view and modify resource monitors using SQL. In this Topic: Overview¶Resource Monitor Properties¶A resource monitor is a first-class object in Snowflake, consisting of the following properties. Credit Quota¶Credit quota specifies the number of Snowflake credits allocated to the monitor for the specified frequency interval. Any number can be specified. In addition, Snowflake tracks the used credits/quota within the specified frequency interval by all warehouses assigned to the monitor. At the specified interval, this number resets back to 0. Credit quota accounts for credits consumed by both user-managed virtual warehouses and virtual warehouses used by cloud services. For example, your resource monitor limit is set at 1000 credits, if your warehouse consumes 700 credits, and cloud services consume 300 credits within a specified interval or date range, an alert will be triggered. Note Resource monitor limits do not take into account the daily 10% adjustment for cloud services, but rather are based on the full amount of cloud service usage. For more information about how cloud services credits and adjustments are calculated, see Understanding Billing for Cloud Services Usage. For instructions on how to view your cloud services credit usage, see Viewing Cloud Services Credit Usage. Monitor Level¶This property specifies whether the resource monitor is used to monitor the credit usage for your entire Account (i.e. all warehouses in the account) or a specific set of individual warehouses. If this property is not set, the resource monitor doesn’t monitor any credit usage. It simply remains dormant. Schedule¶The default schedule for a resource monitor specifies that it starts monitoring credit usage immediately and the used credits reset back to 0 at the beginning of each calendar month (i.e. the start of the standard Snowflake billing cycle). However, you can optionally customize the schedule for a resource monitor using the following properties: FrequencyThe interval at which the used credits reset relative to the specified start date. Supported values:
Date and time (i.e. timestamp) when the resource monitor starts monitoring the assigned warehouses. Supported values:
In addition, Snowflake uses this date to determine when to reset the used credits, based on the specified frequency. Note, however, that regardless of the time specified in the start date and time, resource monitors reset at 12:00 AM UTC. For example, if the start is 15-July-2019 (Monday) at 8:00 AM:
Note that, if you specify the last day of a month as the start date, Snowflake resets the used credits on the last day of all following months, regardless of the number of days in the month. For example, if you set the start date to January 31, Snowflake subsequently resets the used credits for the resource monitor on February 28 (or February 29 in a leap year), March 31, April 30, and so on. EndDate and time (i.e. timestamp) when Snowflake suspends the warehouses associated with the resource monitor, regardless of whether the used credits reached any of the thresholds defined for the resource monitor’s actions (see next section in this topic). Supported values: Any future timestamp. Note that this property is not commonly used. Important If you choose to customize the schedule for a resource monitor, the frequency is relative to the specified start date, which is different than the default schedule. Also, if you specify a frequency, you must also specify a start date and time, and vice versa (i.e. you cannot set one without setting the other). Actions¶Also referred to as triggers, each action specifies a threshold, as a percentage of the credit quota for the resource monitor, and the action to perform when the threshold is reached within the specified interval. Note that actions support thresholds greater than 100. Resource monitors support the following actions: Notify & SuspendSend a notification (to all account administrators with notifications enabled) and suspend all assigned warehouses after all statements being executed by the warehouse(s) have completed. Notify & Suspend ImmediatelySend a notification (to all account administrators with notifications enabled) and suspend all assigned warehouses immediately, which cancels any statements being executed by the warehouses at the time. NotifyPerform no action, but send an alert notification (to all account administrators with notifications enabled). Each resource monitor can have the following actions:
Note
Assignment of Resource Monitors¶A single monitor can be set at the account level to control credit usage for all warehouses in your account. In addition, a monitor can be assigned to one or more warehouses, thereby controlling the credit usage for each assigned warehouse. Note, however, that a warehouse can be assigned to only a single resource monitor below the account level. The following diagram illustrates a scenario in which one resource monitor is set at the account level and individual warehouses are assigned to two other resource monitors: Based on this diagram:
Note that the actual credits consumed by Warehouses 3, 4, and 5 may be less than their quotas if the quota for the account is reached first. Important
Warehouse Suspension and Resumption¶The used credits for a resource monitor reflects the sum of all credits consumed by all assigned warehouses within the specified interval. If a monitor has a Suspend or Suspend Immediately action defined and its used credits reach the threshold for the action, any warehouses assigned to the monitor are suspended and cannot be resumed until one of the following conditions is met:
Tip Resource monitors are not intended for strictly controlling consumption on an hourly basis; they are intended for tracking and controlling credit consumption per interval (day, week, month, etc.). Also, they are not intended for setting precise limits on credit usage (i.e. down to the level of individual credits). For example, when credit quota thresholds are reached for a resource monitor, the assigned warehouses may take some time to suspend, even when the action is Suspend Immediate, thereby consuming additional credits. If you wish to strictly enforce your quotas, we recommend the following:
Resource Monitor Notifications¶When a resource monitor reaches the threshold for an action, it generates one of the following notifications, based on the action performed:
The notification is sent to all account administrators who have enabled receipt of notifications and non-administrator users in the notification list. Important Notifications can be received by account administrators through the classic web interface and/or email; however, by default, notifications are not enabled:
Notifications for non-administrator users are only available through email. Access Control Privileges for Resource Monitors¶By default, resource monitors can only be created by account administrators and, therefore, can only be viewed and maintained by them. However, roles that have been granted the following privileges on specific resource monitors can view and modify the resource monitor as needed using SQL:
For more details, see Access Control Privileges and GRANT Note that only account administrators can view and manage resource monitors via the classic web interface. Enabling Receipt of Notifications for Account Administrators¶As an account administrator, you must enable notifications for yourself in the classic web interface before you can receive any notifications generated by resource monitors. Before you can enable email notifications, you must verify your email address. See Verifying Your Email Address in the Classic Web Interface. To enable notifications in the classic web interface:
Creating Resource Monitors¶Resource monitors can be created through either the web interface or SQL; however, only account administrators (i.e. users with the ACCOUNTADMIN role) can create resource monitors. Important You must assign at least one warehouse to a resource monitor or set the monitor at the account level for it to begin monitoring/tracking credit usage:
Also, to receive notifications when resource monitor actions are triggered, you must enable notifications. Creating a Resource Monitor with a Default Schedule¶To create a resource monitor that uses the default schedule (i.e. starts monitoring immediately and resets on the first day of each calendar month):
Creating a Resource Monitor with a Custom Schedule¶To create a resource monitor that uses a schedule other than the default: Classic Web Interface
Execute a CREATE RESOURCE MONITOR command, with one or more of the following scheduling properties:
For example:
Note You cannot change the customized schedule for a resource monitor back to the default. You must drop the monitor and create a new monitor. Modifying a Resource Monitor¶You can modify the following properties for an existing resource monitor:
Note Changing any of these properties does not affect the used credits to-date for the monitor. All changes only affect used credits after the changes are saved. Resource monitors can be modified through either the web interface or SQL: Classic Web InterfaceUsing the ACCOUNTADMIN system role:
For example, to increase the credit quota for limit1 to 3000:
Note If a resource monitor has a customized schedule, you cannot change the schedule back to the default. You must drop the monitor and create a new monitor. Setting a Resource Monitor for Your Account¶A resource monitor can be set for your account through either the web interface or SQL: Classic Web InterfaceThe process is the same as creating or modifying a resource monitor (see instructions in this topic). SQLIn SQL, this task is performed in two steps:
For example:
To view whether a resource monitor is set for your account, use the web interface or the SHOW RESOURCE MONITORS command. The LEVEL column for a resource monitor displays whether it is set for your account or individual warehouses. Important
Assigning Warehouses to a Resource Monitor¶Warehouses can be assigned to an existing resource monitor through either the web interface or SQL. Only account administrators (users with the ACCOUNTADMIN role) can assign warehouses to resource monitors. This role must also have the MODIFY privilege on each warehouse. Classic Web Interface
Execute an ALTER WAREHOUSE command. For example, using the resource monitor (limit1) from a previous example, assign a different warehouse to the monitor:
Viewing Resource Monitors¶Resource monitors can be viewed through either the web interface or SQL: Classic Web InterfaceUsing the ACCOUNTADMIN role:
Using the ACCOUNTADMIN role or a role that has been granted the MONITOR or MODIFY privilege on the desired resource monitor: Execute a SHOW RESOURCE MONITORS command. In addition, using any role, you can execute a SHOW WAREHOUSES command to view the warehouses owned by the role (or for which the role has been granted USAGE privilege). The output includes the resource monitor, if any, to which the warehouse is assigned. Note For provider accounts that have created reader accounts, Snowflake provides an additional view, RESOURCE_MONITORS. This view can be used for querying resource monitor usage in the provider’s reader accounts. For more details, see Account Usage. What does the Overview tab provide a quick view of in Resource Monitor?As its name implies, the Overview tab provides you with an at-a-glance, basic overview of your system's current status. As you can see, the CPU graph displays the total percentage of CPU capacity currently in use in green and the CPU Maximum Frequency in blue.
What does a Resource Monitor do?Resource Monitor (Resmon) is a system application included in Windows Vista and later versions of Windows that allows users to look at the presence and allocation of resources on a computer.
What are the names of the five tabs displayed at the top of the Resource Monitor?Resource Monitor includes five tabs: Overview, CPU, Memory, Disk, and Network. The Overview tab displays basic system resource usage information; the other tabs display information about each specific resource.
What categories can you explore under the CPU tab in Windows Resource Monitor?There are three different sections under the CPU tab: The Processes section – This is basically what you'll see in the CPU section of the Overview tab. The Services section – This is a list of running Windows services. The Associated Handles section – This lists system resources such as Registry values and system file.
|