Details
-
Bug
-
Resolution: Duplicate
-
Major
-
4.0.0
-
Security Level: Public
-
None
-
Untriaged
-
Centos 64-bit
-
No
Description
1. Install CB server on a single node with kv + index + n1ql services.
2. Create a bucket default
3. Create primary index on default bucket and populate it with documents.
Use command - ./cbworkloadgen
4. Create secondary index on the fields of documents in default bucket. - There are 4 indexes - 1 primary and 3 secondary
CREATE PRIMARY INDEX #primary ON default USING GSI
CREATE INDEX index1 ON default(`name`) USING GSI
CREATE INDEX index2 ON default(`age`) USING GSI
CREATE INDEX index4 ON default(`body`) USING GSI
5. Verify that UI shows up the index and build % as 100%
6. Flush the bucket default.
– At this point of time there should not be any data for index.
7. Now create documents in default bucket with same fields for which secondary index should be created.
– At this point of time the index should start building. You can use cbworkloadgen to add large set of data here.
Used following command for 7th step:
[root@centos-64-x64 bin]# ./cbworkloadgen -n localhost:8091 -i 500000 -r .2 -s 10 -j
– Note I had interrupted the cbworkloadgen at 68%
^Cinterrupted.### ] 68.4% (1709000/estimated 2500000 msgs)
8. Watch memory used by indexer, it will grow from 384M to 742M, simply use top to get the memory statistics.
9. Wait for 20 minutes
10. Check for build progress on index -
Ritams-MBP:source rsharma$ curl -u Administrator:password http://10.3.4.184:9102/stats | json_pp | grep build
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2382 0 2382 0 0 1940 0 -::- 0:00:01 -::- 1939
"default:index1:build_progress" : 100,
"default:#primary:build_progress" : 100,
"default:index4:build_progress" : 100,
"default:index2:build_progress" : 100
11. Now check the memory usage by indexer process, it is still 753M.
top - 00:35:43 up 130 days, 20:25, 2 users, load average: 0.41, 0.46, 0.93
Tasks: 147 total, 1 running, 146 sleeping, 0 stopped, 0 zombie
Cpu(s): 11.9%us, 11.4%sy, 0.0%ni, 76.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.1%st
Mem: 3974312k total, 2305116k used, 1669196k free, 164384k buffers
Swap: 10829816k total, 40480k used, 10789336k free, 836340k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15569 couchbas 20 0 1549m 753m 9028 S 89.2 19.4 30:08.23 indexer
Initial memory used by indexer before step 7:
top - 00:05:09 up 130 days, 19:55, 2 users, load average: 1.14, 0.93, 0.49
Tasks: 147 total, 1 running, 146 sleeping, 0 stopped, 0 zombie
Cpu(s): 5.1%us, 3.0%sy, 0.0%ni, 91.7%id, 0.0%wa, 0.0%hi, 0.1%si, 0.2%st
Mem: 3974312k total, 1629944k used, 2344368k free, 157336k buffers
Swap: 10829816k total, 40480k used, 10789336k free, 492572k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15569 couchbas 20 0 1190m 387m 9020 S 18.6 10.0 1:24.16 indexer