滴水逆向联盟

标题: FastDFS的配置、部署与API使用解读(6)FastDFS配置详解之Storage配置 [打印本页]

作者: 大灰狼    时间: 2014-7-10 08:56
标题: FastDFS的配置、部署与API使用解读(6)FastDFS配置详解之Storage配置

《Poechant的FastDFS的配置、部署与API使用教程》

FastDFS的配置、部署与API使用解读——(1)入门使用教程

FastDFS的配置、部署与API使用解读——(2)Java API:根据InputStream、文件名、文件长度上传文件

FastDFS的配置、部署与API使用解读——(3)Java API:根据InputStream、文件名、文件长度,采用IO流直接转换的方式上传文件

FastDFS的配置、部署与API使用解读——(4)设置FastDFS配置参数的两种方式

FastDFS的配置、部署与API使用解读——(5)FastDFS配置详解之Tracker配置

FastDFS的配置、部署与API使用解读——(6)FastDFS配置详解之Storage配置

FastDFS的配置、部署与API使用解读——(7)关于FastDFS的Nginx的一些Q&A汇总

FastDFS的配置、部署与API使用解读——(8)FastDFS配置详解之Clinet配置及其两种初始化方式


FastDFS的配置、部署与API使用解读(6)FastDFS配置详解之Storage配置1 基本配置disabled#func:该配置文件是否生效#valu:## true:无效## false:生效disabled=falsegroup_name#func;本storage server所属组名group_name=group1bind_addr#func:绑定本storage server的IPbind_addr=client_bind#func:bind_addr是针对server的,当指定bind_addr时,本参数才有效。#valu:## true:绑定bind_addr所指定的IP## false:绑定本机的任意IPclient_bind=trueport#func:storage server端口port=23000connect_timeout#func:连接超时connect_timeout=30network_timeout#func:网络超时network_timeout=60heart_beat_interval#func:本storage向tracker发送心跳时间间隔heart_beat_interval=30stat_report_interval#func:硬盘存储空间使用情况检测时间间隔stat_report_interval=60base_path#func:base_pathbase_path=/home/michael/fdfs/base4storagemax_connections#func:本storage server支持的最大并发连接数max_connections=256buff_size#func:buff size to recv/send databuff_size=256KBwork_thread#func:work thread count, should <= max_connections#valu:默认为4#sinc:v2.0work_thread=4store_path_count / store_path#func:storage path的个数#valu:默认为1store_path_count=1#func:根据store_path_count的值,如果是N个,就要有store_path0, store_path1 ... store_path(N-1)#valu:store_path0=/home/michael/fdfs/storage0subdir_count_per_path#func:FastDFS存储文件时,默认采用了两级目录。这里配置存放文件的目录个数subdir_count_per_path=32tracker_server#func:tracker_server 的列表 要写端口号tracker_server=192.168.6.188:22122tracker_server=192.168.6.189:22122tracker_server=192.168.6.190:22122log_level#func:log_level=inforun_by_group#func:run_by_grouprun_by_user#funcrun_by_userallow_hosts#func:允许连接的客户端IP列表allow_hosts=*file_distribute_path_mode#func:文件分布到data path的方式#valu:## 0:轮询## 1:随机,根据哈希codefile_distribute_path_mode=0file_distribute_rotate_count#func:当file_distribute_path_mode设置为0(轮询)时,该值才有效。功能是,当写文件计数打到该值时,转至下一个path。file_distribute_rotate_count=100thread_stack_size#func:线程栈大小#valu:要求至少512KBthread_stack_size=512KBupload_priority#func:上传优先级。只有tracker.conf中store_server=2时,才有效。#valu:值约小,优先级越高。默认为10.upload_priority=10if_alias_prefix#func:#valu:if_alias_prefix=check_file_duplicate#func:是否检查file重复。但为1时,使用FastDHT存储文件索引#valu:默认为0## 1, yes, true or on:check## 0, no, false or off:不checkcheck_file_duplicate=0key_namespace#func:当上个参数设定为1或yes时(true/on也是可以的),在FastDHT中的命名空间key_namespace=FastDFSkeep_alive#func:与FastDHT的连接方式#valu:默认为0,短连接## 0:短连接(short connection)## 1:长连接(persistent connection)keep_alive=02 IOdisk_rw_separated#func:是否I/O分离#valu:默认为true## true:分离## false:不分离disk_rw_separated=truedisk_rw_direct#func:是否直接写,不使用cache#value:## true:直接写## false:不直接写disk_rw_direct=falsedisk_reader_threads#func:每个storage base path的读线程数。对于disk_rw_separated=true的方式该值为0.#valu:默认为1disk_reader_threads=1disk_writer_threads#func:每个storage base path的写线程数。对于disk_rw_separated=true的方式该值为0.#valu:默认为1disk_writer_threads=13 同步#func:同步文件时,如果从binlog中没有读到要同步的文件,休眠N毫秒后重新读取。#valu:单位为毫秒。0表示不休眠,立即再次尝试读取。sync_wait_msec=50sync_interval#func:同步一个文件后,在下次进行同步前的休息时间#valu:单位为毫秒sync_interval=0sync_start_time#func:每天存储同步的开始时间。#valu:HH:mmsync_start_time=00:00sync_end_time#func:每天存储同步的结束时间。#valu:HH:mmsync_end_time=23:59write_mark_file_freq#func:把storage的mark文件定期同步到磁盘的时间间隔#valu:单位为秒write_mark_file_freq=500fsync_after_written_bytes#func:当写大文件时,每写入N个字节,调用一次系统函数fsync将内容强行同步到硬盘。#valu:0表示从不调用fsyncfsync_after_written_bytes=0sync_log_buff_interval#func:同步或刷新日志信息到硬盘的时间间隔#valu:单位为秒sync_log_buff_interval=10sync_binlog_buff_interval#func:同步binlog(更新操作日志)到硬盘的时间间隔#valu:单位为秒sync_binlog_buff_interval=60sync_stat_file_interval#func:把storage的stat文件同步到磁盘的时间间隔#valu:单位为秒sync_stat_file_interval=3004 HTTP 相关是否启用 HTTP#func:是否开启HTTPhttp.disableddomain#func:如果将该项留空,则使用IP,否则可以通过tracker来redirect。http.domain_name=server port#func:HTTP端口号http.server_porttrunk size#func:trunk file sizehttp.trunk_size=256KB否需要从文件扩展名确定文件内容#func:是否需要从文件扩展名确定文件内容http.need_find_content_type=true

-

转载请注明来自柳大的CSDN博客:Blog.CSDN.net/Poechant







欢迎光临 滴水逆向联盟 (http://dtdebug.com/) Powered by Discuz! X3.2