-
Notifications
You must be signed in to change notification settings - Fork 2k
Configuration
-
tracker
- disabled
- bind_addr
- port
- connect_timeout
- network_timeout
- base_path
- max_connections
- accept_threads
- work_threads
- store_lookup
- store_group
- store_server
- store_path
- download_server
- reserved_storage_space
- log_level
- run_by_group
- run_by_user
- allow_hosts
- sync_log_buff_interval
- check_active_interval
- thread_stack_size
- storage_ip_changed_auto_adjust
- storage_sync_file_max_delay
- storage_sync_file_max_time
- use_trunk_file
- slot_min_size
- slot_max_size
- trunk_file_size
- trunk_create_file_advance
- trunk_create_file_time_base
- trunk_create_file_interval
- trunk_create_file_space_threshold
- trunk_init_check_occupying
- trunk_init_reload_from_binlog
- trunk_compress_binlog_min_interval
- use_storage_id
- storage_ids_filename
- id_type_in_filename
- store_slave_file_use_link
- rotate_error_log
- error_log_rotate_time
- rotate_error_log_size
- log_file_keep_days
- use_connection_pool
- connection_pool_max_idle_time
- http.server_port
- http.check_alive_interval
- http.check_alive_type
- http.check_alive_uri
-
storage
- disabled
- group_name
- bind_addr
- client_bind
- port
- connect_timeout
- network_timeout
- heart_beat_interval
- stat_report_interval
- base_path
- max_connections
- buff_size
- accept_threads
- work_threads
- disk_rw_separated
- disk_reader_threads
- disk_writer_threads
- sync_wait_msec
- sync_interval
- sync_start_time
- sync_end_time
- write_mark_file_freq
- store_path_count
- store_path0
- subdir_count_per_path
- tracker_server
- log_level
- run_by_group
- run_by_user
- allow_hosts
- file_distribute_path_mode
- file_distribute_rotate_count
- fsync_after_written_bytes
- sync_log_buff_interval
- sync_binlog_buff_interval
- sync_stat_file_interval
- thread_stack_size
- upload_priority
- if_alias_prefix
- check_file_duplicate
- file_signature_method
- key_namespace
- keep_alive
- use_access_log
- rotate_access_log
- access_log_rotate_time
- rotate_error_log
- error_log_rotate_time
- rotate_access_log_size
- rotate_error_log_size
- log_file_keep_days
- file_sync_skip_invalid_record
- use_connection_pool
- connection_pool_max_idle_time
- http.domain_name
- http.server_port
- client
default: false
Is this config file disabled? false for enabled, true for disabled.
default: INADDR_ANY
Bind an address of this host. Empty for bind all addresses of this host.
default: 22000
The tracker server port.
default: 30s
Connect timeout in seconds.
default: 30s
Network timeout in seconds.
default: --
The base path to store data and log files. (must have)
default: 256
Max concurrent connections this server supported.
default: 1
Accept thread count.
default: 4
Work thread count, should <= max_connections.
default: 0
The method of selecting group to upload files.
- 0: round robin
- 1: specify group
- 2: load balance, select the max free space group to upload file
default: --
Which group to upload file. When store_lookup set to 1, must set store_group to the group name.
default: 0
Which storage server to upload file.
- 0: round robin
- 1: the first server order by ip address
- 2: the first server order by priority (the minimal)
default: 0
Which path(means disk or mount point) of the storage server to upload file.
- 0: round robin
- 2: load balance, select the max free space path to upload file
default: 0
Which storage server to download file.
- 0: round robin
- 1: the source storage server which the current file uploaded to
default:
Reserved storage space for system or other applications. If the free(available) space of any stoarge server in a group <= reserved_storage_space, no file can be uploaded to this group. bytes unit can be one of follows:
- G or g for gigabyte(GB)
- M or m for megabyte(MB)
- K or k for kilobyte(KB)
- no unit for byte(B)
- XX.XX% as ratio such as reserved_storage_space = 10%
default: info
Standard log level as syslog, case insensitive, value list:
- emerg for emergency
- alert
- crit for critical
- error
- warn for warning
- notice
- info
- debug
default: --
Unix group name to run this program, not set (empty) means run by the group of current user.
default: --
Unix user name to run this program, not set (empty) means run by current user.
default: * (any addresses)
"allow_hosts" can ocur more than once, host can be hostname or ip address, "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or host[01-08,20-25].domain.com, for example:
- allow_hosts=10.0.1.[1-15,20]
- allow_hosts=host[01-08,20-25].domain.com
default: 10s
Sync log buff to disk every interval seconds.
default: 100s
Check storage server alive interval seconds.
default: 64KB
Thread stack size, should >= 64KB.
default: true
Auto adjust when the ip address of the storage server changed.
default: 86400s
Storage sync file max delay seconds.
since V2.00
default: 300s
The max time of storage sync a file.
since V2.00
default: false
If use a trunk file to store several small files.
since V3.00
default: 256 bytes
The min slot size, should <= 4KB.
since V3.00
default: 16MB
The max slot size, should > slot_min_size. Store the upload file to trunk file when it's size <= this value.
since V3.00
default: 64 MB
The trunk file size, should >= 4MB.
since V3.00
default: false
If create trunk file advancely.
since V3.06
default: 02:00
The time base to create trunk file. The time format: HH:MM.
since V3.06
default: 38400s
The interval of create trunk file, unit: second.
since V3.06
default: 0
The threshold to create trunk file when the free trunk file size less than the threshold, will create the trunk files.
since V3.06
default: false
If check trunk space occupying when loading trunk free spaces. The occupied spaces will be ignored.
NOTICE: set this parameter to true will slow the loading of trunk spaces when startup. you should set this parameter to true when neccessary.
since V3.09
default: false
If ignore storage_trunk.dat, reload from trunk binlog. Set to true once for version upgrade when your version less than V3.10.
since V3.10
default: 0
The min interval for compressing the trunk binlog file. FastDFS compress the trunk binlog when trunk init and trunk destroy recommand to set this parameter to 86400 (one day).
0: never compress
since V5.01
default: false
If use storage ID instead of IP address.
since V4.00
default: --
Specify storage ids filename, can use relative or absolute path.
since V4.00
default: ip
Id type of the storage server in the filename, values are:
- ip: the ip address of the storage server
- id: the server id of the storage server
This paramter is valid only when use_storage_id set to true.
since V4.03
default: false
If store slave file use symbol link.
since V4.01
default: false
If rotate the error log every day.
since V4.02
default: 00:00
Rotate error log time base, time format: HH:MM. Hour from 0 to 23, Minute from 0 to 59.
since V4.02
default: 0
Rotate error log when the log file exceeds this size. 0 means never rotates log file by log file size
since V4.02
default: 0
Keep days of the log files. 0 means do not delete old log files
default: false
If use connection pool
since V4.05
default: 3600s
Connections whose the idle time exceeds this time will be closed. (unit: second)
since V4.05
default: 8080
HTTP port on this tracker server.
default: 30s
Check storage HTTP server alive interval seconds. <= 0 for never check.
default: tcp
Check storage HTTP server alive type, values are:
- tcp : connect to the storge server with HTTP port only, do not request and get response
- http : storage check alive url must return http status 200
default: /
Check storage HTTP server alive uri/url.
NOTE: storage embed HTTP server support uri: /status.html
default: false
Is this config file disabled? false for enabled, true for disabled.
default: --
The name of the group this storage server belongs to. (must have)
default: all addresses of this host
Bind an address of this host. Empty for bind all addresses of this host.
default: true
If bind an address of this host when connect to other servers (this storage server as a client)
- true for binding the address configed by above parameter: "bind_addr"
- false for binding any address of this host
default: 23000
The storage server port.
default: 30s
Connect timeout in seconds.
default: 30s
Network timeout in seconds.
default: 30s
Heart beat interval in seconds.
default: 300s
Disk usage report interval in seconds.
default:
The base path to store data and log files. (must have)
default: 256
Max concurrent connections the server supported. More max_connections means more memory will be used.
default: 64KB
The buff size to recv / send data, this parameter must more than 8KB.
since V2.00
default: 1
Accept thread count.
since V4.07
default: 4
Work thread count (should <= max_connections), work thread deal network io.
since V2.00
default: true
If disk read / write separated, false for mixed read and write, true for separated read and write.
since V2.00
default: 1
Disk reader thread count per store base path. For mixed read / write, this parameter can be 0.
since V2.00
default:
Disk writer thread count per store base path. For mixed read / write, this parameter can be 0.
since V2.00
default: 200ms
When no entry to sync, try read binlog again after X milliseconds. (must > 0)
default: 0
After sync a file, usleep milliseconds, 0 for sync successively (never call usleep).
default: 00:00
Storage sync start time of a day, time format: HH:MM (Hour from 0 to 23, Minute from 0 to 59).
default: 23:59
Storage sync end time of a day, time format: HH:MM (Hour from 0 to 23, Minute from 0 to 59).
default: 500
Write to the mark file after sync N files.
default: 1
Path(disk or mount point) count
default:
store_path# (based 0), if store_path0 not exists, it's value is base_path. (The paths must be exist)
default: 256
Subdir_count * subdir_count directories will be auto created under each store_path (disk), value can be 1 to 256, default value is 256.
default:
Tracker_server can ocur more than once, and tracker_server format is "host:port", host can be hostname or ip address.
default:
Standard log level as syslog, case insensitive, value list:
- emerg for emergency
- alert
- crit for critical
- error
- warn for warning
- notice
- info
- debug
default:
Unix group name to run this program, not set (empty) means run by the group of current user.
default:
Unix username to run this program, not set (empty) means run by current user.
default: *
Allow_hosts can ocur more than once, host can be hostname or ip address, "*" means match all ip addresses, can use range like this: 10.0.1.[1-15,20] or host[01-08,20-25].domain.com, for example:
- allow_hosts=10.0.1.[1-15,20]
- allow_hosts=host[01-08,20-25].domain.com
default: 0
The mode of the files distributed to the data path.
- 0: round robin (default)
- 1: random, distributted by hash code
default: 100
Valid when file_distribute_to_path is set to 0 (round robin), when the written file count reaches this number, then rotate to next path.
default: 0
Call fsync to disk when write big file.
- 0: never call fsync
- other: call fsync when written bytes >= this bytes
default value is 0 (never call fsync)
default: 10s
Sync log buff to disk every interval seconds. (must > 0)
default: 60s
Sync binlog buff / cache to disk every interval seconds.
default: 300s
Sync storage stat info to disk every interval seconds.
default: 512KB
Thread stack size, should >= 512KB.
default: 10
The priority as a source server for uploading file. The lower this value, the higher its uploading priority.
default:
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: 0
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: hash
File signature method for check file duplicate,
- hash: four 32 bits hash code
- md5: MD5 signature
since V4.01
default:
Namespace for storing file indexes (key-value pairs), this item must be set when check_file_duplicate is true / on.
default: 0
Set keep_alive to 1 to enable persistent connection with FastDHT servers.
default: false
If log to access log.
since V4.00
default: false
If rotate the access log every day.
since V4.00
default: 00:00
Rotate access log time base, time format: HH:MM, Hour from 0 to 23, Minute from 0 to 59.
since V4.00
default: false
If rotate the error log every day.
since V4.02
default: 00:00
Rotate error log time base, time format: HH:MM, Hour from 0 to 23, Minute from 0 to 59.
since V4.02
default: 0
Rotate access log when the log file exceeds this size, 0 means never rotates log file by log file size.
since V4.02
default: 0
Rotate error log when the log file exceeds this size, 0 means never rotates log file by log file size.
since V4.02
default: 0
Keep days of the log files, 0 means do not delete old log files.
default: false
If skip the invalid record when sync file.
since V4.02
default: false
If use connection pool.
since V4.05
default: 3600s
Connections whose the idle time exceeds this time will be closed. (unit: second)
since V4.05
default:
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.
default: 8888
The port of the web server on this storage server.
To be continue.