Persistent storage system installation configuration ttserver

Persistent storage system installation configuration ttserver Tokyo Cabinet introduced a .ttserver Japanese development of a DBM database to read and write very fast. Tokyo Tyrant also developed by the same author Tokyo Cabinet network interface, compatible with memcached protocol, it can also exchange data via http protocol. Tokyo Tyrant plus Tokyo Cabinet constitute a distributed persistent storage system for highly concurrent, for any memcached client, it can be as Tokyo Tyrant is a memcached service, but ttserever data are persistent. Meanwhile ttserver support mainly among secondary mode, failover. Installation 1. Install two .ttserver Tokyo Cabinet # wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz # tar zxvf tokyocabinet-1.4.47.tar.gz -C ../software/ # cd ../software/tokyocabinet-1.4.47/ # ./configure --prefix = / usr / local / ttserver / tokyocabinet-1.4.47 # make # make install 2. installation Tokyo Tyrant # wget http: // fallabs. com / tokyotyrant / tokyotyrant-1.1.41.tar.gz # tar zxvf tokyotyrant-1.1.41.tar.gz -C ../software/ # cd ../software/tokyotyrant-1.1.41/ # ./configure - -prefix = / usr / local / ttserver / tokyotyrant-1.1.41 --with-tc = / usr / local / ttserver / tokyocabinet-1.4. . 47 # make # make install three starts ttserver 1. Create a data file storage directory # mkdir / ttdata 2. Set the size of the file descriptor # vim /etc/security/limits.conf * soft nofile 204800 * hard nofile 204800 or # ulimit - u 204800 -HSn 204800 or write to / etc / profile inside, so each time a user logged in this file will be executed. 3.ttserver parameters Comment -host name: Binding host name or IP address -port num: Binding port number, default 1978 -thnum num: Specifies the number of threads, the default 8 -tout num: specify each session timeout, s, never default timeout -dmn: daemon to run -pid path: PID file -kl: If the detected process ID file, kill existing processes -log path: log file -ld: record debug information -le: recording error information -ulog path: specify the update log directory -ulim num: specify each update log file size -uas: use asynchronous I / O update log. This will reduce the use of disk IO consumption, but the data will first be placed in memory, not immediately written to disk, restart the server or if ttserver kill off process, will lead to some data loss. -sid num: specify the server ID -mhost name: Specifies the replication master server's host name -mport num: Specifies the replication master server port number -rts path: Specifies the timestamp copy files stored -rcc: Check replication consistency -skel name : Specifies the name of the library skeleton database -mul num: Specifies the frequency division multiple databases mechanisms -ext path: Specifies the script file extension -extpc name period: name of command and calls the specified function of time -mask expr: Specifies the name of the command to disable -unmask expr: 4. The name of the specified database commands allow the type of database types are supported on-memory hash database, on-memory tree database, hash database, and B + tree database. If you do not specify a dbname, then the default is the hash database. Database naming convention is specified by the abstract API Tokyo Cabinet. If the database name is "*" indicates that the memory hash database. If the database name is "+" indicates that the memory tree database. If the database name is ".tch" ending, it indicates that the database is hash database. If the database name is ".tcb" ending, it indicates that the database is a B + tree database. If the database name is ".tcf" ending, it indicates that the database is a fixed-length database. If the database name is ".tct" ending, it indicates that the database is a database table. Adjustment parameter to specify the database by extending the database name, the "#" Separately, each parameter specified by a parameter name and value, by "=" separated. Memory hash database support "bnum", "capnum" and "capsiz". Memory tree database support "capnum" and "capsiz". hash database support "mode", "bnum", "APOW", "fpow", "OPTS", "rcnum", "xmsiz" and "dfunit". B + tree database "mode", "lmemb", "nmemb", "bnum", "APOW" , "Fpow", "OPTS", "lcnum", "ncnum", "xmsiz" and "dfunit". fixed-length database support "mode", "width" and "limsiz". table database support "mode", "bnum", "apow", "fpow", "opts", "rcnum", "lcnum", "ncnum", "xmsiz", "dfunit" and "idx". "Capnum" the ability to specify the number of records. "Capsize" the size of the memory capacity of the designated use. "Mode" comprising w write write, r read reader, c create creating, t interception truncating, e is not locked no locking, f lock nonblocking non-blocking lock, default wc. "Opts" l comprising large large, d narrow deflate, b BZIP2, t TCBS. "Idx" specified index and its type of column names separated by ":." For example, "casket.tch # bnum = 1000000 # opts = ld" database file name is casket.tch, bucket size is 1000000, opts option is large and deflate. 4. Stand-alone mode # ./ttserver -host 127.0.0.1 -port 1978 -thnum 8 -tout 30 -dmn -pid / ttdata / tt.

Reproduced in: https: //my.oschina.net/766/blog/211322

Guess you like

Origin blog.csdn.net/weixin_33918357/article/details/91548064