diff --git a/docs/v0.7/en/greptimecloud/overview.md b/docs/v0.7/en/greptimecloud/overview.md index 8fb415dae..62c9403d4 100644 --- a/docs/v0.7/en/greptimecloud/overview.md +++ b/docs/v0.7/en/greptimecloud/overview.md @@ -2,9 +2,9 @@ GreptimeCloud is a cloud service that is powered by fully-managed serverless GreptimeDB, providing a scalable and efficient solution for time-series data platform and and Prometheus backend. -## Learn about Usage +## Learn about usage and billing -To learn how GreptimeCloud measure its workload for serverless architecture, and how to optimize your usage, see [Learn about Usage](usage.md). +To learn how GreptimeCloud measure its workload for serverless architecture, and how to optimize your usage and billing, see [Usage & Billing](./usage-&-billing/overview.md). ## Integrations diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/byoc.md b/docs/v0.7/en/greptimecloud/usage-&-billing/byoc.md new file mode 100644 index 000000000..5b0fda1e8 --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/byoc.md @@ -0,0 +1,7 @@ +# BYOC + +BYOC (Bring Your Own Cloud) is a service enabling you to utilize your own cloud resources to host GreptimeDB. +This service offers extensive customization and flexibility for your business needs, +along with complete management of your cloud resources and robust security features to safeguard your infrastructure. + +[Contact us](https://m0k0y6ku50y.typeform.com/to/jwxzJCH4) if you are interested in customizing your BYOC plan. diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/dedicated.md b/docs/v0.7/en/greptimecloud/usage-&-billing/dedicated.md new file mode 100644 index 000000000..19103d685 --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/dedicated.md @@ -0,0 +1,35 @@ +# Dedicated Plan + +The dedicated plan allows you to purchase dedicated CPUs and storage to host GreptimeDB. +It provides unlimited data storage and retention, +complete isolation of resources and network, +and includes support from Greptime's SRE team. + +If you require absolute isolation from other users or +need to exceed the maximum usage limits of the serverless plan, +then the dedicated plan is your choice. + +## Costs + +Please see [Pricing](https://greptime.com/pricing) for the latest pricing information. + +### Computing nodes + +When setting up a service under the Dedicated Plan, you'll need to configure the service mode, +which determine the size of computing nodes. +Greptime calculates costs based on the computing nodes specified in your chosen plan every hour and bills monthly. + +Cost Calculation Formula: + +- Hourly Costs: (Chosen Plan's Node Size * Number of Nodes * Node Hour Price) +- Daily Costs: Sum of Hourly Costs +- Monthly Costs: Sum of Daily Costs + + + +### Network traffic + +The cost of network traffic will be included in your monthly bill. +Pricing is determined by the cloud server provider (such as AWS). +Greptime does not charge any additional fees for traffic costs. + diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/hobby.md b/docs/v0.7/en/greptimecloud/usage-&-billing/hobby.md new file mode 100644 index 000000000..e9b92d7fd --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/hobby.md @@ -0,0 +1,25 @@ +# Hobby Plan + +## Introduction + +GreptimeCloud offers a free tier Hobby Plan for users to try the service. +Each team can create up to three services in the Hobby Plan. + +The Hobby Plan has the following limitations: + +- RCU (Read Capacity Units): 40 RCU/s per service. +- WCU (Write Capacity Units): 20 WCU/s per service. +- Storage capacity: 5GB per service. +- Data retention policy: 3 months. + +:::tip NOTE +The plan may change in the future. If you have any questions about it, please contact [feedback@greptime.cloud](mailto:feedback@greptime.cloud). +::: + + + + diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/overview.md b/docs/v0.7/en/greptimecloud/usage-&-billing/overview.md new file mode 100644 index 000000000..9ee83e86c --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/overview.md @@ -0,0 +1,9 @@ +# Overview + +These documents will help you understand the usage and billing of Greptime Cloud. + +- [Request Capacity Unit](request-capacity-unit.md) +- [Hobby Plan](hobby.md) +- [Serverless Plan](serverless.md) +- [Dedicated Plan](dedicated.md) +- [BYOC](byoc.md) diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/request-capacity-unit.md b/docs/v0.7/en/greptimecloud/usage-&-billing/request-capacity-unit.md new file mode 100644 index 000000000..36d8c5e16 --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/request-capacity-unit.md @@ -0,0 +1,80 @@ +# Request Capacity Unit + +This document introduces the calculation algorithms for request capacity units. To monitor your service usage, you can visit the [GreptimeCloud Console](https://console.greptime.cloud/). + +All requests to GreptimeCloud are measured in capacity units, which reflect the size and complexity of the request. The measurement methods of write capacity unit and read capacity unit are different, see following for details. + +### Write capacity unit (WCU) + +Each API call to write data to your table is a write request. +WCU is calculated based on the total size of the insert rows in one request. +A standard write capacity unit can write rows up to 1KB. +For rows larger than 1KB, additional write capacity units are required. + +:::tip NOTE +The capacity unit may be subject to change in the future. +::: + +The following steps are used to determine the size of each request: + +1. Get the size of the data type of each column in the table schema. You can find details about the size of each data type in the [Data Types](/reference/sql/data-types.md) documentation. +2. Sum up the sizes of all columns in the request. If a column is not present in the request, its size depends on the column's default value. If the default value is null, the size is 0; otherwise, it is the size of the data type. +3. Multiply the sum by the number of rows to be written. + +Here's an example of how to calculate the WCU for a table with the following schema: + +```shell ++-------------+----------------------+------+------+---------------------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++-------------+----------------------+------+------+---------------------+---------------+ +| host | String | PRI | YES | | TAG | +| idc | String | PRI | YES | | TAG | +| cpu_util | Float64 | | YES | | FIELD | +| memory_util | Float64 | | YES | | FIELD | +| disk_util | Float64 | | YES | | FIELD | +| ts | TimestampMillisecond | PRI | NO | current_timestamp() | TIMESTAMP | ++-------------+----------------------+------+------+---------------------+---------------+ +``` + +You have a write request as following: + +```shell +INSERT INTO system_metrics VALUES ("host1", "a", 11.8, 10.3, 10.3, 1667446797450); +``` + +Based on the size of the data types in your table schema, the size of each row is 38 bytes (5+1+8+8+8+8), and the WCU of this request is 1 according to the calculation algorithm. + +To reduce the WCU usage, use batched `INSERT` statements to insert multiple rows in a single statement, rather than sending a separate statement per row. For example: + +```shell +INSERT INTO system_metrics +VALUES + ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), + ("host1", "idc_a", 80.1, 70.3, 90.0, 1667446797550), + # ...... 22 rows + ("host1", "idc_b", 90.0, 39.9, 60.6, 1667446798250); +``` + +The size of the request is 950 bytes (38 x 25). The WCU of this request is 1. If you insert 40 rows in a single statement, the size is 1520 bytes (38 x 40), and the WCU of this request is 2. + +### Read capacity unit (RCU) + +Each API call to read data from your table is a read request. +RCU is the data size scanned and loaded into server's memory in one request. +A standard read capacity unit can scan up to 1MB data. For scanned data larger than 1MB, additional read capacity units are required. + +:::tip NOTE +The capacity unit may be subject to change in the future. +::: + +Suppose there is a read request scanning 2.5MB data. The RCU of this request is 3 according to calculation algorithm. + +To lower the RCU, you can design the table schema and queries carefully. Here are some tips: + +- Use indexes to support the efficient execution of queries in GreptimeDB. Without indexes, GreptimeDB must scan the entire table to process the query. If an index matches the query, GreptimeDB can use the index to limit the data scanned. Consider using a column with high cardinality as the primary key and use it in the `WHERE` clause. +- Use queries that match a smaller percentage of data for better selectivity. For instance, an equality match on the time index field and a high cardinality tag field can efficiently limit the data scanned. Note that the inequality operator `!=` is not efficient because it always scans all data. + +## Usage metrics + +You can view the usage at the [GreptimeCloud Console](https://console.greptime.cloud/). +The maximum WCU and RCU utilized are aggregated by time range and presented in the usage charts. diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/serverless.md b/docs/v0.7/en/greptimecloud/usage-&-billing/serverless.md new file mode 100644 index 000000000..d23e1648c --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/serverless.md @@ -0,0 +1,42 @@ +# Serverless Plan + +The serverless plan allows you to purchase request capacities according to your needs +and provides support from the SRE team. +This solution offers unlimited data storage and configurable retention, +making it suitable for production environments and scalable with your business growth. + +When setting up a service under the Serverless Plan or upgrading from the Hobby Plan, +you'll need to configure the capacity units for the service plan, which include: + +- The Maximum WCU (Write Capacity Unit) per second, upper limit of 5000 +- The Maximum RCU (Read Capacity Unit) per second, upper limit of 5000 + +:::tip NOTE +For the concepts of WCU and RCU, see [Request Capacity Unit](request-capacity-unit.md). +::: + +## Costs + +Please see [Pricing](https://greptime.com/pricing) for the latest pricing information. + +### WCU and RCU + +Greptime calculates costs based on the capacity units specified in your chosen plan on a minute-by-minute basis +and bills you monthly for the services used. + +Cost Calculation Formula: + +- Minute Costs: (Chosen Plan's WCU * WCU Minute Price) + (Chosen Plan's RCU * RCU Minute Price) +- Hourly Costs: Sum of Minute Costs +- Daily Costs: Sum of Hourly Costs +- Monthly Costs: Sum of Daily Costs + + + + + diff --git a/docs/v0.7/en/greptimecloud/usage-&-billing/shared-storage-capacity.md b/docs/v0.7/en/greptimecloud/usage-&-billing/shared-storage-capacity.md new file mode 100644 index 000000000..dfa91a8c4 --- /dev/null +++ b/docs/v0.7/en/greptimecloud/usage-&-billing/shared-storage-capacity.md @@ -0,0 +1,3 @@ +### Storage Capacity + +GreptimeCloud stores your data in object storage, such as S3, and calculates storage costs based on your total data size in the database. You'll be billed monthly for the services used. diff --git a/docs/v0.7/en/greptimecloud/usage.md b/docs/v0.7/en/greptimecloud/usage.md index 3dd688f22..f3c62ca7d 100644 --- a/docs/v0.7/en/greptimecloud/usage.md +++ b/docs/v0.7/en/greptimecloud/usage.md @@ -1,105 +1,3 @@ -# Learn about Usage +# THIS PAGE HAS BEEN DEPRECATED -Welcome to GreptimeCloud. This document will introduce the usage calculation algorithms of GreptimeCloud. To monitor service usage, you can go to the [GreptimeCloud Console](https://console.greptime.cloud/). - -## Capacity Unit - -All requests to GreptimeCloud are measured in capacity units, which reflect the size and complexity of the request. The measurement methods of write capacity unit and read capacity unit are different, see following for details. - -### WCU (Write Capacity Unit) - -Each API call to write data to your table is a write request. -WCU is calculated based on the total size of the insert rows in one request. -A standard write capacity unit can write rows up to 1KB. -For rows larger than 1KB, additional write capacity units are required. - -:::tip NOTE -The capacity unit may be subject to change in the future. -::: - -The following steps are used to determine the size of each request: - -1. Get the size of the data type of each column in the table schema. You can find details about the size of each data type in the [Data Types](/reference/sql/data-types.md) documentation. -2. Sum up the sizes of all columns in the request. If a column is not present in the request, its size depends on the column's default value. If the default value is null, the size is 0; otherwise, it is the size of the data type. -3. Multiply the sum by the number of rows to be written. - -Here's an example of how to calculate the WCU for a table with the following schema: - -```shell -+-------------+----------------------+------+------+---------------------+---------------+ -| Column | Type | Key | Null | Default | Semantic Type | -+-------------+----------------------+------+------+---------------------+---------------+ -| host | String | PRI | YES | | TAG | -| idc | String | PRI | YES | | TAG | -| cpu_util | Float64 | | YES | | FIELD | -| memory_util | Float64 | | YES | | FIELD | -| disk_util | Float64 | | YES | | FIELD | -| ts | TimestampMillisecond | PRI | NO | current_timestamp() | TIMESTAMP | -+-------------+----------------------+------+------+---------------------+---------------+ -``` - -You have a write request as following: - -```shell -INSERT INTO system_metrics VALUES ("host1", "a", 11.8, 10.3, 10.3, 1667446797450); -``` - -Based on the size of the data types in your table schema, the size of each row is 38 bytes (5+1+8+8+8+8), and the WCU of this request is 1 according to the calculation algorithm. - -To reduce the WCU usage, use batched `INSERT` statements to insert multiple rows in a single statement, rather than sending a separate statement per row. For example: - -```shell -INSERT INTO system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host1", "idc_a", 80.1, 70.3, 90.0, 1667446797550), - # ...... 22 rows - ("host1", "idc_b", 90.0, 39.9, 60.6, 1667446798250); -``` - -The size of the request is 950 bytes (38 x 25). The WCU of this request is 1. If you insert 40 rows in a single statement, the size is 1520 bytes (38 x 40), and the WCU of this request is 2. - -### RCU (Read Capacity Unit) - -Each API call to read data from your table is a read request. RCU is the server resource consumed in one request. It depends on the following items: - -- CPU time consumed by the request -- Scanned data size by the request - -A standard read capacity unit can consume CPU time up to 1ms or scan up to 1KB data. For cpu time or scanned data larger than 1ms or 1KB, additional read capacity units are required. - -:::tip NOTE -The capacity unit may be subject to change in the future. -::: - -For example, suppose there is a read request consuming 2.5ms CPU time and scanning 2KB data. All of these costs add up to 5 RCUs: - -- 3 RCU from 2.5ms CPU time -- 2 RCU from 2KB scanned data - -To lower the RCU, you can design the table schema and queries carefully. Here are some tips: - -- Use indexes to support the efficient execution of queries in GreptimeDB. Without indexes, GreptimeDB must scan the entire table to process the query. If an index matches the query, GreptimeDB can use the index to limit the data scanned. Consider using a column with high cardinality as the primary key and use it in the `WHERE` clause. -- Use queries that match a smaller percentage of data for better selectivity. For instance, an equality match on the time index field and a high cardinality tag field can efficiently limit the data scanned. Note that the inequality operator `!=` is not efficient because it always scans all data. - -## Storage Capacity - -GreptimeCloud stores data in object storage such as S3, and measures the size of your total data saved in database. - -## Data retention - -Depends on the pricing plan, GreptimeCloud may apply a default retention policy -for your data. Data will be deleted after its retention period expired. - -## Tech Preview Plan - -Tech preview plan provides the following free tier for users to try GreptimeCloud: - -- Write capacity unit (WCU): 800 WCU/s per service. -- Storage capacity: 10GB per service. -- Account limits: 3 services per team. -- Data retention policy: By default, data written in the last three months is retained. - -:::tip NOTE -The plan may change in the future. If you have any questions about it, please contact [feedback@greptime.cloud](mailto:feedback@greptime.cloud). -::: +Please refer to the [Usage & Billing](./usage-&-billing/overview.md) page for up-to-date information. diff --git a/docs/v0.7/en/summary.yml b/docs/v0.7/en/summary.yml index bfa0fef54..5c7caf681 100644 --- a/docs/v0.7/en/summary.yml +++ b/docs/v0.7/en/summary.yml @@ -106,7 +106,13 @@ - SDK-Libraries: - go - java - - usage + - Usage-&-Billing: + - overview + - request-capacity-unit + - hobby + - serverless + - dedicated + - byoc - Tutorials: - Monitor-Host-Metrics: - prometheus diff --git a/docs/v0.7/zh/greptimecloud/overview.md b/docs/v0.7/zh/greptimecloud/overview.md index 9e32c2401..f1576007e 100644 --- a/docs/v0.7/zh/greptimecloud/overview.md +++ b/docs/v0.7/zh/greptimecloud/overview.md @@ -2,9 +2,9 @@ GreptimeCloud 作为完全托管 GreptimeDB 的 Serverless 云服务,为时间序列数据平台和 Prometheus 后端提供可扩展和高效的解决方案。 -## 了解产品用量 +## 了解费用及用量 -要了解 GreptimeCloud 如何测量其 Serverless 架构的工作负载以及如何优化 service 的用量,请参阅 [产品用量](usage.md)。 +要了解 GreptimeCloud 如何测量其 Serverless 架构的工作负载以及如何优化 service 的用量及费用,请参阅 [用量及费用](./usage-&-billing/overview.md)。 ## 集成 diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/byoc.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/byoc.md new file mode 100644 index 000000000..d84cc4b94 --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/byoc.md @@ -0,0 +1,6 @@ +# BYOC + +BYOC(Bring Your Own Cloud)允许你利用自己的云资源来托管 GreptimeDB。 +该服务由你完全管理云资源,为业务需求提供了广泛的定制和灵活性并提供强大的安全功能来保护基础架构。 + +如果你对 BYOC 计划感兴趣,请[联系我们](https://m0k0y6ku50y.typeform.com/to/jwxzJCH4)。 diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/dedicated.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/dedicated.md new file mode 100644 index 000000000..3e3528606 --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/dedicated.md @@ -0,0 +1,30 @@ +# Dedicated 计划 + +Dedicated 计划允许你购买专用的 CPU 和存储来托管 GreptimeDB。 +它提供无限的数据存储和数据保留策略, +完全隔离的资源和网络, +并包括 Greptime 的 SRE 团队的支持。 + +如果你需要绝对地与其他用户隔离,或者需要超出 Serverless 计划的最大用量限制,那么 Dedicated 计划是你的选择。 + +## 费用 + +请查看[价格页面](https://greptime.com/pricing)获取最新的定价信息。 + +### 计算节点 + +在 Dedicated 计划下创建服务时,你需要配置服务模式并确定计算节点的规格。 +Greptime 根据你选择的计划中指定的计算节点按小时计算费用,并按月收费。 + +费用计算公式: + +- 每小时费用:(所选计划的节点规格 * 节点数量 * 节点小时价格) +- 每日费用:每小时费用之和 +- 每月费用:每日费用之和 + + + +### 网络流量 + +网络流量的费用将包含在你的月度账单中。 +流量价格由云服务器提供商(如 AWS)决定,Greptime 不会对流量收取额外费用。 diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/hobby.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/hobby.md new file mode 100644 index 000000000..42eb6d86b --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/hobby.md @@ -0,0 +1,26 @@ +# Hobby 计划 + +## 简介 + +GreptimeCloud 提供免费的 Hobby 计划供你尝试服务。 +每个团队可以在 Hobby 计划中创建最多三个服务。 + +Hobby 计划有以下限制: + +- RCU (Read Capacity Units): 每个服务 40 RCU/s。 +- WCU (Write Capacity Units): 每个服务 20 WCU/s。 +- 存储容量: 每个服务 5GB。 +- 数据保留策略: 最近三个月。 + +:::tip 注意 +计划可能会在未来更改。如果有任何问题,请联系 [feedback@greptime.cloud](mailto:feedback@greptime.cloud)。 +::: + + diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/overview.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/overview.md new file mode 100644 index 000000000..1623fcfda --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/overview.md @@ -0,0 +1,9 @@ +# 概览 + +此文档将帮助你了解 GreptimeCloud 的用量和费用。 + +- [请求容量单位](request-capacity-unit.md) +- [Hobby 计划](hobby.md) +- [Serverless 计划](serverless.md) +- [Dedicated 计划](dedicated.md) +- [BYOC](byoc.md) diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/request-capacity-unit.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/request-capacity-unit.md new file mode 100644 index 000000000..1bc8885fb --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/request-capacity-unit.md @@ -0,0 +1,76 @@ +# 请求容量单位 + +本文档将介绍 GreptimeCloud 的请求容量单位算法。你可以前往 [GreptimeCloud 控制台](https://console.greptime.cloud/) 监控服务的使用情况。 +所有对 GreptimeCloud 的请求都是以容量单位来衡量的,容量单位反映了请求的大小和复杂程度。写容量单位和读容量单位的计算方法不同,详情请见下文。 + +### Write Capacity Unit (WCU) + +每个写入数据到表的 API 调用都是一个写请求。WCU 是根据一次请求中插入行的总大小来计算的。一个标准的 WCU 可以写入不超过 1 KB 的行数据。对于大于 1 KB 的数据,需要额外的 WCU。 + +:::tip 注意 +WCU 的容量可能会在未来发生变化。 +::: + +每个请求的大小根据以下步骤计算: + +1. 获取表结构中每个列的数据类型的大小。你可以在 [数据类型](/reference/sql/data-types.md) 文档中找到有关每个数据类型大小的详细信息。 +2. 计算请求中所有列的大小之和。如果请求中不存在某列,则其大小取决于该列的默认值。如果默认值为 null,则大小为 0;否则,它是该列数据类型的大小。 +3. 行数据的总和乘以要写入的行数。 + +这是一个具有以下表结构的 WCU 计算示例: + +```shell ++-------------+----------------------+------+------+---------------------+---------------+ +| Column | Type | Key | Null | Default | Semantic Type | ++-------------+----------------------+------+------+---------------------+---------------+ +| host | String | PRI | YES | | TAG | +| idc | String | PRI | YES | | TAG | +| cpu_util | Float64 | | YES | | FIELD | +| memory_util | Float64 | | YES | | FIELD | +| disk_util | Float64 | | YES | | FIELD | +| ts | TimestampMillisecond | PRI | NO | current_timestamp() | TIMESTAMP | ++-------------+----------------------+------+------+---------------------+---------------+ +``` + +你有一个这样的写请求: + +```shell +INSERT INTO system_metrics VALUES ("host1", "a", 11.8, 10.3, 10.3, 1667446797450); +``` + +根据表结构中数据类型的大小,每行数据的大小为 38 字节(5+1+8+8+8+8),根据计算算法,此请求的 WCU 为 1。为了减少 WCU,可以使用批量的 `INSERT` 语句在单个语句中插入多行数据,而不是每行数据都发送一个单独的请求。例如: + +```shell +INSERT INTO system_metrics +VALUES + ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), + ("host1", "idc_a", 80.1, 70.3, 90.0, 1667446797550), + # ...... 22 rows + ("host1", "idc_b", 90.0, 39.9, 60.6, 1667446798250); +``` + +该请求的大小为 950 字节(38 x 25)。此请求的 WCU 为 1。如果你在单个语句中插入 40 行数据,则大小为 1520 字节(38 x 40),此请求的 WCU 为 2。 + +### Read Capacity Unit (RCU) + +从表中读取数据的每个 API 调用都是一个读请求。 + +RCU 是在服务器内存中扫描和加载的数据大小。 +一个标准的读容量单位可以扫描最多 1MB 的数据。 +对于扫描的数据大于 1MB,需要额外的读容量单位。 + +:::tip 注意 +RCU 的容量可能会在未来发生变化。 +::: + +假如有一个读请求扫描 2.5MB 的数据。根据计算规则该请求的 RCU 为 3。 + +为了降低 RCU,可以仔细设计表结构和查询请求。以下是一些建议: + +- 使用索引以支持在 GreptimeDB 中高效地执行查询。如果没有索引,GreptimeDB 必须扫描整个表来处理查询。如果索引与查询匹配,GreptimeDB 可以使用索引来限制扫描的数据。请考虑使用具有高区分度的列作为主键,并在 `WHERE` 子句中使用它。 +- 选择使用匹配结果较少的查询。例如,时间索引字段和高区分度的标签字段上的相等匹配可以有效地限制扫描的数据大小。请注意,不等运算符 `!=` 无法做到有效查询,因为它总是会扫描所有数据。 + +## 用量统计 + +你可以在 [GreptimeCloud 控制台](https://console.greptime.cloud/) 查看用量. +最大 WCU 和 RCU 的使用情况将按时间范围进行聚合,并在用量图表中呈现。 diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/serverless.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/serverless.md new file mode 100644 index 000000000..44db6aa4e --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/serverless.md @@ -0,0 +1,39 @@ +# Serverless 计划 + +Serverless 计划允许你根据需求购买请求容量,并提供 SRE 团队支持。 +该解决方案提供无限的数据存储和可配置的数据保留策略, +适用于生产环境,并且可以随着业务的增长而扩展。 + +当创建 Serverless 计划新服务或从 Hobby 计划升级时, +你需要配置容量单元,包括: + +- 每秒最大 WCU (Write Capacity Unit),上限为 5000 +- 每秒最大 RCU (Read Capacity Unit),上限为 5000 + +:::tip 注意 +请查看 [请求容量单位](request-capacity-unit.md) 了解 WCU 和 RCU 的概念。 +::: + +## 费用 + +请查看[价格页面](https://greptime.com/pricing)获取最新的定价信息。 + +### WCU 和 RCU + +Greptime 根据你选择的计划中指定的容量单元按分钟计算费用,并按月收费。 + +费用计算公式: + +- 每分钟费用:(所选计划的 WCU * WCU 每分钟价格) + (所选计划的 RCU * RCU 每分钟价格) +- 每小时费用:每分钟费用之和 +- 每日费用:每小时费用之和 +- 每月费用:每日费用之和 + + + + diff --git a/docs/v0.7/zh/greptimecloud/usage-&-billing/share-storage-capacity.md b/docs/v0.7/zh/greptimecloud/usage-&-billing/share-storage-capacity.md new file mode 100644 index 000000000..029ed012d --- /dev/null +++ b/docs/v0.7/zh/greptimecloud/usage-&-billing/share-storage-capacity.md @@ -0,0 +1,3 @@ +### 存储容量 + +GreptimeCloud 会将您的数据存储在对象存储中,例如 S3,并根据数据库中的总数据大小计算存储成本。你将按月支付所使用的服务费用。 diff --git a/docs/v0.7/zh/greptimecloud/usage.md b/docs/v0.7/zh/greptimecloud/usage.md index b1d6de7cf..7110a575a 100644 --- a/docs/v0.7/zh/greptimecloud/usage.md +++ b/docs/v0.7/zh/greptimecloud/usage.md @@ -1,99 +1,3 @@ -# 了解用量 +# 此页面已被弃用 -欢迎使用 GreptimeCloud,本文档将介绍 GreptimeCloud 的用量计算算法。您可以前往 [GreptimeCloud 控制台](https://console.greptime.cloud/) 监控服务的使用情况。 - -## 容量单位 - -所有对 GreptimeCloud 的请求都是以容量单位来衡量的,容量单位反映了请求的大小和复杂程度。写容量单位和读容量单位的计算方法不同,详情请见下文。 - -### WCU (Write Capacity Unit) - -每个写入数据到表的 API 调用都是一个写请求。WCU 是根据一次请求中插入行的总大小来计算的。一个标准的 WCU 可以写入不超过 1 KB 的行数据。对于大于 1 KB 的数据,需要额外的 WCU。 - -:::tip 注意 -WCU 的容量可能会在未来发生变化。 -::: - -每个请求的大小根据以下步骤计算: - -1. 获取表结构中每个列的数据类型的大小。你可以在 [数据类型](/reference/sql/data-types.md) 文档中找到有关每个数据类型大小的详细信息。 -2. 计算请求中所有列的大小之和。如果请求中不存在某列,则其大小取决于该列的默认值。如果默认值为 null,则大小为 0;否则,它是该列数据类型的大小。 -3. 行数据的总和乘以要写入的行数。 - -这是一个具有以下表结构的 WCU 计算示例: - -```shell -+-------------+----------------------+------+------+---------------------+---------------+ -| Column | Type | Key | Null | Default | Semantic Type | -+-------------+----------------------+------+------+---------------------+---------------+ -| host | String | PRI | YES | | TAG | -| idc | String | PRI | YES | | TAG | -| cpu_util | Float64 | | YES | | FIELD | -| memory_util | Float64 | | YES | | FIELD | -| disk_util | Float64 | | YES | | FIELD | -| ts | TimestampMillisecond | PRI | NO | current_timestamp() | TIMESTAMP | -+-------------+----------------------+------+------+---------------------+---------------+ -``` - -你有一个这样的写请求: - -```shell -INSERT INTO system_metrics VALUES ("host1", "a", 11.8, 10.3, 10.3, 1667446797450); -``` - -根据表结构中数据类型的大小,每行数据的大小为 38 字节(5+1+8+8+8+8),根据计算算法,此请求的 WCU 为 1。为了减少 WCU,可以使用批量的 `INSERT` 语句在单个语句中插入多行数据,而不是每行数据都发送一个单独的请求。例如: - -```shell -INSERT INTO system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host1", "idc_a", 80.1, 70.3, 90.0, 1667446797550), - # ...... 22 rows - ("host1", "idc_b", 90.0, 39.9, 60.6, 1667446798250); -``` - -该请求的大小为 950 字节(38 x 25)。此请求的 WCU 为 1。如果你在单个语句中插入 40 行数据,则大小为 1520 字节(38 x 40),此请求的 WCU 为 2。 - -### RCU (Read Capacity Unit) - -从表中读取数据的每个 API 调用都是一个读请求,RCU 是一个请求中消耗的服务器资源。它取决于以下几个因素: - -- 该请求消耗的 CPU 时间 -- 该请求扫描的数据大小 - -一个标准的读容量单位可以消耗不超过 1ms 的 CPU 时间或扫描不超过 1KB 的数据。对于大于 1ms 的 CPU 时间或 1KB 的扫描数据,需要额外的 RCU。 - -:::tip 注意 -RCU 的容量可能会在未来发生变化。 -::: - -假设有一个读请求,消耗了 2.5ms 的 CPU 时间并扫描了 2KB 的数据,所有这些消耗加起来总共需要 5 个 RCU: - -- 2.5ms CPU 时间消耗的 3 个 RCU -- 扫描的 2KB 数据消耗的 2 个 RCU - -为了降低 RCU,可以仔细设计表结构和查询请求。以下是一些建议: - -- 使用索引以支持在 GreptimeDB 中高效地执行查询。如果没有索引,GreptimeDB 必须扫描整个表来处理查询。如果索引与查询匹配,GreptimeDB 可以使用索引来限制扫描的数据。请考虑使用具有高区分度的列作为主键,并在 `WHERE` 子句中使用它。 -- 选择使用匹配结果较少的查询。例如,时间索引字段和高区分度的标签字段上的相等匹配可以有效地限制扫描的数据大小。请注意,不等运算符 `!=` 无法做到有效查询,因为它总是会扫描所有数据。 - -## 存储容量 - -GreptimeCloud 将数据存储在云端对象存储中,例如 S3,并测量你在数据库中保存的总数据大小。 - -## 数据保留 - -根据定价计划,GreptimeCloud 可能会为你的数据启用默认保留策略,超过保留期限的数据会被删除。 - -## Tech Preview 计划 - -Tech Preview 计划为用户提供以下免费额度以尝试 GreptimeCloud: - -- 写容量单位(WCU):每个服务 800 WCU/s。 -- 存储容量:每个服务 10GB。 -- 帐户限制:每个团队 3 个服务。 -- 数据保留策略:默认保留最近三个月写入的数据。 - -:::tip 注意 -该计划可能会在未来发生变化。如果你对此有任何疑问,请联系 [feedback@greptime.cloud](mailto:feedback@greptime.cloud)。 -::: +请参考[用量及费用](./usage-&-billing/overview.md)页面获取最新信息。 diff --git a/docs/v0.7/zh/summary-i18n.yml b/docs/v0.7/zh/summary-i18n.yml index b209c1d3b..6f3b49e0f 100644 --- a/docs/v0.7/zh/summary-i18n.yml +++ b/docs/v0.7/zh/summary-i18n.yml @@ -19,6 +19,7 @@ GreptimeCloud: 云服务 Tutorials: 教程 Monitor-Host-Metrics: 监控 Host Metrics Integrations: 集成 +Usage-&-Billing: 用量及费用 Frontend: Frontend Datanode: Datanode Metasrv: Metasrv