Detailed Description storage.conf profile (a file comprising instructions to weight)

# is this config file disabled
# false for enabled
# true for disabled
disabled=false        false为生效,true不生效

# the name of the group this storage server belongs to
#
# comment or remove this item for fetching from tracker server,
# in this case, use_storage_id must set to true in tracker.conf,
# and storage_ids.conf must be configed correctly.
group_name=group1
# 指定 此 storage server 所在 组(卷)

# If a comment or delete this parameter, and obtain information from the tracker grouping where
# is use_storage_id parameters must be set to true in the configuration file tracker.conf
# storage_ids.conf file must be configured correctly

AN address of the this the bind # Host
# empty All Addresses for the bind of the this Host
bind_addr =
# binding ip address, all addresses on the host Null

# Bind_addr usually for the server. When specifying bind_addr, this parameter is valid.
# This storage server as a client to connect to other servers (e.g., tracker server, storage server other), is bound bind_addr.

# 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
client_bind=true

# The storage server port storage service port
port = 23000

# Connect timeout in seconds connection timeout for socket socket functions Connect
# default value IS 30s
connect_timeout = 30

Network timeout in seconds The #
# default value IS 30s
network_timeout = 60
# Storage Server network timeout seconds. When sending or receiving data,
# if it can not send or receive data after a timeout, the network communication is this

Heart Beat in seconds The interval The #
heart_beat_interval = 30
# heartbeat interval, in seconds (here means actively sends a heartbeat to the tracker server)

In interval The Disk Usage Report # seconds The
stat_report_interval = 60
# Storage Server to the time interval tracker server disk space is reported in seconds

Store at The Base path to # and log the Data Files
base_path = / Home / Yuqing / fastdfs
# base_path address directory, subdirectory must exist in the root directory will be automatically generated 
# (Note: this is not the address file stored uploaded before Yes, a version change)

Concurrent Connections at The Server max # Supported
# default value IS 256
# max_connections means More More Memory Used by Will BE
max_connections = 256
# server supports a maximum concurrent connections
# default is 256
# greater value means need to use more memory

The BUFF size to the recv # / Send Data
# Parameter MUST the this More Within last 8KB
# default value IS 64KB
# Operating since V2.00
buff_size = 256KB
# transmit / receive data buffer size
# This parameter must be greater than 8KB
# setting queue node buffer size. Work Queue consume memory size buff_size * max_connections =
# set large, overall system performance will be improved.
# Memory consumption do not exceed the system's physical memory size. In addition, for 32-bit systems, note the use of memory to do more than 3GB

COUNT the Accept the Thread #
# default value IS 1
# Operating since V4.07
accept_threads 1 =
# 1 to accept the default number of threads 

Work the Thread COUNT #, Should <= max_connections
# Work the Thread Deal Network IO
# 4 default value IS
# Operating since V2.00
work_threads = 4
# V2.0 introduced this parameter, the number of worker threads <= max_connections
# This parameter processing network I / O
# is normally set to the number of CPU

Disk Read IF # / Write Separated
## Read and Write to false Mixed for
## Separated true for Read and Write
# default value IS true
# Operating since V2.00
disk_rw_separated = true
if separate read and write disk #
# to false to true for the reader mixing separate read and write
# default separate read and write

Thread COUNT per Disk Reader # Base Store path
# Mixed for Read / Write, the this CAN BE Parameter 0
# default value IS. 1
# Operating since V2.00
disk_reader_threads. 1 =
# Number of threads for each memory read path, the default value 1
# mixed read and write this value is set to 0
when # separate read and write, read the number of threads in the system * store_path_count disk_reader_threads =
# mixed reading and writing, reading and writing the number of threads in the system = (disk_reader_threads + disk_writer_threads) * store_path_count

Disk Writer COUNT per the Thread # Store Base path
# for the Read Mixed / the Write, the this the Parameter CAN BE 0
# default value IS 1
# Operating since V2.00
disk_writer_threads = 1
# number of the writer thread for each storage path, the default value 1
# mixed read and write this value is set to 0
when # separate read and write, write the number of threads in the system * store_path_count disk_writer_threads =
# mixed reading and writing, reading and writing the number of threads in the system = (disk_reader_threads + disk_writer_threads) * store_path_count

When entry to NO Sync #, the try Read After X-binlog Again milliseconds
# MUST> 0, default value IS 200ms
sync_wait_msec = 50
when synchronizing files #, if not read from the file to synchronize binlog, the sleep N millisecond reread . 0 means no sleep, immediately try to read again.
# For CPU consumption consideration, is not recommended is set to 0. How do you want to synchronize as fast as some of this parameter can be set to be smaller, for example, is set to 10ms

# After Sync A File, usleep milliseconds
# 0 for Sync successively (Never Call usleep)
sync_interval = 0
# synchronization on a document resynchronization next file interval, in milliseconds, 0 means no sleep, direct synchronization next file

Sync Start Time of Storage # A Day, the format Time: Hour: Minute
# Hour 23 is from 0 to, from 0 to 59 Minute
sync_start_time = 00: 00
# storage starting time of day synchronization (default start 00:00) 
# general use to avoid peak sync some problems set

Sync End Time of Storage # A Day, the format Time: Hour: Minute
# Hour 23 is from 0 to, from 0 to 59 Minute
sync_end_time = 23 is: 59
# storage end time of day synchronization (default end 23:59) 
# general use to avoid peak sync some problems set

At The mark the Write to File # the After N Sync Files
# default value IS 500
write_mark_file_freq = 500
# N files after the synchronization finished, the storage of file synchronization mark to disk
# NOTE: If you mark the contents of the file has not changed, it will not sync

Path # (or Disk Mount Point) COUNT, default value IS. 1
store_path_count. 1 =
Storage Server supports multiple file path # storage (e.g. disks)
# where the number of storage group configuration file path, usually with only a directory

# Store_path #, based 0, IF store_path0 Not EXISTS, apos value IS base_path
# The Paths MUST BE exist
store_path0 = / Home / Yuqing / FastDFS
# store_path1 = / Home / Yuqing / fastdfs2
# individually configured store_path path, based index number 0 . Note that there are 0,1,2 ...... back configuration, to configure 0 store_path - 1.
# If you do not configure base_path0, and over there it's the same as the corresponding path base_path.
# Path must exist

* Subdir_count Directories by Will subdir_count # BE Auto the Created an under the each 
# store_path (Disk), value CAN BE 1 to 256, default value IS 256
subdir_count_per_path = 256
# N * N directory is automatically created in each disk path
# values can be set 1-256 default 256
when # FastDFS store files, using the two directories. Here the number of files stored configuration directory (storage mechanism system)
# If this parameter is only N (eg: 256), the storage server in the initial operation, it will automatically create a N * N store files subdirectory.

Within last CAN OCUR More # tracker_server Once, and tracker_server format IS
# "Host: Port", Host CAN BE hostname or ip address
tracker_server = 192.168.209.121: 22122
Address List # tracker_server the write port (once again reminded that the initiative to connect tracker_server)
# when there are multiple tracker server, each tracker server to write a line

#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
# 日志级别

Group name to the this RUN #unix Program, 
#not the SET (empty) by means RUN at The Current Group of the User
run_by_group =
# User Group FastDFS the operating system (that is, do not fill the current user group, which is to start a process which)

RUN username to the this Program #unix,
#not the SET (empty) Current means RUN by the User
run_by_user =
# FastDFS user's operating system (that is, do not fill the current user, which is to start a process which)

Within last CAN OCUR More allow_hosts # Once, Host CAN BE hostname or ip address,
# "*" All means match ip Addresses, CAN use the Range like the 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
allow_hosts = *
# allowed to connect list of IP addresses of this storage server (HTTP service comes with all the connections are not included)
# can configure multiple lines, each line will work

The MODE of Files The # Distributed The data path to
# 0: round Robin (default)
#. 1: Random, distributted by the hash code
file_distribute_path_mode = 0
# dispersing file stored policy data directory.
# 0: After storing in turn, stored in a directory provided a number of files (file set number of parameters file_distribute_rotate_count), the case of using a directory memory.
# 1: random access, the file name corresponding to the hash code stored in dispersed

# Valid When file_distribute_to_path IS SET to 0 (round Robin), 
# When The written File COUNT Reaches the this Number, the then Rotate to Next path
# default value IS 100
file_distribute_rotate_count = 100
# when the above parameters file_distribute_path_mode set to 0 (turn storage mode) when this parameter is valid.
When the number # file stored in a directory under the selected value is reached, the subsequent uploading files stored in a directory.

Call the when fsync to Disk # the Write Big File
# 0: Never Call fsync
# OTHER: Call the when fsync written bytes> = the this bytes
# IS default value 0 (Never Call fsync)
fsync_after_written_bytes = 0
# when writing large files, each write into N bytes, a system function calls fsync forcibly synchronized content to the hard disk. 0 indicates fsync is never called  
when other values # write byte indicates this value, the function call fsync

# Sync log BUFF to Disk Every interval The seconds The
# the MUST> 0, default value IS 10 seconds The
sync_log_buff_interval = 10
# sync or refresh the log information to time the hard drive interval in seconds
# Note: the log information storage server is not always write disk , but the first written memory

Sync BUFF the binlog # / Every interval The seconds The Cache to Disk
# 60 seconds The default value IS
sync_binlog_buff_interval = 10
# synchronization binglog (update log) to a disk time interval, in seconds
# This parameter affects the newly uploaded file synchronization delay

Sync storage stat info to # Disk Every interval The seconds The
# default value IS 300 seconds The
sync_stat_file_interval = 300
# stat of the storage disk file synchronization to a time interval in seconds.
# Note: If the stat file content has not changed, will not be synchronized

The Thread Stack size #, Should> = 512KB
# default value IS 512KB
thread_stack_size = 512KB
# thread stack size. FastDFS server-side using the threaded approach.
# For V1.x, storage server thread stack is not less than 512KB; For V2.0, thread stack is greater than or equal to 128KB.
The larger stack # thread, a thread, the more system resources.
# For V1.x, if you want to start more threads (max_connections), it may be appropriate to reduce the value of this parameter.

The priority AS Source A # for Uploading File Server.
# The Lower the this value, Uploading The ITS IN AREAS OF COMMUNICAITIONS priority.
# Default value IS 10
upload_priority = 10
# storage server as the priority of the present source server, the uploaded file
# can be negative. The smaller the value, the higher the priority
# tracker.conf here and in store_server configuration when the corresponding 2 = 

Alias prefix at The NIC #, SUCH AS eth in Linux, you CAN See IT by ifconfig -a
# Multi aliases Split by comma. Auto empty value means the SET by OS of the type
# default values IS empty
if_alias_prefix =
# NIC alias prefix on your linux it can be seen by the ifconfig -a
# plurality of aliases need to be separated by commas
# null value indicates the type of the operating system is automatically set

FastDHT file de-duplication setting:
# IF the Check File Duplicate, the when the SET to to true, use FastDHT to Store File the Indexes
# 1 or yes: need the Check
# 0 or NO: do not the Check
# default value IS 0
check_file_duplicate = 0
# detect whether upload The file already exists. If it does exist, it is not stored in the file content
# FastDHT establish a symbolic link to save disk space. 
# The application to tie FastDHT use, so the first installation FastDHT before opening 
# 1 is detected or yes, no or 0 is not detected

Signature Method, the Check for File # Duplicate File
## hash: 32 bits at Four hash code
## MD5: MD5 Signature
# default value IS hash
# Operating since V4.01
file_signature_method = hash
# When checking duplicate files, the file content signature way:
## hash: 4 Ge code hash
## MD5: MD5

Storing File Indexes for namespace # (Key-value pairs)
# Item MUST BE SET When the this check_file_duplicate IS true / on
key_namespace = FastDFS
# namespaces store file symbolic link
# check_file_duplicate parameter must be set to true / on

# The SET keep_alive to 1 to enable persistent Connection with FastDHT servers
# default value IS 0 (Short Connection)
keep_alive = 0
# and FastDHT servers connections (whether persistent connections), the default is 0 (short connection)
# consider using long connection, whether it depends on the number of connections FastDHT server is enough

You CAN use # "#include filename" (not the include Double QUOTES) Directive to 
# FastDHT the Load Server List, the when at The filename IS SUCH AS A relative path 
# Pure filename, path IS at The Base at The Base path of Current / the this config File.
MUST SET FastDHT Server List # When check_file_duplicate to true IS / ON
# Please See for FastDHT Detail of the INSTALL
## the include /home/yuqing/fastdht/conf/fdht_servers.conf
# you can use "#include filename" command (without quotation marks ) to load FastDHT service list
# file name is a relative path such as a pure file name
# primary path is the main path of the current profile
# FastDHT list of services must be set when this parameter is check_file_duplicate to true / ON
# for more information see the FastDHT installation file


Log type settings:
# IF log to access log
# default value IS false
# Operating since V4.00
use_access_log = false
# whether the records to access log file operations

Rotate at The Access log IF # Every Day
# default value IS false
# Operating since V4.00
rotate_access_log = false
# whether periodic rotation access log, currently only for a one day cycle time

Rotate log Time Base Access #, Time format: Hour: Minute
# Hour from 0 to 23, from 0 to 59 Minute
# default value IS 00:00
# Operating since V4.00
access_log_rotate_time = 00: 00
time point # access log periodic rotation of effective only when set to true rotate_access_log

Rotate at The error log IF # Every Day
# default value IS false
# Operating since V4.02
rotate_error_log = false
# whether periodic rotation error log, currently only for a one day cycle time

Rotate error log Time Base #, Time format: Hour: Minute
# Hour from 0 to 23, from 0 to 59 Minute
# default value IS 00:00
# Operating since V4.02
error_log_rotate_time = 00: 00
# error log periodic rotation point in time effective only when set to true rotate_error_log

Rotate the when at The Access log # File Exceeds the this log size
# 0 means Never ROTATES log by log File size File
# default value IS 0
# Operating since V4.02
rotate_access_log_size = 0
# Access log rotation by file size
# 0 indicates that not by file the size of the rotation, or when the access log reaches this size, it will rotate to a new file

The Rotate When error log # File Exceeds the this log size
# 0 by means Never ROTATES log log File File size
# 0 default value IS
# Operating since V4.02
rotate_error_log_size = 0
# error log file size by rotation
# is not set to 0 by file the size of the rotation, or when the error log reaches this size, it will rotate to a new file

Days at The log of the Keep # Files
# 0 means do not log the Delete Old Files
# IS default value 0
log_file_keep_days = 0
# whether to retain the log file
# 0 to not delete old log files

Skip the Record at The invalid IF # the when Sync File
# default value IS false
# Operating since V4.02
file_sync_skip_invalid_record = false
when the # file synchronization, whether or not ignore invalid binlog record

Connection use the pool IF #
# default value to false IS
# Operating since V4.05
use_connection_pool to false =
# whether to use a connection pool

The IDLE Whose Time Connections # Exceeds the this Will BE Time Closed
# Unit: SECOND
# 3600 IS default value
# Operating since V4.05
connection_pool_max_idle_time = 3600
# closing time idle connections
# default 3600 seconds

Use at The ip address of # the this Storage Server domain_name IF IS empty,
# the else in the this Domain name by Will OCUR at The url Redirected by at The Tracker Server
http.domain_name =
# if the domain name is an empty storage server using ip address
web on # storage server domain name server, usually only for a single server deployment of Web
# the URL so you can access files on the storage server by its domain name
# is the way it is nULL IP address.


The Port of The Web # ON the this Storage Server Server
http.server_port = 8888
Web server uses the storage port # 

Published 20 original articles · won praise 30 · views 30000 +

Guess you like

Origin blog.csdn.net/ever_siyan/article/details/89489113