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配置
- 作者:柳大·Poechant(鍾超)
- 郵箱:zhongchao.ustc#gmail.com(# -> @)
- 部落格:Blog.CSDN.net/Poechant
- 日期:Nov 21th, 2011
1 基本配置
disabled
#func:該配置檔案是否生效
#valu:
## true:無效
## false:生效
disabled=false
group_name
#func;本storage server所屬組名
group_name=group1
bind_addr
#func:繫結本storage server的IP
bind_addr=
client_bind
#func:bind_addr是針對server的,當指定bind_addr時,本引數才有效。
#valu:
## true:繫結bind_addr所指定的IP
## false:繫結本機的任意IP
client_bind=true
port
#func:storage server埠
port=23000
connect_timeout
#func:連線超時
connect_timeout=30
network_timeout
#func:網路超時
network_timeout=60
heart_beat_interval
#func:本storage向tracker傳送心跳時間間隔
heart_beat_interval=30
stat_report_interval
#func:硬碟儲存空間使用情況檢測時間間隔
stat_report_interval=60
base_path
#func:base_path
base_path=/home/michael/fdfs/base4storage
max_connections
#func:本storage server支援的最大併發連線數
max_connections=256
buff_size
#func:buff size to recv/send data
buff_size=256KB
work_thread
#func:work thread count, should <= max_connections
#valu:預設為4
#sinc:v2.0
work_thread=4
store_path_count / store_path
#func:storage path的個數
#valu:預設為1
store_path_count=1
#func:根據store_path_count的值,如果是N個,就要有store_path0, store_path1 ... store_path(N-1)
#valu:
store_path0=/home/michael/fdfs/storage0
subdir_count_per_path
#func:FastDFS儲存檔案時,預設採用了兩級目錄。這裡配置存放檔案的目錄個數
subdir_count_per_path=32
tracker_server
#func:tracker_server 的列表 要寫埠號
tracker_server=192.168.6.188:22122
tracker_server=192.168.6.189:22122
tracker_server=192.168.6.190:22122
log_level
#func:
log_level=info
run_by_group
#func:
run_by_group
run_by_user
#func
run_by_user
allow_hosts
#func:允許連線的客戶端IP列表
allow_hosts=*
file_distribute_path_mode
#func:檔案分佈到data path的方式
#valu:
## 0:輪詢
## 1:隨機,根據雜湊code
file_distribute_path_mode=0
file_distribute_rotate_count
#func:當file_distribute_path_mode設定為0(輪詢)時,該值才有效。功能是,當寫檔案計數打到該值時,轉至下一個path。
file_distribute_rotate_count=100
thread_stack_size
#func:執行緒棧大小
#valu:要求至少512KB
thread_stack_size=512KB
upload_priority
#func:上傳優先順序。只有tracker.conf中store_server=2時,才有效。
#valu:值約小,優先順序越高。預設為10.
upload_priority=10
if_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:不check
check_file_duplicate=0
key_namespace
#func:當上個引數設定為1或yes時(true/on也是可以的),在FastDHT中的名稱空間
key_namespace=FastDFS
keep_alive
#func:與FastDHT的連線方式
#valu:預設為0,短連線
## 0:短連線(short connection)
## 1:長連線(persistent connection)
keep_alive=0
2 IO
disk_rw_separated
#func:是否I/O分離
#valu:預設為true
## true:分離
## false:不分離
disk_rw_separated=true
disk_rw_direct
#func:是否直接寫,不使用cache
#value:
## true:直接寫
## false:不直接寫
disk_rw_direct=false
disk_reader_threads
#func:每個storage base path的讀執行緒數。對於disk_rw_separated=true的方式該值為0.
#valu:預設為1
disk_reader_threads=1
disk_writer_threads
#func:每個storage base path的寫執行緒數。對於disk_rw_separated=true的方式該值為0.
#valu:預設為1
disk_writer_threads=1
3 同步
#func:同步檔案時,如果從binlog中沒有讀到要同步的檔案,休眠N毫秒後重新讀取。
#valu:單位為毫秒。0表示不休眠,立即再次嘗試讀取。
sync_wait_msec=50
sync_interval
#func:同步一個檔案後,在下次進行同步前的休息時間
#valu:單位為毫秒
sync_interval=0
sync_start_time
#func:每天儲存同步的開始時間。
#valu:HH:mm
sync_start_time=00:00
sync_end_time
#func:每天儲存同步的結束時間。
#valu:HH:mm
sync_end_time=23:59
write_mark_file_freq
#func:把storage的mark檔案定期同步到磁碟的時間間隔
#valu:單位為秒
write_mark_file_freq=500
fsync_after_written_bytes
#func:當寫大檔案時,每寫入N個位元組,呼叫一次系統函式fsync將內容強行同步到硬碟。
#valu:0表示從不呼叫fsync
fsync_after_written_bytes=0
sync_log_buff_interval
#func:同步或重新整理日誌資訊到硬碟的時間間隔
#valu:單位為秒
sync_log_buff_interval=10
sync_binlog_buff_interval
#func:同步binlog(更新操作日誌)到硬碟的時間間隔
#valu:單位為秒
sync_binlog_buff_interval=60
sync_stat_file_interval
#func:把storage的stat檔案同步到磁碟的時間間隔
#valu:單位為秒
sync_stat_file_interval=300
4 HTTP 相關
是否啟用 HTTP
#func:是否開啟HTTP
http.disabled
domain
#func:如果將該項留空,則使用IP,否則可以通過tracker來redirect。
http.domain_name=
server port
#func:HTTP埠號
http.server_port
trunk size
#func:trunk file size
http.trunk_size=256KB
否需要從副檔名確定檔案內容
#func:是否需要從副檔名確定檔案內容
http.need_find_content_type=true
-
轉載請註明來自柳大的CSDN部落格:Blog.CSDN.net/Poechant
-
相關文章
- 分散式檔案儲存FastDFS(七)FastDFS配置檔案詳解分散式AST
- Keepalived部署與配置詳解
- SpringMVC 框架系列之元件概述與配置詳解SpringMVC框架元件
- Apache的配置詳解Apache
- 詳解:Flannel安裝與配置
- Druid配置詳解UI
- MyBatis 配置詳解MyBatis
- nginx配置詳解Nginx
- iptables配置詳解
- 配置pvst詳解
- Redis 持久化之 AOF 配置詳解Redis持久化
- Python之ini配置檔案詳解Python
- Docker的安裝配置及使用詳解Docker
- VS Code使用之基本設定與配置詳解
- hortonworks/registry配置詳解
- git ssh配置詳解Git
- git 部署與基本配置使用Git
- 使用註解配置、使用java程式碼配置Java
- redis.conf之save配置項解讀Redis
- Nginx的配置檔案詳解Nginx
- 詳解Spring Boot的RedisAutoConfiguration配置Spring BootRedis
- vim的配置檔案詳解
- Python Fabric ssh 配置解讀Python
- webpack(2)——配置項詳解Web
- haproxy配置檔案詳解
- redis配置檔案詳解Redis
- Echars折線配置詳解
- redis 配置檔案詳解Redis
- Swoft2 配置詳解
- vsftpd.conf 配置詳解FTP
- Nginx日誌配置詳解Nginx
- Nginx如何配置HTTPS詳解NginxHTTP
- php-fpm 配置詳解PHP
- centos7 (阿里雲、linux) 單機spark的安裝與配置詳解(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)CentOS阿里LinuxSparkJDKHadoop
- Mysql配置檔案my.ini配置項詳解MySql
- 最新介面api外掛 Swagger3 更新配置詳解APISwagger
- 最新 介面api外掛 Swagger3 更新配置詳解APISwagger
- (一) 基於阿里雲安裝配置部署 docker 詳解阿里Docker
- Spring(使用註解配置)Spring