Couchbase V (Management Task) Read more
Support hard disk read more in Couchbase2.1 (Multi-readers and writers), General dual core 4G service default 3 thread
4 cores 16G of memory one set to 8 threads
Server Warmup
After the couchbase restart, it is necessary to undergo a warm-up phase to enter the running state:
-
Initialization, this phase of the service does not have any data and will be loaded from Vbucket to initialize the state and data of each vbucket.
-
Key Dump. At this stage, the main load is key and metadata.
-
Check the access log, pre-read a single access cache log (the frequency of the key is logged), and if the log is present, load the key according to the log and then load the data from the hard disk
-
Load the key and the relevant document will be loaded
When the following state is reached, the service goes into a running state:
-
Complete the document that loads all access log keys, or
-
Load all of the vbuckets documents, or
-
Memory all documents are greater than or equal to Ep_warmup_min_items_threshold, or
-
The percentage of RAM is near Ep_warmup_min_memory_threshold, or
-
Use of RAM near Mem_low_wat
If the service is in the warmup state, the client connection returns engine_tmpfail code error.
Get warmup information
Use Cbstats to get warmup information, but you can only get one node at a time bucket information:
shell> cbstats localhost:11210 -b beer_sample -p bucket_password all | grep ‘warmup‘shell> cbstats hostname:11210 -b my_bucket -p bucket_password raw warmup
Ep_warmup_thread
Indicates if the warmup has completed. Returns "running" or "complete".
Ep_warmup_state
Indicates the current progress of the warmup:
-
Initial
Start warmup processes.
-
Estimatedatabaseitemcount
Estimating database item count.
-
Keydump
Begin loading keys and metadata based, but not documents, into RAM.
-
Checkforaccesslog
Determine if an access log is available. This log indicates which keys have been frequently read or written.
-
Loadingaccesslog
Load information from access log.
-
Loadingdata
This indicates the server is loading data first for keys listed in the access log, or if no log available, based on keys found during the ‘Key Dump‘ phase.
-
Done
Server is ready to handle read and write requests.
To modify the threshold value of a warmup
Ep_warmup_min_items_threshold can be changed by Cbepctl by setting the warmup line.
Changing the frequency of access scans
The service defaults to run a sweep access log every day from UTC, and determines how often key is used:
# 每二十分钟扫描一次shell> ./cbepctl localhost:11210 -b beer-sample set flush_param alog_sleep_time 20
Copy and copy
Node in each cluster has two data replica and active Data,replica data is a copy of the other node, and active data is the client-written.
Couchbase uses a peer-to policy to write a copy, and can only adjust the speed of writing.
Replica policy
It is often useful to set up 3 copies.
Couchbase V (management tasks)