This topic provides the billing examples for Log Service.

Pay-as-you-go billing method

Example 1

For example, you use a server that generates 10 MB of log data per day and you want to use Log Service to analyze the log data and run a Java program to subscribe to log processing events. In this example, one shard is used and the retention period is one day. In this case, you are not charged for using Log Service. In this example, the compression ratio is 5:1. The following table describes the billing details.

Billable item Description Monthly amount Monthly fee
Active shards If you create only one Logstore and use only one shard, the number of active shards in the current month is 31 shard days. 31 shard days Free of charge
Read and write traffic
  • The traffic that is generated by uploading logs to Log Service is 62 MB (10 MB/day × 20% × 31 days = 62 MB).
  • The traffic that is generated by using a Java program to subscribe to log processing events is 62 MB (10 MB/day × 20% × 31 days = 62 MB).
124 MB Free of charge
Storage space occupied by log data
  • The storage space that is occupied by log data is 62 MB (10 MB/day × 20% × 31 days = 62 MB).
  • The storage space that is occupied by indexes is 310 MB (10 MB/day × 31 days = 310 MB).
372 MB Free of charge
Index traffic of log data The full-text indexing feature is enabled and 10 MB of index traffic is generated per day. The index traffic for the current month is 310 MB. 310 MB Free of charge
Read and write operations The number of times that logs are uploaded to Log Service. Less than 1 million read and write operations Free of charge

Example 2

Website A receives 100 million requests per day. Log Service generates a log of 200 bytes for each request. The total size of logs that are generated per day is 18.6 GB. The owner of Website A uploads the logs to Log Service, and then analyzes the logs. The number of shards is two and the retention period is three days. In this example, the compression ratio is 5:1 and no free quota is provided.

You are charged USD 2.171985 per day. The following table describes the billing details.
Billable item Description Daily amount Unit price Daily fee
Read and write traffic The traffic that is generated by uploading logs to Log Service is 3.72 GB (18.6 GB × 20% = 3.72 GB). 3.72 GB

USD 0.045 per GB per day

USD 0.1674

Index traffic of log data The full-text indexing feature is enabled and 20 GB of index traffic is generated per day. The reserved fields generate 1.4 GB of index traffic. 20 GB

USD 0.0875 per GB per day

USD 1.75

Storage space occupied by log data
  • The storage space that is occupied by log data is 11.16 GB (18.6 GB/day × 20% × 3 days = 11.16 GB).
  • The storage space that is occupied by indexes is 60 GB (20 GB/day × 3 days = 60 GB).
71.16 GB

USD 0.002875 per GB per day

USD 0.204585

Read and write operations Logs are uploaded to Log Service approximately 1 million times. 1 million read and write operations

USD 0.03 per million operations per day

USD 0.03

Active shards Data is transmitted at a maximum throughput of 6 MB/s and two shards are created. 2

USD 0.01 per shard per day

USD 0.02

Example 3

Application B generates 10 GB of time series data per day. The application sends 200,000 requests to upload the data to Log Service. Two shards are created to store th data and the retention period is three days. In this example, the compression ratio is 5:1 and no free quota is provided.

You are charged USD 0.4169 per day. The following table describes the billing details.
Billable item Description Daily amount Unit price Daily fee
Read and write traffic The traffic that is generated by uploading time series data to Log Service is 2 GB (10 GB × 20% = 2 GB). 2 GB

USD 0.045 per GB per day

USD 0.09

Index traffic of time series data Log Service creates indexes for all fields. 10 GB

USD 0.02721 per GB per day

USD 0.2721

Storage space occupied by time series data
  • The storage space that is occupied by time series data is 30 GB (10 GB/day × 3 days = 30 GB).
  • The storage space that is occupied by indexes is 30 GB (10 GB/day × 3 days = 30 GB).
60 GB

USD 0.00048 per GB per day

USD 0.0288

Active shards Data is transmitted at a maximum throughput of 6 MB/s and two shards are created. 2

USD 0.01 per shard per day

USD 0.02

Read and write operations Times series data is uploaded to Log Service approximately 200,000 times. 200,000 read and write operations

USD 0.03 per million operations per day

USD 0.006

Example 4

An enterprise stores 40 billion logs in Log Service. Before the enterprise queries and analyzes the logs, the enterprise enables the Dedicated SQL feature. The following table describes the billing details of fees that are generated when the enterprise uses the Dedicated SQL feature to query and analyze logs.

Note In this example, only the billable item Dedicated SQL is included.
Billable item Description CPU time per operation Unit price Fee per operation
Dedicated SQL The CPU time that is consumed when you use the Dedicated SQL feature to perform a query and analysis operation is 3.6 seconds. For information about how to obtain the CPU time, see How do I obtain the CPU time? 3.6 seconds/3600 = 0.001 hour

USD 0.05174 per core hour

USD 0.00005174

Resource plans

If a customer uses two shards to read data from and write data to Log Service each day, the read and write traffic is 100 GB per day, the index traffic is 400 GB per day, and the storage space occupied by log data is 10,000 GB per day. The following tables describe the billing details.
Billable item Description
Read and write traffic 100 The fee of the read and write traffic is USD 4.5 (100 GB × USD 0.045/GB = USD 4.5).
Index traffic of log data 400 The fee of the index traffic is USD 35 (400 GB × USD 0.0875/GB = USD 35).
Storage space occupied by log data 10000 The fee of the occupied storage space is USD 28.75 (10,000 GB × USD 0.002875/GB/day = USD 28.75).
Active shards The fee of the active shards is USD 0.02 (2 shards × USD 0.01 = USD 0.02).
Note If you set the Shards parameter to 2 when you create a Logstore, two shards are used each day. If the calendar month is comprised of 30 days, the monthly usage is 60 shard days.
Note The actual prices of resource plans in the Log Service console prevail.
Billing method Pay-as-you-go One-year subscription resource plan Cost saving
Monthly fee Monthly fee = (USD 4.5 + USD 35 + USD 28.75 + USD 0.02) × 30 days = USD 2,048.1 For example, you purchase five one-year subscription resource plans: two plans that provide 1,000 CUs/month and three plans that provide 20 CUs/month. The monthly fee is calculated by using the following formula:

Monthly fee = 2 × USD 8,520/12 months + 3 × USD 180/12 months = USD 1,465

If you purchase one-year subscription resource plans, you can reduce costs by USD 583.1 per month (USD 2,048.1 - USD 1,465 = USD 583.1).
Yearly fee Yearly fee = (USD 4.5 + USD 35 + USD 28.75 + USD 0.02) × 30 days × 12 months = USD 24,577.2 For example, you purchase five one-year subscription resource plans: two plans that provide 1,000 CUs/month and three plans that provide 20 CUs/month. The monthly fee is calculated by using the following formula:

Yearly fee = 2 × USD 8,520 + 3 × USD 180 = USD 17,580

If you purchase one-year subscription resource plans, you can reduce costs by USD 6997.2 per year (USD 24,577.2 - USD 17,580 = USD 6,997.2).