fastdfs storage 配置详解


# is this config file disabled
# false for enabled
# true for disabled
disabled=false
#当前配置文件是否不可用false可用,true不可用

# the name of the group this storage server belongs to
group_name=group1
#当前storage服务器处于哪个组group1组名

# bind an address of this host
# empty for bind all addresses of this host
bind_addr=
#绑定哪个IP地址,一个服务器上会有多个网卡,多个地址,具体使用哪个

# if bind an address of this host when connect to other servers
# (this storage server as a client)
# true for binding the address configed by above parameter: "bind_addr"
# false for binding any address of this host
client_bind=true
#bind_addr绑定IP后此参数才有用
#本storage server作为client连接其他服务器(如tracker server、其他storage server),是否绑定bind_addr。

# the storage server port
port=23000
#storage server的端口

# connect timeout in seconds
# default value is 30s
connect_timeout=30
#连接超时时间,单位秒

# network timeout in seconds
# default value is 30s
network_timeout=60
#网络超时时间,单位秒
#发送或接收数据时,如果在超时时间后还不能发送或接收数据,则本次网络通信失败。

# heart beat interval in seconds
heart_beat_interval=30
#心跳包发送周期,单位秒

# disk usage report interval in seconds
stat_report_interval=60
#storage server向tracker server报告磁盘剩余空间的时间间隔,单位为秒。

# the base path to store data and log files
base_path=/home/fdfs
#文件及日志保存路径

# max concurrent connections the server supported
# default value is 256
# more max_connections means more memory will be used
max_connections=256
#最大连接数

# the buff size to recv / send data
# this parameter must more than 8KB
# default value is 64KB
# since V2.00
buff_size = 256KB
#缓冲区大小

# work thread count, should <= max_connections
# work thread deal network io
# default value is 4
# since V2.00
work_threads=4
#工作线程数

# if disk read / write separated
##  false for mixed read and write
##  true for separated read and write
# default value is true
# since V2.00
disk_rw_separated = true
#磁盘IO读写是否分离,缺省是分离的。

# disk reader thread count per store base path
# for mixed read / write, this parameter can be 0
# default value is 1
# since V2.00
disk_reader_threads = 1
#针对单个存储路径的读线程数,缺省值为1。
#读写分离时,系统中的读线程数 = disk_reader_threads * store_path_count
#读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) * store_path_count

# disk writer thread count per store base path
# for mixed read / write, this parameter can be 0
# default value is 1
# since V2.00
disk_writer_threads = 1
#针对单个存储路径的写线程数,缺省值为1。
#读写分离时,系统中的写线程数 = disk_writer_threads * store_path_count
#读写混合时,系统中的读写线程数 = (disk_reader_threads + disk_writer_threads) * store_path_count

# when no entry to sync, try read binlog again after X milliseconds
# must > 0, default value is 200ms
sync_wait_msec=50
#同步文件时,如果从binlog中没有读到要同步的文件,休眠N毫秒后重新读取。0表示不休眠,立即再次尝试读取。
#出于CPU消耗考虑,不建议设置为0。如何希望同步尽可能快一些,可以将本参数设置得小一些,比如设置为10ms

# after sync a file, usleep milliseconds
# 0 for sync successively (never call usleep)
sync_interval=0
#同步上一个文件后,再同步下一个文件的时间间隔,单位为毫秒,0表示不休眠,直接同步下一个文件。

# storage sync start time of a day, time format: Hour:Minute
# Hour from 0 to 23, Minute from 0 to 59
sync_start_time=00:00
#同步开始时间

# storage sync end time of a day, time format: Hour:Minute
# Hour from 0 to 23, Minute from 0 to 59
sync_end_time=23:59
#同步结束时间

# write to the mark file after sync N files
# default value is 500
write_mark_file_freq=500
#同步完N个文件后,把storage的mark文件同步到磁盘

# path(disk or mount point) count, default value is 1
store_path_count=1
#存放文件时storage server支持多个路径(例如磁盘)。这里配置存放文件的基路径数目,通常只配一个目录。

# store_path#, based 0, if store_path0 not exists, it's value is base_path
# the paths must be exist
store_path0=/home/fdfs
#store_path1=/home/yuqing/fastdfs2
#逐一配置store_path个路径,索引号基于0。注意配置方法后面有0,1,2 ......,需要配置0到store_path - 1。
#如果不配置base_path0,那边它就和base_path对应的路径一样。

# subdir_count  * subdir_count directories will be auto created under each
# store_path (disk), value can be 1 to 256, default value is 256
subdir_count_per_path=256
#FastDFS存储文件时,采用了两级目录。这里配置存放文件的目录个数 (系统的存储机制,大家看看文件存储的目录就知道了)
#如果本参数只为N(如:256),那么storage server在初次运行时,会自动创建 N * N 个存放文件的子目录。

猜你喜欢

转载自javakill.iteye.com/blog/2075323