Changing the index_path of views on couchbase server 2.2


#1

Hey,

We have in our company two mobile apps using couchbase on the server side.
On of them works with binary data and not using views and json docs.
The second one (the new one that is still not in production) use json docs and views.

The first is already in production and has 10 nodes on one cluster of couchbase server 2.2.

We plan to use those 10 nodes also in the second app but there are some question we have before deciding to do that:

  1. We need to change the index_path of the second app to second disk (not the main one) to improve the views performance…how will it affect the first app that is already in the cluster we are changing the views path for?
    Is restart needed after changing the index_path?
  2. If we use like 3 design docs with 5-6 views on each…how can it affect the existing first app (that has only binary data) but existing on the same cluster but in different bucket?

Hope to get some help figuring out what is the best solution here.

Thanks,
Chen.


#2

@tgreenstein - i would be glad to get you opinion here if you can.

Thanks,
Chen.


#3

Hi,

My recommendation would be:

[1] Upgrading to 3.X would improve performance of views and improve the consistency window.
[2] I’m not 100% clear on what the breakdown is, I think it’s:

Bucket 1: Binary Data.
Bucket 2: JSON Data, 3 design docs, 5 views each.

Separating the index path from the data path is going to improve disk IO performance, especially if you have multiple buckets on the same cluster. This also improves a lot with 3.0 as the views are updated directly from memory asynchronously. On retrieval, it still uses a scatter gather operation from disk. As far as processing cycles, if you’re using stale=false in your view queries, and have a high workload load, it will use cycles in updating the views (an all views within a specific design doc) before each query is processed.

Thanks for your question.


#4

Hey ,

First of all thanks.

Second, you answered me on part of my question so i have some additional questions:

  1. Is changing index_path process require restart for each server?
  2. Will the views on the second app bucket affect on the binary data get/set performance on the first app?

#5

@tgreenstein - in case you missed the reply


#6

Changing the index path is done when a node joins the cluster. Unfortunately there is no functionality to dynamically change the path.

If the index files are separated from the data files The views on the second bucket bucket will have an impact on cpu, but should not affect Disk IO for the first bucket.


#7

@tgreenstein - so if i have a working cluster with 10 nodes that has only binary data.
and now i want to work with the same existing cluster also with views and json docs and want the index_path to be different from the json docs and binary docs,do i have to create new nodes?? are you sure i cannot change the index_path and restart the existing nodes?


#8

@tgreenstein - If you can please give more accurate answer related to the restart to machine when changing the index_path.

It is really important for us to know in production.

Thanks,
Chen.


#9

Hi, You can change the index_path without restart of the node it will delete an existing index data only and create a new disk location for use.

Check the documentation on REST API to change index_path -
http://docs.couchbase.com/admin/admin/REST/rest-node-index-path.html

curl -X POST -u [admin]:[password]
-d index_path=[index file and path]
http://[localhost]:8091/nodes/self/controller/settings

HTP - Anil Kumar


#10

Thanks u for your answer.

It was important for me to know it on 100% because it is production and very sensitive.