设为首页 收藏本站
查看: 793|回复: 0

[经验分享] FastDFS配置参数说明

[复制链接]

尚未签到

发表于 2019-1-31 13:01:31 | 显示全部楼层 |阅读模式
  FastDFS版本为FastDFS_v5.03,其他版本类似。
  一、tracker.conf配置信息及参数说明
  # is this config file disabled
# false for enabled 生效
  # true for disabled
disabled=false
  # 这个配置文件是否不生效,false 为生效(否则不生效) true反之
  

  # bind an address of this host
# empty for bind all addresses of this host
bind_addr=
  # bind_addr= 后面为绑定的IP地址 (常用于服务器有多个IP但只希望一个IP提供服务)。如果不填则表示所有的(一般不填就OK)
  

  # the tracker server port
port=22122
  #tracker监听端口(默认为22122)
  

  # connect timeout in seconds
# default value is 30s
connect_timeout=30
  #连接超时时间,针对socket套接字函数connect

  

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

  # the base path to store data and log files
#base_path=/home/yuqing/fastdfs
base_path=/data/fastdfs
  # base_path 目录地址(根目录必须存在,子目录会自动创建)
# 附目录说明:
#  tracker server目录及文件结构:
# ${base_path}
#    |__data
#    |     |__storage_groups.dat:存储分组信息
#    |     |__storage_servers.dat:存储服务器列表
#    |__logs
#          |__trackerd.log:tracker server日志文件

#数据文件storage_groups.dat和storage_servers.dat中的记录之间以换行符(\n)分隔,字段之间以西文逗号(,)分隔。
  #storage_groups.dat中的字段依次为:
#  1. group_name:组名
#  2. storage_port:storage server端口号

#storage_servers.dat中记录storage server相关信息,字段依次为:
# 1. group_name:所属组名
# 2. ip_addr:ip地址
# 3. status:状态
# 4. sync_src_ip_addr:向该storage server同步已有数据文件的源服务器
# 5. sync_until_timestamp:同步已有数据文件的截至时间(UNIX时间戳)
# 6. stat.total_upload_count:上传文件次数
# 7. stat.success_upload_count:成功上传文件次数
# 8. stat.total_set_meta_count:更改meta data次数
# 9. stat.success_set_meta_count:成功更改meta data次数
# 10. stat.total_delete_count:删除文件次数
# 11. stat.success_delete_count:成功删除文件次数
# 12. stat.total_download_count:下载文件次数
# 13. stat.success_download_count:成功下载文件次数
# 14. stat.total_get_meta_count:获取meta data次数
# 15. stat.success_get_meta_count:成功获取meta data次数
# 16. stat.last_source_update:最近一次源头更新时间(更新操作来自客户端)
# 17. stat.last_sync_update:最近一次同步更新时间(更新操作来自其他storage server的同步)

  

  # max concurrent connections this server supported
max_connections=256
  

  # accept thread count
# default value is 1
# since V4.07
accept_threads=1
  # work thread count, should = this bytes
# default value is 0 (never call fsync)
fsync_after_written_bytes=0
  # sync log buff to disk every interval seconds
# must > 0, default value is 10 seconds
sync_log_buff_interval=10
  # sync binlog buff / cache to disk every interval seconds
# default value is 60 seconds
sync_binlog_buff_interval=10
  # sync storage stat info to disk every interval seconds
# default value is 300 seconds
sync_stat_file_interval=300
  # thread stack size, should >= 512KB
# default value is 512KB
thread_stack_size=512KB
  # the priority as a source server for uploading file.
# the lower this value, the higher its uploading priority.
# default value is 10
upload_priority=10
  # the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
# multi aliases split by comma. empty value means auto set by OS type
# default values is empty
if_alias_prefix=
  # if check file duplicate, when set to true, use FastDHT to store file indexes
# 1 or yes: need check
# 0 or no: do not check
# default value is 0
check_file_duplicate=0
  # file signature method for check file duplicate
## hash: four 32 bits hash code
## md5: MD5 signature
# default value is hash
# since V4.01
file_signature_method=hash
  # namespace for storing file indexes (key-value pairs)
# this item must be set when check_file_duplicate is true / on
key_namespace=FastDFS
  # set keep_alive to 1 to enable persistent connection with FastDHT servers
# default value is 0 (short connection)
keep_alive=0
  # you can use "#include filename" (not include double quotes) directive to
# load FastDHT server list, when the filename is a relative path such as
# pure filename, the base path is the base path of current/this config file.
# must set FastDHT server list when check_file_duplicate is true / on
# please see INSTALL of FastDHT for detail
##include /home/yuqing/fastdht/conf/fdht_servers.conf
  # if log to access log
# default value is false
# since V4.00
use_access_log = false
  # if rotate the access log every day
# default value is false
# since V4.00
rotate_access_log = false
  # rotate access log time base, time format: Hour:Minute
# Hour from 0 to 23, Minute from 0 to 59
# default value is 00:00
# since V4.00
access_log_rotate_time=00:00
  # if rotate the error log every day
# default value is false
# since V4.02
rotate_error_log = false
  # rotate error log time base, time format: Hour:Minute
# Hour from 0 to 23, Minute from 0 to 59
# default value is 00:00
# since V4.02
error_log_rotate_time=00:00
  # rotate access log when the log file exceeds this size
# 0 means never rotates log file by log file size
# default value is 0
# since V4.02
rotate_access_log_size = 0
  # rotate error log when the log file exceeds this size
# 0 means never rotates log file by log file size
# default value is 0
# since V4.02
rotate_error_log_size = 0
  # if skip the invalid record when sync file
# default value is false
# since V4.02
file_sync_skip_invalid_record=false
  # if use connection pool
# default value is false
# since V4.05
use_connection_pool = false
  # connections whose the idle time exceeds this time will be closed
# unit: second
# default value is 3600
# since V4.05
connection_pool_max_idle_time = 3600
  # use the ip address of this storage server if domain_name is empty,
# else this domain name will ocur in the url redirected by the tracker server
http.domain_name=
  # the port of the web server on this storage server
http.server_port=8888
  

  三、client.conf
  # connect timeout in seconds
# default value is 30s
connect_timeout=30
  # network timeout in seconds
# default value is 30s
network_timeout=60
  # the base path to store log files
#base_path=/home/yuqing/fastdfs
base_path=/data/fastdfs
  #base_path与tracker.conf中的一样
  

  # tracker_server can ocur more than once, and tracker_server format is
#  "host:port", host can be hostname or ip address
tracker_server=192.168.0.197:22122
  #配置tracker服务器信息(包括服务器IP或计算机名和监听端口号)
  

  #standard log level as syslog, case insensitive, value list:
### emerg for emergency
### alert
### crit for critical
### error
### warn for warning
### notice
### info
### debug
log_level=info
  # if use connection pool
# default value is false
# since V4.05
use_connection_pool = false
  # connections whose the idle time exceeds this time will be closed
# unit: second
# default value is 3600
# since V4.05
connection_pool_max_idle_time = 3600
  # if load FastDFS parameters from tracker server
# since V4.05
# default value is false
load_fdfs_parameters_from_tracker=false
  # if use storage ID instead of IP address
# same as tracker.conf
# valid only when load_fdfs_parameters_from_tracker is false
# default value is false
# since V4.05
use_storage_id = false
  # specify storage ids filename, can use relative or absolute path
# same as tracker.conf
# valid only when load_fdfs_parameters_from_tracker is false
# since V4.05
storage_ids_filename = storage_ids.conf
  
#HTTP settings
http.tracker_server_port=80
  #use "#include" directive to include HTTP other settiongs
##include http.conf





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-670075-1-1.html 上篇帖子: 05: 分布式文件系统 、 FastDFS原理 、 FastDFS配置及应用 下篇帖子: FastDFS配置参数详解
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表