-
Notifications
You must be signed in to change notification settings - Fork 3
/
storage.xml
83 lines (83 loc) · 3.47 KB
/
storage.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<clickhouse>
<storage_configuration>
<disks>
<!-- Disk with single endpoint for all replicas. -->
<s3_disk>
<type>s3</type>
<endpoint from_env="AWS_S3_DISK_URL"/>
<metadata_path>/var/lib/clickhouse/disks/s3_disk/</metadata_path>
<use_environment_credentials>1</use_environment_credentials>
</s3_disk>
<!-- Disk with separate endpoint for each replica. -->
<s3_disk_with_replica>
<type>s3</type>
<endpoint from_env="AWS_S3_DISK_WITH_REPLICA_URL"/>
<metadata_path>/var/lib/clickhouse/disks/s3_disk_with_replica/</metadata_path>
<use_environment_credentials>1</use_environment_credentials>
</s3_disk_with_replica>
<!-- Disk with single endpoint for each shard. -->
<s3_zero_copy>
<type>s3</type>
<endpoint from_env="AWS_S3_ZERO_COPY_URL"/>
<metadata_path>/var/lib/clickhouse/disks/s3_zero_copy/</metadata_path>
<use_environment_credentials>1</use_environment_credentials>
</s3_zero_copy>
<!-- Local disk cache -->
<s3_disk_cache>
<type>cache</type>
<disk>s3_disk_with_replica</disk>
<path>/var/lib/clickhouse/s3_disk_cache/cache/</path>
<max_size>100Gi</max_size>
<cache_on_write_operations>1</cache_on_write_operations>
</s3_disk_cache>
</disks>
<policies>
<!-- S3-backed MergeTree with single endpoint, no disk cache -->
<s3_disk_policy>
<volumes>
<main>
<disk>s3_disk</disk>
</main>
</volumes>
</s3_disk_policy>
<!-- S3-backed MergeTree with an endpoint for each replica, no disk cache -->
<s3_disk_with_replica_policy>
<volumes>
<main>
<disk>s3_disk_with_replica</disk>
</main>
</volumes>
</s3_disk_with_replica_policy>
<!-- S3-backed MergeTree with disk cache -->
<s3_disk_cached_policy>
<volumes>
<main>
<disk>s3_disk_cache</disk>
</main>
</volumes>
</s3_disk_cached_policy>
<!-- Block storage tiered with S3-backed MergeTree -->
<s3_tiered_policy>
<volumes>
<default>
<disk>default</disk>
<move_factor>0.1</move_factor>
</default>
<s3_disk_cached>
<disk>s3_disk_cache</disk>
<prefer_not_to_merge>true</prefer_not_to_merge>
<perform_ttl_move_on_insert>false</perform_ttl_move_on_insert>
</s3_disk_cached>
</volumes>
</s3_tiered_policy>
<!-- S3-backed MergeTree with zero-copy replication -->
<s3_zero_copy_policy>
<volumes>
<main>
<disk>s3_zero_copy</disk>
</main>
</volumes>
</s3_zero_copy_policy>
</policies>
</storage_configuration>
</clickhouse>