Skip to content

Commit b1d7682

Browse files
committed
[feat][cache]: Asynchronous and zero-copy optimization.
1 parent 3e3fc2e commit b1d7682

File tree

243 files changed

+10296
-6909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+10296
-6909
lines changed

conf/client.conf

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,32 +208,49 @@ data_stream.page.use_pool=true
208208
# disk_cache.ioring_iodepth:
209209
# iodepth for io ring (works for both linux io uring and 3fs usrbio)
210210
block_cache.cache_store=disk
211-
block_cache.stage=true
212-
block_cache.stage_bandwidth_throttle_enable=false
213-
block_cache.stage_bandwidth_throttle_mb=10240
214-
block_cache.logging=true
215-
block_cache.upload_stage_workers=10
216-
block_cache.upload_stage_queue_size=10000
217-
block_cache.prefetch_workers=128
218-
block_cache.prefetch_queue_size=10000
211+
block_cache.enable_stage=true
212+
block_cache.enable_cache=true
213+
block_cache.access_logging=true
214+
block_cache.upload_stage_throttle_enable=false
215+
block_cache.upload_stage_throttle_bandwidth_mb=256
216+
block_cache.upload_stage_throttle_iops=100
217+
block_cache.prefetch_max_inflights=100
219218

220219
disk_cache.cache_dir=/var/run/dingofs # __DINGOADM_TEMPLATE__ /dingofs/client/data/cache __DINGOADM_TEMPLATE__
221220
disk_cache.cache_size_mb=102400
222221
disk_cache.free_space_ratio=0.1
223222
disk_cache.cache_expire_second=259200
224223
disk_cache.cleanup_expire_interval_millsecond=1000
225-
disk_cache.drop_page_cache=true
226224
disk_cache.ioring_iodepth=128
227225
disk_cache.ioring_blksize=1048576
228226
disk_cache.ioring_prefetch=true
227+
disk_cache.drop_page_cache=true
229228

230229
disk_state.tick_duration_second=60
231-
disk_state.normal2unstable_io_error_num=3
232-
disk_state.unstable2normal_io_succ_num=10
230+
disk_state.normal2unstable_error_num=3
231+
disk_state.unstable2normal_succ_num=10
233232
disk_state.unstable2down_second=1800
234233
disk_state.disk_check_duration_millsecond=3000
235234
# }
236235

236+
#### remote cache
237+
# {
238+
remote_cache.cache_group=
239+
remote_cache.load_members_interval_ms=1000
240+
remote_cache.mds_rpc_addrs=127.0.0.1:6700,127.0.0.1:6701,127.0.0.1:6702
241+
remote_cache.mds_rpc_retry_total_ms=16000
242+
remote_cache.mds_rpc_max_timeout_ms=2000
243+
remote_cache.mds_rpc_timeout_ms=500
244+
remote_cache.mds_rpc_retry_interval_us=50000
245+
remote_cache.mds_rpc_max_failed_times_before_change_addr=2
246+
remote_cache.mds_rpc_normal_retry_times_before_trigger_wait=3
247+
remote_cache.mds_rpc_wait_sleep_ms=1000
248+
remote_cache.remote_put_rpc_timeout_ms=3000
249+
remote_cache.remote_range_rpc_timeout_ms=3000
250+
remote_cache.remote_cache_rpc_timeout_ms=3000
251+
remote_cache.remote_prefetch_rpc_timeout_ms=3000
252+
# }
253+
237254
#### s3
238255
# this is for test. if s3.fakeS3=true, all data will be discarded
239256
s3.fakeS3=false
@@ -280,7 +297,7 @@ s3.enableTelemetry=false
280297

281298
s3.use_crt_client=false
282299
# this only work when use_crt_client is false
283-
s3.use_thread_pool=true
300+
s3.use_thread_pool=true
284301
# this only work when use_crt_client is false and use_thread_pool is true
285302
s3.async_thread_num_in_thread_pool=256
286303

confv2/cache-bench.conf

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
############################# global
2+
--logdir="/tmp/dingofs-cache-bench"
3+
--loglevel=0
4+
5+
############################# benchmark
6+
--opt=put
7+
--threads=1
8+
--op_blksize=4194304
9+
--op_blocks=1
10+
--put_writeback=true
11+
--range_retrive=false
12+
--fsid=1
13+
--ino=0
14+
--s3_ak=
15+
--s3_sk=
16+
--s3_endpoint=
17+
--s3_bucket=
18+
--stat_interval_s=3
19+
20+
############################# block cache
21+
--cache_store=disk
22+
--enable_stage=true
23+
--enable_cache=true
24+
--cache_access_logging=true
25+
--upload_stage_throttle_enable=false
26+
--upload_stage_throttle_bandwidth_mb=256
27+
--upload_stage_throttle_iops=100
28+
--prefetch_max_inflights=100
29+
30+
############################# disk cache
31+
--cache_dir=/tmp/dingofs-cache
32+
--cache_size_mb=10240
33+
--free_space_ratio=0.1
34+
--cache_expire_s=259200
35+
--cleanup_expire_interval_ms=1000
36+
--ioring_blksize=1048576
37+
--ioring_iodepth=128
38+
--ioring_prefetch=true
39+
--drop_page_cache=true
40+
41+
############################# disk state
42+
--state_tick_duration_s=60
43+
--state_normal2unstable_error_num=3
44+
--state_unstable2normal_succ_num=10
45+
--state_unstable2down_s=1800
46+
--check_disk_state_duration_ms=3000
47+
48+
############################# remote cache
49+
--group_name=
50+
--load_members_interval_ms=1000
51+
--mds_rpc_addrs=127.0.0.1:6700,127.0.0.1:6701,127.0.0.1:6702
52+
--mds_rpc_retry_total_ms=16000
53+
--mds_rpc_max_timeout_ms=2000
54+
--mds_rpc_timeout_ms=500
55+
--mds_rpc_retry_interval_us=50000
56+
--mds_rpc_max_failed_times_before_change_addr=2
57+
--mds_rpc_normal_retry_times_before_trigger_wait=3
58+
--mds_rpc_wait_sleep_ms=1000
59+
--remote_put_rpc_timeout_ms=3000
60+
--remote_range_rpc_timeout_ms=3000
61+
--remote_cache_rpc_timeout_ms=3000
62+
--remote_prefetch_rpc_timeout_ms=3000

confv2/dingo-cache.conf

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
############################# global
2+
--logdir=/tmp/dingofs-logs
3+
--loglevel=0
4+
5+
############################# cache group node
6+
--group_nane=default
7+
--listen_ip=127.0.0.1
8+
--listen_port=20000
9+
--group_weight=100
10+
--max_range_size_kb=256
11+
--metadata_filepath="/tmp/cache_group_metadata"
12+
--send_heartbeat_interval_ms=1000
13+
--mds_rpc_addrs=127.0.0.1:6700,127.0.0.1:6701,127.0.0.1:6702
14+
--mds_rpc_retry_total_ms=16000
15+
--mds_rpc_max_timeout_ms=2000
16+
--mds_rpc_timeout_ms=500
17+
--mds_rpc_retry_interval_us=50000
18+
--mds_rpc_max_failed_times_before_change_addr=2
19+
--mds_rpc_normal_retry_times_before_trigger_wait=3
20+
--mds_rpc_wait_sleep_ms=1000
21+
22+
############################# block cache
23+
--cache_store=disk
24+
--enable_stage=true
25+
--enable_cache=true
26+
--cache_access_logging=true
27+
--upload_stage_throttle_enable=false
28+
--upload_stage_throttle_bandwidth_mb=256
29+
--upload_stage_throttle_iops=100
30+
--prefetch_max_inflights=100
31+
--upload_stage_max_inflights=128
32+
33+
############################# disk cache
34+
--cache_dir=/tmp/dingofs-cache
35+
--cache_size_mb=10240
36+
--free_space_ratio=0.1
37+
--cache_expire_s=259200
38+
--cleanup_expire_interval_ms=1000
39+
--ioring_blksize=1048576
40+
--ioring_iodepth=128
41+
--ioring_prefetch=true
42+
--drop_page_cache=true
43+
44+
############################# disk state
45+
--state_tick_duration_s=60
46+
--state_normal2unstable_error_num=3
47+
--state_unstable2normal_succ_num=10
48+
--state_unstable2down_s=1800
49+
--check_disk_state_duration_ms=3000

confv2/dingo-cache.gflags

Lines changed: 0 additions & 12 deletions
This file was deleted.

confv2/dingo-cache.template.toml

Lines changed: 0 additions & 63 deletions
This file was deleted.

confv2/dingo-fuse.conf

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
############################# global
2+
--access_logging=true
3+
--bthread_worker_num=0
4+
5+
############################# fuse
6+
--fuse_conn_info_want_splice_move=false
7+
--fuse_conn_info_want_splice_read=false
8+
--fuse_conn_info_want_splice_write=false
9+
--fuse_conn_info_want_auto_inval_data=true
10+
--fuse_file_info_direct_io=false
11+
--fuse_file_info_keep_cache=true
12+
13+
############################# vfs
14+
vfs_writeback_suffix=
15+
vfs_max_name_length=255
16+
vfs_disable_xattr=true
17+
18+
vfs_kernel_cache_attr_timeout_s=30
19+
vfs_kernel_cache_dir_attr_timeout_s=30
20+
vfs_kernel_cache_entry_timeout_s=30
21+
vfs_kernel_cache_dir_entry_timeout_s=30
22+
vfs_lookup_cache_negative_timeout_s=0
23+
vfs_lookup_cache_min_uses=1
24+
vfs_lookup_cache_lru_size=100000
25+
vfs_dir_cache_lru_size=5000000
26+
vfs_attr_watcher_lru_size=5000000
27+
28+
vfs_throttle_avg_write_bytes=0
29+
vfs_throttle_burst_write_bytes=0
30+
vfs_throttle_burst_write_bytes_s=180
31+
vfs_throttle_avg_write_iops=0
32+
vfs_throttle_burst_write_iops=0
33+
vfs_throttle_burst_write_iops_s=180
34+
vfs_throttle_avg_read_bytes=0
35+
vfs_throttle_burst_read_bytes=0
36+
vfs_throttle_burst_read_bytes_s=180
37+
vfs_throttle_avg_read_iops=0
38+
vfs_throttle_burst_read_iops=0
39+
vfs_throttle_burst_read_iops_s=180
40+
41+
############################# meta
42+
--meta_v2_mds_rpc_timeout_ms=2000
43+
--meta_v2_mds_rpc_retry_times=3
44+
--meta_v2_client_send_request_retry_times=3
45+
46+
############################# data
47+
--data_background_flush_interval_ms=1000
48+
--data_background_flush_trigger_force_memory_ratio=0.90
49+
--data_flush_file_max_size_mb=1024
50+
51+
############################# block cache
52+
--cache_store=disk
53+
--enable_stage=true
54+
--enable_cache=true
55+
--cache_access_logging=true
56+
--upload_stage_throttle_enable=false
57+
--upload_stage_throttle_bandwidth_mb=256
58+
--upload_stage_throttle_iops=100
59+
--prefetch_max_inflights=100
60+
--upload_stage_max_inflights=128
61+
62+
############################# disk cache
63+
--cache_dir=/tmp/dingofs-cache
64+
--cache_size_mb=10240
65+
--free_space_ratio=0.1
66+
--cache_expire_s=259200
67+
--cleanup_expire_interval_ms=1000
68+
--ioring_blksize=1048576
69+
--ioring_iodepth=128
70+
--ioring_prefetch=true
71+
--drop_page_cache=true
72+
73+
############################# disk state
74+
--state_tick_duration_s=60
75+
--state_normal2unstable_error_num=3
76+
--state_unstable2normal_succ_num=10
77+
--state_unstable2down_s=1800
78+
--check_disk_state_duration_ms=3000
79+
80+
############################# remote cache
81+
--group_name=
82+
--load_members_interval_ms=1000
83+
--mds_rpc_addrs=127.0.0.1:6700,127.0.0.1:6701,127.0.0.1:6702
84+
--mds_rpc_retry_total_ms=16000
85+
--mds_rpc_max_timeout_ms=2000
86+
--mds_rpc_timeout_ms=500
87+
--mds_rpc_retry_interval_us=50000
88+
--mds_rpc_max_failed_times_before_change_addr=2
89+
--mds_rpc_normal_retry_times_before_trigger_wait=3
90+
--mds_rpc_wait_sleep_ms=1000
91+
--remote_put_rpc_timeout_ms=3000
92+
--remote_range_rpc_timeout_ms=3000
93+
--remote_cache_rpc_timeout_ms=3000
94+
--remote_prefetch_rpc_timeout_ms=3000
95+
96+
############################# block accesser
97+
--s3_telemetry_enable=false
98+
99+
--s3_request_region=us-east-1
100+
--s3_request_use_virtual_addressing=false
101+
--s3_request_verify_ssl=false
102+
--s3_request_max_connections=32
103+
--s3_request_connect_timeout_ms=60000
104+
--s3_request_request_timeout_ms=10000
105+
--s3_request_use_crt_client=false
106+
--s3_request_use_thread_pool=true
107+
--s3_request_async_thread_num=4
108+
--s3_request_max_async_request_inflight_bytes=0
109+
110+
--s3_throttle_iops_total_limit=0
111+
--s3_throttle_iops_read_limit=0
112+
--s3_throttle_iops_write_limit=0
113+
--s3_throttle_bps_total_mb=0
114+
--s3_throttle_bps_read_mb=0
115+
--s3_throttle_bps_write_mb=0

confv2/dingo-fuse.gflags

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)