FAQ
Questions
- Installation
- Q. TokyoCabinet's compile was error...
- Q. TokyoCabinet's installation was error..
- Q. I installed libyaml, but ROMA doesn't work...
- Q. Nevertheless booted ROMA and process No. was displayed, process is not booting.
- Structure
- Q. How to change vnodes count?
- Q. How to change ratio of using memory?
- Q. What's happen if we set over size to memory ratio setting?
- Q. What is short vnodes?
- Q. What is lost vnodes?
- Functions
- Q. Dose ROMA have automatically removal function for WriteBehind files?
- Q. I can't set value.
- Q. join command dose not work well.
- Storage
- Q. How can I get Key list of ROMA?
- Q. How Can I check tc file's health?
- Q. How Can I check expired time of each keys?
- Others
- Q. How about behavior of log's shift and rotation.
- Q. Cannot re-launch when my operation is "kill -9 $process_no" and start ROMA again.
- Error Messages
- line 253: cap: command not found
- roma/plugin/plugin_***.rb (LoadError)
- libtokyocabinet.so.9: cannot open shared object file
- EM connection expired at ***.***.***.**_*****,remains 15
- rset NOT_STORED:error:0 > 300 && cmp_clk(7,8)>=0 3774873600 key_6843oma 3778788880 7 2147483647
- WARN -- : forward xxx(get , set, delete....)
- Send command failed that node-id is #{Host}_#{port},command is whoami
- execution expired
- `require': no such file to load -- sqlite3 (LoadError)
Questions
Installation
Q. TokyoCabinet's compile was error...
It have possibility that library(bzip2-devel) was not installed.
Please install it.
Q. TokyoCabinet's installation was error..
It is often permission error.
Please check direcory's permission.
Q. I installed libyaml, but ROMA doesn't work...
If you re-install Ruby by use RVM.
Install libyaml-devel before re-install Ruby.
Q. Nevertheless booted ROMA and process No. was displayed, process is not booting.
This problem happened when ROMA can not make data directory by permission error.
Please check direcory's permission.
Structure
Q. How to change vnodes count?
Remake routing file with -d option(vnodes is 2 ** params).
And restarting ROMA with this routinig file.
- in case of vnodes = 1024(2 ** 10)
- in case of vnodes = 2048(2 ** 11)
$ bin/mkroute -d 10 localhost_10001 localhost_10002 .....
$ bin/mkroute -d 11 localhost_10001 localhost_10002 .....
Q. How to change ratio of using memory?
You can change memory ratio by modifying config.rb(STORAGE_OPTION).
- xmsiz(bytes)
The amount of memory each tc file can use.
xmsiz * tc file count = Memory consumption of the ROMA.
STORAGE_OPTION = "bnum=5000000#xmsiz=80000000#opts=d#dfunit=10"
Ex.)In case of [xmsiz=80000000] & [tc file(dfunit) = 10] & [instance = 2], this ROMA use 1.6GB memory for ROMA in each server.
80000000(bytes) * 10(tc files) * 2(instance) = 1.6GB/server
Q. What's happen if we set over size to memory ratio setting?
ROMA can work, but probably performance down will be happned.
Q. What is short vnodes?
- short vnodes is less redundancy vnodes.
- But you can set/get data.
-
Basically ROMA's redundancy is 2(you can customize).
It means ROMA have duplicating data in 1 cluster.
Normal node can access both data.
But short vnodes can access only 1 data.
We call it "redundancy down".
Q. What is lost vnodes?
- lost vnodes is no redundancy vnodes.
- And you can NOT set/get data.
-
Basically ROMA's redundancy is 2(you can customize).
It means ROMA have duplicating data in 1 cluster.
normal node can access both data.
But lost vnodes can NOT access both data.
So you can NOT access data.
We call it is "data lost".
- But basically ROMA re-assign nodes automatically in case of config's lost setting is "auto_assign".
Functions
Q. Dose ROMA have automatically removal function for WriteBehind files?
- No. Because writebehind file are the valuable for investigating accident or problem.
Q. I can't set value.
-
ROMA can manage the data after all process booting and recognizing each other.
So please confirm whether all process are booting or not.
Q. join command dose not work well.
-
You cannot use join command if vnode number is less than ROMA node number.
So you should increase the number. - div_bits:
- 4 => 16 vnode
- 11 => 1024 vnode
Storage
Q. How can I get Key list of ROMA?
Please use key list command or tool.
-
Key list command(ROMA command).
This command make the key list file under the data directory after checking all data.
You can get specific key name by use [regexp] option. - Key list tool(Shell command).
set_cleanup_regexp [regexp]
Ex.) set_cleanup_regexp ^abc
If you want to use this tool without stopping ROMA, please copy data directory and remove lock file.
$ bin/key_list ${tc file directory path}
Ex.)
$ bin/key_list /roma/act/ds/localhost_10001
### roma localhost_10001/roma
key1
key2
.
.
.
done
Q. How Can I check tc file's health?
- TokyoCabinet provide the check tool.
$ cd ${tokyo-cabinet HOME direcotry}/bin
$ ./tchmgr inform ${tc file's path}
Ex.)
$ ./tchmgr inform /usr/local/src/20140124/3.tc
path: /usr/local/src/20140124/3.tc
database type: hash
additional flags: fatal
bucket number: 3145721
alignment: 16
free block pool: 1024
inode number: 40648
modified time: 2014-01-24T18:35:00+09:00
options: deflate
record number: 87901
file size: 976008944
http://fallabs.com/tokyocabinet/spex-en.html
Q. How Can I check expired time of each keys?
- key_access tool show expired time of specified key.
Usage:
$ bin/key_access ${storage-path} ${key} -v
- ${storage directory} : ROMA storage directory.
- ${key} : key name which you want to get expired date.
- If ROMA has the Lock file, you can NOT use this tool. So please stop ROMA or take snapshot before using this tool.
- If you use tool for snapshot file, please remove date info of end of file name ("0.tc.20150914145903" => "0.tc").
Ex.)
$ bin/key_access /ds/localhost_10001 foo -v
hash : roma
vnode: 2667577344
last : 2015-09-14 14:58:37 +0900
clock: 0
expt : 2015-09-14 15:58:37 +0900 <===This is the expired date
value: bar
Others
Q. How about behavior of log's shift and rotation.
- Please check config file(config.rb).
- LOG_SHIFT_SIZE
When log files size up this value, ROMA make log's backup file. - LOG_SHIFT_AGE
How much ages ROMA keeps log's backup file.
Q. Cannot re-launch when my operation is "kill -9 $process_no" and start ROMA again.
-
If ROMA process is down accidentally, the lock file keep the condition.
In this case, you should delete 'lock file' which is under data directory and start ROMA again.
Error Messages
line 253: cap: command not found
- Ruby's path isn't set. Please set it.
roma/plugin/plugin_***.rb (LoadError)
-
Plugin which set in [config.rb] is not allocated in plugin directory.
Layout correctly or remove description from config.rb.
libtokyocabinet.so.9: cannot open shared object file
-
It happened by TokyoCabinet can't call library(libtokyocabinet.so.9).
So please set directory which include litokyocabinet.so.9 to LD_LIBRARY_PATH(environmental value).
EM connection expired at ***.***.***.**_*****,remains 15
-
If you see too many this logs, you should change some config parameters.
It will may cause high latency due to network re-connection costs. - To avoid it, we recommend following setting.
# CONNECTION_EMPOOL_EXPTIME = 30 #=> default on v1.0.0
CONNECTION_EMPOOL_EXPTIME = 600
# CONNECTION_EMPOOL_MAX = 15 #=> default on v1.0.0
CONNECTION_EMPOOL_MAX = 30
rset NOT_STORED:error:0 < 300 && cmp_clk(7,8)<=0 3774873600 key_6843oma 3778788880 7 2147483647
WARN -- : forward xxx(get , set, delete....)
- This message is about "not covered instance" has ordered and the instance transmit the "covered instance".
- It happens when someone update data directly like using telnet command, or primary instance is busy and pass the request to secondary instance.
Send command failed that node-id is #{Host}_#{port},command is whoami
- This message is about health-check fails and ROMA instances do health-check each other.
- Also ROMA instance judges that an instance is down when health-check fails many times. We can set the number of judgement by config.rb file.
execution expired
-
This message is about connection error.
No problem if this message come out several times per day. -
This is how to search the cause
- Set set_hilatency_warn_time = 1 second
- Confirm the Hi_Latency caution occurs at same time.
- If above thing occurs, connection latency is the cause probably.
`require': no such file to load -- sqlite3 (LoadError)
-
This message showed Ruby's library Error.
So please install Ruby-gem's library of Sqlite3.