fastdfs配置文件详解修订版1Word格式文档下载.docx

上传人:b****1 文档编号:832899 上传时间:2023-04-29 格式:DOCX 页数:18 大小:27.17KB
下载 相关 举报
fastdfs配置文件详解修订版1Word格式文档下载.docx_第1页
第1页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第2页
第2页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第3页
第3页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第4页
第4页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第5页
第5页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第6页
第6页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第7页
第7页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第8页
第8页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第9页
第9页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第10页
第10页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第11页
第11页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第12页
第12页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第13页
第13页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第14页
第14页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第15页
第15页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第16页
第16页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第17页
第17页 / 共18页
fastdfs配置文件详解修订版1Word格式文档下载.docx_第18页
第18页 / 共18页
亲,该文档总共18页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

fastdfs配置文件详解修订版1Word格式文档下载.docx

《fastdfs配置文件详解修订版1Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《fastdfs配置文件详解修订版1Word格式文档下载.docx(18页珍藏版)》请在冰点文库上搜索。

fastdfs配置文件详解修订版1Word格式文档下载.docx

trackerserver目录及文件结构:

${base_path}

|__data

||__storage_groups.dat:

存储分组信息

||__storage_servers.dat:

存储服务器列表

|__logs

|__trackerd.log:

trackerserver日志文件

数据文件storage_groups.dat和storage_servers.dat中的记录之间以换行符(\n)分隔,字段之间以西文逗号(,)分隔。

storage_groups.dat中的字段依次为:

1.group_name:

组名

2.storage_port:

storageserver端口号

storage_servers.dat中记录storageserver相关信息,字段依次为:

所属组名

2.ip_addr:

ip地址

3.status:

状态

4.sync_src_ip_addr:

向该storageserver同步已有数据文件的源服务器

5.sync_until_timestamp:

同步已有数据文件的截至时间(UNIX时间戳)

6.stat.total_upload_count:

上传文件次数

7.stat.success_upload_count:

成功上传文件次数

8.stat.total_set_meta_count:

更改metadata次数

9.stat.success_set_meta_count:

成功更改metadata次数

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:

获取metadata次数

15.stat.success_get_meta_count:

成功获取metadata次数

16.stat.last_source_update:

最近一次源头更新时间(更新操作来自客户端)

17.stat.last_sync_update:

最近一次同步更新时间(更新操作来自其他storageserver的同步)

#maxconcurrentconnectionsthisserversupported

#max_connectionsworkerthreadsstartwhenthisservicestartup

max_connections=256

#系统提供服务时的最大连接数。

对于V1.x,因一个连接由一个线程服务,也就是工作线程数。

#对于V2.x,最大连接数和工作线程数没有任何关系

#workthreadcount,should<

=max_connections

#defaultvalueis4

#sinceV2.00

#V2.0引入的这个参数,工作线程数,通常设置为CPU数

work_threads=4

#themethodofselectinggrouptouploadfiles

#0:

roundrobin

#1:

specifygroup

#2:

loadbalance,selectthemaxfreespacegrouptouploadfile

store_lookup=2

#上传组(卷)的方式0:

轮询方式1:

指定组2:

平衡负载(选择最大剩余空间的组(卷)上传)

#这里如果在应用层指定了上传到一个固定组,那么这个参数被绕过

#whichgrouptouploadfile

#whenstore_lookupsetto1,mustsetstore_grouptothegroupname

store_group=group2

#当上一个参数设定为1时(store_lookup=1,即指定组名时),必须设置本参数为系统中存在的一个组名。

如果选择其他的上传方式,这个参数就没有效了。

#whichstorageservertouploadfile

roundrobin(default)

thefirstserverorderbyipaddress

thefirstserverorderbypriority(theminimal)

store_server=0

#选择哪个storageserver进行上传操作(一个文件被上传后,这个storageserver就相当于这个文件的storageserver源,会对同组的storageserver推送这个文件达到同步效果)

轮询方式

根据ip地址进行排序选择第一个服务器(IP地址最小者)

根据优先级进行排序(上传优先级由storageserver来设置,参数名为upload_priority)

#whichpath(meansdiskormountpoint)ofthestorageservertouploadfile

loadbalance,selectthemaxfreespacepathtouploadfile

store_path=0

#选择storageserver中的哪个目录进行上传。

storageserver可以有多个存放文件的basepath(可以理解为多个磁盘)。

轮流方式,多个目录依次存放文件

选择剩余空间最大的目录存放文件(注意:

剩余磁盘空间是动态的,因此存储到的目录或磁盘可能也是变化的)

#whichstorageservertodownloadfile

thesourcestorageserverwhichthecurrentfileuploadedto

download_server=0

#选择哪个storageserver作为下载服务器

轮询方式,可以下载当前文件的任一storageserver

哪个为源storageserver就用哪一个(前面说过了这个storageserver源是怎样产生的)就是之前上传到哪个storageserver服务器就是哪个了

#reservedstoragespaceforsystemorotherapplications.

#ifthefree(available)spaceofanystoargeserverin

#agroup<

=reserved_storage_space,

#nofilecanbeuploadedtothisgroup.

#bytesunitcanbeoneoffollows:

###Gorgforgigabyte(GB)

###Mormformegabyte(MB)

###Korkforkilobyte(KB)

###nounitforbyte(B)

reserved_storage_space=4GB

#storageserver上保留的空间,保证系统或其他应用需求空间(指出如果同组的服务器的硬盘大小一样,以最小的为准,也就是只要同组中有一台服务器达到这个标准了,这个标准就生效,原因就是因为他们进行备份)

#standardloglevelassyslog,caseinsensitive,valuelist:

###emergforemergency

###alert

###critforcritical

###error

###warnforwarning

###notice

###info

###debug

log_level=info

#选择日志级别(日志写在哪?

看前面的说明了,有目录介绍哦呵呵)

#unixgroupnametorunthisprogram,

#notset(empty)meansrunbythegroupofcurrentuser

run_by_group=

#操作系统运行FastDFS的用户组(不填就是当前用户组,哪个启动进程就是哪个)

#unixusernametorunthisprogram,

#notset(empty)meansrunbycurrentuser

run_by_user=

#操作系统运行FastDFS的用户(不填就是当前用户,哪个启动进程就是哪个)

#allow_hostscanocurmorethanonce,hostcanbehostnameoripaddress,

#"

*"

meansmatchallipaddresses,canuserangelikethis:

10.0.1.[1-15,20]or

#host[01-08,20-25],forexample:

#allow_hosts=10.0.1.[1-15,20]

#allow_hosts=host[01-08,20-25]

allow_hosts=*

#可以连接到此trackerserver的ip范围(对所有类型的连接都有影响,包括客户端,storageserver)

#synclogbufftodiskeveryintervalseconds

#defaultvalueis10seconds

sync_log_buff_interval=10

#同步或刷新日志信息到硬盘的时间间隔,单位为秒

#注意:

trackerserver的日志不是时时写硬盘的,而是先写内存。

#checkstorageserveraliveinterval

check_active_interval=120

#检测storageserver存活的时间隔,单位为秒。

#storageserver定期向trackerserver发心跳,如果trackerserver在一个check_active_interval内还没有收到storageserver的一次心跳,那边将认为该storageserver已经下线。

所以本参数值必须大于storageserver配置的心跳时间间隔。

通常配置为storageserver心跳时间间隔的2倍或3倍。

#threadstacksize,should>

512KB

#defaultvalueis1MB

thread_stack_size=1MB

#线程栈的大小。

FastDFSserver端采用了线程方式。

更正一下,trackerserver线程栈不应小于64KB,不是512KB。

#线程栈越大,一个线程占用的系统资源就越多。

如果要启动更多的线程(V1.x对应的参数为max_connections,

V2.0为work_threads),可以适当降低本参数值。

#autoadjustwhentheipaddressofthestorageserverchanged

#defaultvalueistrue

storage_ip_changed_auto_adjust=true

#这个参数控制当storageserverIP地址改变时,集群是否自动调整。

注:

只有在storageserver进程重启时才完成自动调整。

#storagesyncfilemaxdelayseconds

#defaultvalueis86400seconds(oneday)

storage_sync_file_max_delay=86400

#V2.0引入的参数。

存储服务器之间同步文件的最大延迟时间,缺省为1天。

根据实际情况进行调整

#注:

本参数并不影响文件同步过程。

本参数仅在下载文件时,判断文件是否已经被同步完成的一个阀值(经验值)

#themaxtimeofstoragesyncafile

#defaultvalueis300seconds

storage_sync_file_max_time=300

存储服务器同步一个文件需要消耗的最大时间,缺省为300s,即5分钟。

本参数仅在下载文件时,作为判断当前文件是否被同步完成的一个阀值(经验值)

#ifuseatrunkfiletostoreseveralsmallfiles

#defaultvalueisfalse

#sinceV3.00

use_trunk_file=false

#V3.0引入的参数。

是否使用小文件合并存储特性,缺省是关闭的。

#theminslotsize,should<

=4KB

#defaultvalueis256bytes

slot_min_size=256

#trunkfile分配的最小字节数。

比如文件只有16个字节,系统也会分配slot_min_size个字节。

#themaxslotsize,should>

slot_min_size

#storetheuploadfiletotrunkfilewhenit'

ssize<

=thisvalue

#defaultvalueis16MB

slot_max_size=16MB

#只有文件大小<

=这个参数值的文件,才会合并存储。

如果一个文件的大小大于这个参数值,将直接保存到一个文件中(即不采用合并存储方式)。

#thetrunkfilesize,should>

=4MB

#defaultvalueis64MB

trunk_file_size=64MB

#合并存储的trunkfile大小,至少4MB,缺省值是64MB。

不建议设置得过大。

#ifcreatetrunkfileadvancely

trunk_create_file_advance=false

#是否提前创建trunkfile。

只有当这个参数为true,下面3个以trunk_create_file_打头的参数才有效。

#thetimebasetocreatetrunkfile

#thetimeformat:

HH:

MM

#defaultvalueis02:

00

trunk_create_file_time_base=02:

#提前创建trunkfile的起始时间点(基准时间),02:

00表示第一次创建的时间点是凌晨2点。

#theintervalofcreatetrunkfile,unit:

second

#defaultvalueis38400(oneday)

trunk_create_file_interval=86400

#创建trunkfile的时间间隔,单位为秒。

如果每天只提前创建一次,则设置为86400

#thethresholdtocreatetrunkfile

#whenthefreetrunkfilesizelessthanthethreshold,willcreate

#thetrunkfiles

#defaultvalueis0

trunk_create_file_space_threshold=20G

#提前创建trunkfile时,需要达到的空闲trunk大小

#比如本参数为20G,而当前空闲trunk为4GB,那么只需要创建16GB的trunkfile即可。

#以下是关于http的设置了默认编译是不生效的要求更改#WITH_HTTPD=1将注释#去掉再编译

#关于http的应用说实话不是很了解没有见到相关说明,望版主可以完善一下以下是字面解释了

#HTTPsettings

http.disabled=false#HTTP服务是否不生效

http.server_port=8080#HTTP服务端口

#use"

#include"

directivetoincludehttpothersettiongs

##includehttp.conf#如果加载http.conf的配置文件去掉第一个#

哈哈完成了一个下面是storage.conf

disabled=false

#同上文了就不多说了

#thenameofthegroupthisstorageserverbelongsto

group_name=group1

#指定此storageserver所在组(卷)

#同上文

#ifbindanaddressofthishostwhenconnecttootherservers

#(thisstorageserverasaclient)

#trueforbindingtheaddressconfigedbyaboveparameter:

"

bind_addr"

#falseforbindinganyaddressofthishost

client_bind=true

#bind_addr通常是针对server的。

当指定bind_addr时,本参数才有效。

#本storageserver作为client连接其他服务器(如trackerserver、其他storageserver),是否绑定bind_addr。

#thestorageserverport

port=23000

#storageserver服务端口

#storageserver网络超时时间,单位为秒。

#heartbeatintervalinseconds

heart_beat_interval=30

#心跳间隔时间,单位为秒(这里是指主动向trackerserver发送心跳)

#diskusagereportintervalinseconds

stat_report_interval=60

#storageserver向trackerserver报告磁盘剩余空间的时间间隔,单位为秒。

#base_path目录地址,根目录必须存在子目录会自动生成(注:

这里不是上传的文件存放的地址,之前是的,在某个版本后更改了)

#目录结构因为版主没有更新到论谈上这里就不发了大家可以看一下置顶贴:

#maxconcurrentconnectionsserversupported

=ma

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 总结汇报 > 学习总结

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2