woxio770 发表于 2018-11-11 08:08:32

测试nginx的FastDFS分布式存储模块

  
disabled=false
  
#配置是否生效
  
group_name=group1
  
#storage所在组(卷)
  
bind_addr=192.168.6.100
  
# 绑定IP,另一太 storage IP为 192.168.6.101
  
client_bind=true
  
#bind_addr通常是针对server的。当指定bind_addr时,本参数才有效。
  
port=23000
  
# 是storage 服务端口
  
connect_timeout=30
  
# 连接超时时间,针对socket套接字函数connect
  
network_timeout=60
  
# storage server 网络超时时间,单位为秒。
  
heart_beat_interval=30
  
# 心跳间隔时间,单位为秒
  
stat_report_interval=60
  
# storage server向tracker server报告磁盘剩余空间的时间间隔,单位为秒。
  
base_path=/home/eric
  
# base_path 目录地址,根目录必须存在子目录会自动生成
  
# 会产生data(数据存储地方)、 logs日志文件
  
max_connections=256
  
# 最大连接数
  
buff_size = 256KB
  
# 设置队列结点的buffer大小。
  
work_threads=4
  
# 工作线程数
  
disk_rw_separated = true
  
# 磁盘IO读写是否分离,缺省是分离的。
  
disk_reader_threads = 1
  
# 针对单个存储路径的读线程数,缺省值为1
  
disk_writer_threads = 1
  
# 针对单个存储路径的写线程数,缺省值为1
  
sync_wait_msec=200
  
# 同步文件时,如果从binlog中没有读到要同步的文件,休眠N毫秒后重新读取,0表示不休眠,立即再次尝试读取。
  
sync_interval=0
  
#同步上一个文件后,再同步下一个文件的时间间隔,单位为毫秒,0表示不休眠,直接同步下一个文件。
  
sync_start_time=00:00
  
sync_end_time=23:59
  
# 允许系统同步的时间段 (默认是全天) 。一般用于避免高峰同步产生一些问题而设定,相信sa都会明白。
  
write_mark_file_freq=500
  
# 把storage的mark文件定期同步到磁盘的时间间隔,单位为秒
  
store_path_count=1
  
# 存放文件时storage server支持多个路径(例如磁盘)。这里配置存放文件的基路径数目,通常只配一个目录。
  
store_path0=/home/eric
  
#逐一配置store_path个路径,索引号基于0。注意配置方法后面有0,1,2 ......,需要配置0到store_path - 1。
  
# 如果不配置base_path0,那边它就和base_path对应的路径一样。
  
subdir_count_per_path=32
  
# FastDFS存储文件时,采用了两级目录。这里配置存放文件的目录个数
  
tracker_server=192.168.6.188:22122
  
# tracker_server 的列表 要写端口的哦
  
log_level=info
  
# 日志级别
  
run_by_group=
  
# 运行storage 用户组
  
run_by_user=
  
# 运行storage 用户
  
allow_hosts=*
  
# 允许连接IP列表
  
file_distribute_path_mode=0
  
# 文件在data目录下分散存储策略。
  
# 0: 轮流存放
  
# 1: 随机存储
  
file_distribute_rotate_count=100
  
# 当上面的参数file_distribute_path_mode配置为0(轮流存放方式)时,本参数有效。
  
#当一个目录下的文件存放的文件数达到本参数值时,后续上传的文件存储到下一个目录中
  
fsync_after_written_bytes=0
  
# 当写入大文件时,每写入N个字节,调用一次系统函数fsync将内容强行同步到硬盘。0表示从不调用fsync
  
sync_log_buff_interval=10
  
# 同步或刷新日志信息到硬盘的时间间隔,单位为秒
  
sync_binlog_buff_interval=60
  
# 同步binglog(更新操作日志)到硬盘的时间间隔,单位为秒
  
sync_stat_file_interval=300
  
# 把storage的stat文件同步到磁盘的时间间隔,单位为秒。
  
thread_stack_size=512KB
  
# 线程栈的大小。FastDFS server端采用了线程方式。
  
# 线程栈越大,一个线程占用的系统资源就越多。
  
upload_priority=10
  
本storage server作为源服务器,上传文件的优先级,可以为负数。值越小,优先级越高。这里就和 tracker.conf 中store_server= 2时的配置相对应了
  
if_alias_prefix=
  
check_file_duplicate=0
  
# 是否检测上传文件已经存在。如果已经存在,则不存在文件内容,建立一个符号链接以节省磁盘空间。 结合 fastdfh使用的。 1是检测,0是不检测,我们不使用fastdfh 当然 0 
  
key_namespace=FastDFS
  
# 当上个参数设定为1 或 yes时 (true/on也是可以的) , 在FastDHT中的命名空间
  
keep_alive=0
  
# 与FastDHT servers 的连接方式 (是否为持久连接)
  

  
# 下面是http的配置了就不多说了
  
http.disabled=true
  
http.domain_name=
  
http.server_port=80
  
http.trunk_size=256KB
  
http.need_find_content_type=true


页: [1]
查看完整版本: 测试nginx的FastDFS分布式存储模块