# Elasticsearch LXC on Ubuntu 14.04 and recomended settings

**URL:** https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597
**Category:** Elasticsearch
**Created:** [February 4, 2014, 5:54pm UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597 "2014-02-04T17:54:48Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![engel\_der](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@engel\_der](https://discuss.elastic.co/u/engel_der)
#### Post date: [February 4, 2014, 5:54pm UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597/1 "2014-02-04T17:54:48Z")

</div>

Hi,

we are setting up a Elasticsearch 1.0 (RC2) Cluster and I think I need some  
help were to start with (settings related). We have got 6 physical server  
with 265GB RAM and 2TB local SAS storage (seperated in two Raid10 Groups as  
LVM VGs). Those six servers are running Ubuntu 14.04. All "roles"  
(Application Server [NGINX+PHP-FPM+GlusterFS-Client+Elasticsearch  
"searcher"], Database Server [Galera Cluster], Storage Server [GlusterFS],  
Cache Server [Redis] ...) will be running in LXC containers. Most of them  
Ubuntu 14.04 only the Galera Cluster in 12.04.  
We expect about 100GB of data to index and the data is changing not that  
fast (5% per day?). The idea is to install Elastic Search on all 6  
Application Severs as "searcher" with:

cluster.name: search001  
node.master: false  
node.data: false  
#node.master: true  
#node.data: true  
node.max\_local\_storage\_nodes: 1  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2

Add 3 "data" Nodes with:

cluster.name: search001  
node.master: false  
#node.data: false  
#node.master: true  
node.data: true  
node.max\_local\_storage\_nodes: 1  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2  
bootstrap.mlockall: true

and 3 "master" nodes:

cluster.name: search001  
#node.master: false  
node.data: false  
node.master: true  
#node.data: true  
node.max\_local\_storage\_nodes: 1  
index.number\_of\_shards: 5  
index.number\_of\_replicas: 2

The LXCs for those "searchers" get 8GB RAM, the "masters" get 2GB RAM and  
the "data" LXCs get 60GB and 300GB storage.

What about the Java settings for those "data" nodes???

cat /etc/default/elasticsearch

# Run Elasticsearch as this user ID and group ID

ES\_USER=elasticsearch  
ES\_GROUP=elasticsearch

# Heap Size (defaults to 256m min, 1g max)

ES\_HEAP\_SIZE=30g

# Heap new generation

ES\_HEAP\_NEWSIZE=1g

# max direct memory

ES\_DIRECT\_SIZE=???

# Maximum number of open files, defaults to 65535.

MAX\_OPEN\_FILES=65535

# Maximum locked memory size. Set to "unlimited" if you use the

# bootstrap.mlockall option in elasticsearch.yml. You must also set

# ES\_HEAP\_SIZE.

MAX\_LOCKED\_MEMORY=unlimited

# Maximum number of VMA (Virtual Memory Areas) a process can own

MAX\_MAP\_COUNT=262144 #more????

# Elasticsearch log directory

#LOG\_DIR=/var/log/elasticsearch

# Elasticsearch data directory

#DATA\_DIR=/var/lib/elasticsearch

# Elasticsearch work directory

#WORK\_DIR=/tmp/elasticsearch

# Elasticsearch configuration directory

#CONF\_DIR=/etc/elasticsearch

# Elasticsearch configuration file (elasticsearch.yml)

#CONF\_FILE=/etc/elasticsearch/elasticsearch.yml

# Additional Java OPTS

#ES\_JAVA\_OPTS=

# Configure restart on package upgrade (true, every other setting will lead

to not restarting)  
#RESTART\_ON\_UPGRADE=true

What about the master and searcher settings? I guess I do not have to tune  
them?

Thank you for any help!

Regards,  
Flo

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/15991fc2-749e-4197-b854-88b5f64fc14a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/15991fc2-749e-4197-b854-88b5f64fc14a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Tony\_Su](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Tony\_Su](https://discuss.elastic.co/u/Tony_Su)
#### Post date: [February 4, 2014, 6:19pm UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597/2 "2014-02-04T18:19:47Z")

</div>

Hi Enger,  
Although I don't yet have enough experience building ES clusters to  
directly answer your question(s),

Typically when I'm involved in this type of provisioning, I generally start  
off with a set of objectives and then design accordingly. I'd be interested  
in your objectives list and then match those to your proposed configuration.

Thx,  
Tony

On Tuesday, February 4, 2014 9:54:48 AM UTC-8, engel der wrote:

> Hi,
> 
> we are setting up a Elasticsearch 1.0 (RC2) Cluster and I think I need  
> some help were to start with (settings related). We have got 6 physical  
> server with 265GB RAM and 2TB local SAS storage (seperated in two Raid10  
> Groups as LVM VGs). Those six servers are running Ubuntu 14.04. All "roles"  
> (Application Server [NGINX+PHP-FPM+GlusterFS-Client+Elasticsearch  
> "searcher"], Database Server [Galera Cluster], Storage Server [GlusterFS],  
> Cache Server [Redis] ...) will be running in LXC containers. Most of them  
> Ubuntu 14.04 only the Galera Cluster in 12.04.  
> We expect about 100GB of data to index and the data is changing not that  
> fast (5% per day?). The idea is to install Elastic Search on all 6  
> Application Severs as "searcher" with:
> 
> cluster.name: search001  
> node.master: false  
> node.data: false  
> #node.master: true  
> #node.data: true  
> node.max\_local\_storage\_nodes: 1  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2
> 
> Add 3 "data" Nodes with:
> 
> cluster.name: search001  
> node.master: false  
> #node.data: false  
> #node.master: true  
> node.data: true  
> node.max\_local\_storage\_nodes: 1  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2  
> bootstrap.mlockall: true
> 
> and 3 "master" nodes:
> 
> cluster.name: search001  
> #node.master: false  
> node.data: false  
> node.master: true  
> #node.data: true  
> node.max\_local\_storage\_nodes: 1  
> index.number\_of\_shards: 5  
> index.number\_of\_replicas: 2
> 
> The LXCs for those "searchers" get 8GB RAM, the "masters" get 2GB RAM and  
> the "data" LXCs get 60GB and 300GB storage.
> 
> What about the Java settings for those "data" nodes???
> 
> cat /etc/default/elasticsearch
> 
> # Run Elasticsearch as this user ID and group ID
> 
> ES\_USER=elasticsearch  
> ES\_GROUP=elasticsearch
> 
> # Heap Size (defaults to 256m min, 1g max)
> 
> ES\_HEAP\_SIZE=30g
> 
> # Heap new generation
> 
> ES\_HEAP\_NEWSIZE=1g
> 
> # max direct memory
> 
> ES\_DIRECT\_SIZE=???
> 
> # Maximum number of open files, defaults to 65535.
> 
> MAX\_OPEN\_FILES=65535
> 
> # Maximum locked memory size. Set to "unlimited" if you use the
> 
> # bootstrap.mlockall option in elasticsearch.yml. You must also set
> 
> # ES\_HEAP\_SIZE.
> 
> MAX\_LOCKED\_MEMORY=unlimited
> 
> # Maximum number of VMA (Virtual Memory Areas) a process can own
> 
> MAX\_MAP\_COUNT=262144 #more????
> 
> # Elasticsearch log directory
> 
> #LOG\_DIR=/var/log/elasticsearch
> 
> # Elasticsearch data directory
> 
> #DATA\_DIR=/var/lib/elasticsearch
> 
> # Elasticsearch work directory
> 
> #WORK\_DIR=/tmp/elasticsearch
> 
> # Elasticsearch configuration directory
> 
> #CONF\_DIR=/etc/elasticsearch
> 
> # Elasticsearch configuration file (elasticsearch.yml)
> 
> #CONF\_FILE=/etc/elasticsearch/elasticsearch.yml
> 
> # Additional Java OPTS
> 
> #ES\_JAVA\_OPTS=
> 
> # Configure restart on package upgrade (true, every other setting will
> 
> lead to not restarting)  
> #RESTART\_ON\_UPGRADE=true
> 
> What about the master and searcher settings? I guess I do not have to tune  
> them?
> 
> Thank you for any help!
> 
> Regards,  
> Flo

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 4, 2014, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597/3 "2014-02-04T22:08:32Z")

</div>

That looks ok, similar to how we do things with virtualised master/data  
nodes.  
I wouldn't specify your shard/replica count on the node though, do it in  
the index as it allows you to change with ease.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 5 February 2014 05:19, Tony Su [tonysu999@gmail.com](mailto:tonysu999@gmail.com) wrote:

> Hi Enger,  
> Although I don't yet have enough experience building ES clusters to  
> directly answer your question(s),
> 
> Typically when I'm involved in this type of provisioning, I generally  
> start off with a set of objectives and then design accordingly. I'd be  
> interested in your objectives list and then match those to your proposed  
> configuration.
> 
> Thx,  
> Tony
> 
> On Tuesday, February 4, 2014 9:54:48 AM UTC-8, engel der wrote:
> 
> > Hi,
> > 
> > we are setting up a Elasticsearch 1.0 (RC2) Cluster and I think I need  
> > some help were to start with (settings related). We have got 6 physical  
> > server with 265GB RAM and 2TB local SAS storage (seperated in two Raid10  
> > Groups as LVM VGs). Those six servers are running Ubuntu 14.04. All "roles"  
> > (Application Server [NGINX+PHP-FPM+GlusterFS-Client+Elasticsearch  
> > "searcher"], Database Server [Galera Cluster], Storage Server [GlusterFS],  
> > Cache Server [Redis] ...) will be running in LXC containers. Most of them  
> > Ubuntu 14.04 only the Galera Cluster in 12.04.  
> > We expect about 100GB of data to index and the data is changing not that  
> > fast (5% per day?). The idea is to install Elastic Search on all 6  
> > Application Severs as "searcher" with:
> > 
> > cluster.name: search001  
> > node.master: false  
> > node.data: false  
> > #node.master: true  
> > #node.data: true  
> > node.max\_local\_storage\_nodes: 1  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2
> > 
> > Add 3 "data" Nodes with:
> > 
> > cluster.name: search001  
> > node.master: false  
> > #node.data: false  
> > #node.master: true  
> > node.data: true  
> > node.max\_local\_storage\_nodes: 1  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2  
> > bootstrap.mlockall: true
> > 
> > and 3 "master" nodes:
> > 
> > cluster.name: search001  
> > #node.master: false  
> > node.data: false  
> > node.master: true  
> > #node.data: true  
> > node.max\_local\_storage\_nodes: 1  
> > index.number\_of\_shards: 5  
> > index.number\_of\_replicas: 2
> > 
> > The LXCs for those "searchers" get 8GB RAM, the "masters" get 2GB RAM and  
> > the "data" LXCs get 60GB and 300GB storage.
> > 
> > What about the Java settings for those "data" nodes???
> > 
> > cat /etc/default/elasticsearch
> > 
> > # Run Elasticsearch as this user ID and group ID
> > 
> > ES\_USER=elasticsearch  
> > ES\_GROUP=elasticsearch
> > 
> > # Heap Size (defaults to 256m min, 1g max)
> > 
> > ES\_HEAP\_SIZE=30g
> > 
> > # Heap new generation
> > 
> > ES\_HEAP\_NEWSIZE=1g
> > 
> > # max direct memory
> > 
> > ES\_DIRECT\_SIZE=???
> > 
> > # Maximum number of open files, defaults to 65535.
> > 
> > MAX\_OPEN\_FILES=65535
> > 
> > # Maximum locked memory size. Set to "unlimited" if you use the
> > 
> > # bootstrap.mlockall option in elasticsearch.yml. You must also set
> > 
> > # ES\_HEAP\_SIZE.
> > 
> > MAX\_LOCKED\_MEMORY=unlimited
> > 
> > # Maximum number of VMA (Virtual Memory Areas) a process can own
> > 
> > MAX\_MAP\_COUNT=262144 #more????
> > 
> > # Elasticsearch log directory
> > 
> > #LOG\_DIR=/var/log/elasticsearch
> > 
> > # Elasticsearch data directory
> > 
> > #DATA\_DIR=/var/lib/elasticsearch
> > 
> > # Elasticsearch work directory
> > 
> > #WORK\_DIR=/tmp/elasticsearch
> > 
> > # Elasticsearch configuration directory
> > 
> > #CONF\_DIR=/etc/elasticsearch
> > 
> > # Elasticsearch configuration file (elasticsearch.yml)
> > 
> > #CONF\_FILE=/etc/elasticsearch/elasticsearch.yml
> > 
> > # Additional Java OPTS
> > 
> > #ES\_JAVA\_OPTS=
> > 
> > # Configure restart on package upgrade (true, every other setting will
> > 
> > lead to not restarting)  
> > #RESTART\_ON\_UPGRADE=true
> > 
> > What about the master and searcher settings? I guess I do not have to  
> > tune them?
> > 
> > Thank you for any help!
> > 
> > Regards,  
> > Flo
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%40googlegroups.com)  
> .
> 
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624aSY9Lb%2B1pavQB81C0QkxjnTk\_e\_F\_An2Ht%3DP8w%2BFJKYA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624aSY9Lb%2B1pavQB81C0QkxjnTk_e_F_An2Ht%3DP8w%2BFJKYA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![engel\_der](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@engel\_der](https://discuss.elastic.co/u/engel_der)
#### Post date: [February 5, 2014, 7:22am UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597/4 "2014-02-05T07:22:25Z")

</div>

Hi Mark,

thank you for your answer.

Am Dienstag, 4. Februar 2014 23:08:32 UTC+1 schrieb Mark Walkom:

> That looks ok, similar to how we do things with virtualised master/data  
> nodes.  
> I wouldn't specify your shard/replica count on the node though, do it in  
> the index as it allows you to change with ease.

What do you mean by "specify your shard/replica count on the node"? I did  
specify them in the config file /etc/elasticsearch/elasticsearch.yml - is  
that wrong? where else to specify them?

Regards,  
Flo

> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 5 February 2014 05:19, Tony Su \<[tony...@gmail.com](mailto:tony...@gmail.com) \<javascript:\>\> wrote:
> 
> > Hi Enger,  
> > Although I don't yet have enough experience building ES clusters to  
> > directly answer your question(s),
> > 
> > Typically when I'm involved in this type of provisioning, I generally  
> > start off with a set of objectives and then design accordingly. I'd be  
> > interested in your objectives list and then match those to your proposed  
> > configuration.
> > 
> > Thx,  
> > Tony
> > 
> > On Tuesday, February 4, 2014 9:54:48 AM UTC-8, engel der wrote:
> > 
> > > Hi,
> > > 
> > > we are setting up a Elasticsearch 1.0 (RC2) Cluster and I think I need  
> > > some help were to start with (settings related). We have got 6 physical  
> > > server with 265GB RAM and 2TB local SAS storage (seperated in two Raid10  
> > > Groups as LVM VGs). Those six servers are running Ubuntu 14.04. All "roles"  
> > > (Application Server [NGINX+PHP-FPM+GlusterFS-Client+Elasticsearch  
> > > "searcher"], Database Server [Galera Cluster], Storage Server [GlusterFS],  
> > > Cache Server [Redis] ...) will be running in LXC containers. Most of them  
> > > Ubuntu 14.04 only the Galera Cluster in 12.04.  
> > > We expect about 100GB of data to index and the data is changing not that  
> > > fast (5% per day?). The idea is to install Elastic Search on all 6  
> > > Application Severs as "searcher" with:
> > > 
> > > cluster.name: search001  
> > > node.master: false  
> > > node.data: false  
> > > #node.master: true  
> > > #node.data: true  
> > > node.max\_local\_storage\_nodes: 1  
> > > index.number\_of\_shards: 5  
> > > index.number\_of\_replicas: 2
> > > 
> > > Add 3 "data" Nodes with:
> > > 
> > > cluster.name: search001  
> > > node.master: false  
> > > #node.data: false  
> > > #node.master: true  
> > > node.data: true  
> > > node.max\_local\_storage\_nodes: 1  
> > > index.number\_of\_shards: 5  
> > > index.number\_of\_replicas: 2  
> > > bootstrap.mlockall: true
> > > 
> > > and 3 "master" nodes:
> > > 
> > > cluster.name: search001  
> > > #node.master: false  
> > > node.data: false  
> > > node.master: true  
> > > #node.data: true  
> > > node.max\_local\_storage\_nodes: 1  
> > > index.number\_of\_shards: 5  
> > > index.number\_of\_replicas: 2
> > > 
> > > The LXCs for those "searchers" get 8GB RAM, the "masters" get 2GB RAM  
> > > and the "data" LXCs get 60GB and 300GB storage.
> > > 
> > > What about the Java settings for those "data" nodes???
> > > 
> > > cat /etc/default/elasticsearch
> > > 
> > > # Run Elasticsearch as this user ID and group ID
> > > 
> > > ES\_USER=elasticsearch  
> > > ES\_GROUP=elasticsearch
> > > 
> > > # Heap Size (defaults to 256m min, 1g max)
> > > 
> > > ES\_HEAP\_SIZE=30g
> > > 
> > > # Heap new generation
> > > 
> > > ES\_HEAP\_NEWSIZE=1g
> > > 
> > > # max direct memory
> > > 
> > > ES\_DIRECT\_SIZE=???
> > > 
> > > # Maximum number of open files, defaults to 65535.
> > > 
> > > MAX\_OPEN\_FILES=65535
> > > 
> > > # Maximum locked memory size. Set to "unlimited" if you use the
> > > 
> > > # bootstrap.mlockall option in elasticsearch.yml. You must also set
> > > 
> > > # ES\_HEAP\_SIZE.
> > > 
> > > MAX\_LOCKED\_MEMORY=unlimited
> > > 
> > > # Maximum number of VMA (Virtual Memory Areas) a process can own
> > > 
> > > MAX\_MAP\_COUNT=262144 #more????
> > > 
> > > # Elasticsearch log directory
> > > 
> > > #LOG\_DIR=/var/log/elasticsearch
> > > 
> > > # Elasticsearch data directory
> > > 
> > > #DATA\_DIR=/var/lib/elasticsearch
> > > 
> > > # Elasticsearch work directory
> > > 
> > > #WORK\_DIR=/tmp/elasticsearch
> > > 
> > > # Elasticsearch configuration directory
> > > 
> > > #CONF\_DIR=/etc/elasticsearch
> > > 
> > > # Elasticsearch configuration file (elasticsearch.yml)
> > > 
> > > #CONF\_FILE=/etc/elasticsearch/elasticsearch.yml
> > > 
> > > # Additional Java OPTS
> > > 
> > > #ES\_JAVA\_OPTS=
> > > 
> > > # Configure restart on package upgrade (true, every other setting will
> > > 
> > > lead to not restarting)  
> > > #RESTART\_ON\_UPGRADE=true
> > > 
> > > What about the master and searcher settings? I guess I do not have to  
> > > tune them?
> > > 
> > > Thank you for any help!
> > > 
> > > Regards,  
> > > Flo
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%40googlegroups.com)  
> > .
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a7e97314-f495-4243-a53c-c38e9889ab8c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a7e97314-f495-4243-a53c-c38e9889ab8c%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 5, 2014, 9:56am UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597/5 "2014-02-05T09:56:39Z")

</div>

If you specify the shard/replica settings in the elasticsearch.yml file,  
and you later decide to change them, you have to update the file and  
restart every node. Which is a hassle.

Instead just specify that when you create the index via a curl, it's a lot  
easier.

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 5 February 2014 18:22, engel der [florian.engelmann@gmail.com](mailto:florian.engelmann@gmail.com) wrote:

> Hi Mark,
> 
> thank you for your answer.
> 
> Am Dienstag, 4. Februar 2014 23:08:32 UTC+1 schrieb Mark Walkom:
> 
> > That looks ok, similar to how we do things with virtualised master/data  
> > nodes.  
> > I wouldn't specify your shard/replica count on the node though, do it in  
> > the index as it allows you to change with ease.
> 
> What do you mean by "specify your shard/replica count on the node"? I did  
> specify them in the config file /etc/elasticsearch/elasticsearch.yml - is  
> that wrong? where else to specify them?
> 
> Regards,  
> Flo
> 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 5 February 2014 05:19, Tony Su [tony...@gmail.com](mailto:tony...@gmail.com) wrote:
> > 
> > > Hi Enger,  
> > > Although I don't yet have enough experience building ES clusters to  
> > > directly answer your question(s),
> > > 
> > > Typically when I'm involved in this type of provisioning, I generally  
> > > start off with a set of objectives and then design accordingly. I'd be  
> > > interested in your objectives list and then match those to your proposed  
> > > configuration.
> > > 
> > > Thx,  
> > > Tony
> > > 
> > > On Tuesday, February 4, 2014 9:54:48 AM UTC-8, engel der wrote:
> > > 
> > > > Hi,
> > > > 
> > > > we are setting up a Elasticsearch 1.0 (RC2) Cluster and I think I need  
> > > > some help were to start with (settings related). We have got 6 physical  
> > > > server with 265GB RAM and 2TB local SAS storage (seperated in two Raid10  
> > > > Groups as LVM VGs). Those six servers are running Ubuntu 14.04. All "roles"  
> > > > (Application Server [NGINX+PHP-FPM+GlusterFS-Client+Elasticsearch  
> > > > "searcher"], Database Server [Galera Cluster], Storage Server [GlusterFS],  
> > > > Cache Server [Redis] ...) will be running in LXC containers. Most of them  
> > > > Ubuntu 14.04 only the Galera Cluster in 12.04.  
> > > > We expect about 100GB of data to index and the data is changing not  
> > > > that fast (5% per day?). The idea is to install Elastic Search on all 6  
> > > > Application Severs as "searcher" with:
> > > > 
> > > > cluster.name: search001  
> > > > node.master: false  
> > > > node.data: false  
> > > > #node.master: true  
> > > > #node.data: true  
> > > > node.max\_local\_storage\_nodes: 1  
> > > > index.number\_of\_shards: 5  
> > > > index.number\_of\_replicas: 2
> > > > 
> > > > Add 3 "data" Nodes with:
> > > > 
> > > > cluster.name: search001  
> > > > node.master: false  
> > > > #node.data: false  
> > > > #node.master: true  
> > > > node.data: true  
> > > > node.max\_local\_storage\_nodes: 1  
> > > > index.number\_of\_shards: 5  
> > > > index.number\_of\_replicas: 2  
> > > > bootstrap.mlockall: true
> > > > 
> > > > and 3 "master" nodes:
> > > > 
> > > > cluster.name: search001  
> > > > #node.master: false  
> > > > node.data: false  
> > > > node.master: true  
> > > > #node.data: true  
> > > > node.max\_local\_storage\_nodes: 1  
> > > > index.number\_of\_shards: 5  
> > > > index.number\_of\_replicas: 2
> > > > 
> > > > The LXCs for those "searchers" get 8GB RAM, the "masters" get 2GB RAM  
> > > > and the "data" LXCs get 60GB and 300GB storage.
> > > > 
> > > > What about the Java settings for those "data" nodes???
> > > > 
> > > > cat /etc/default/elasticsearch
> > > > 
> > > > # Run Elasticsearch as this user ID and group ID
> > > > 
> > > > ES\_USER=elasticsearch  
> > > > ES\_GROUP=elasticsearch
> > > > 
> > > > # Heap Size (defaults to 256m min, 1g max)
> > > > 
> > > > ES\_HEAP\_SIZE=30g
> > > > 
> > > > # Heap new generation
> > > > 
> > > > ES\_HEAP\_NEWSIZE=1g
> > > > 
> > > > # max direct memory
> > > > 
> > > > ES\_DIRECT\_SIZE=???
> > > > 
> > > > # Maximum number of open files, defaults to 65535.
> > > > 
> > > > MAX\_OPEN\_FILES=65535
> > > > 
> > > > # Maximum locked memory size. Set to "unlimited" if you use the
> > > > 
> > > > # bootstrap.mlockall option in elasticsearch.yml. You must also set
> > > > 
> > > > # ES\_HEAP\_SIZE.
> > > > 
> > > > MAX\_LOCKED\_MEMORY=unlimited
> > > > 
> > > > # Maximum number of VMA (Virtual Memory Areas) a process can own
> > > > 
> > > > MAX\_MAP\_COUNT=262144 #more????
> > > > 
> > > > # Elasticsearch log directory
> > > > 
> > > > #LOG\_DIR=/var/log/elasticsearch
> > > > 
> > > > # Elasticsearch data directory
> > > > 
> > > > #DATA\_DIR=/var/lib/elasticsearch
> > > > 
> > > > # Elasticsearch work directory
> > > > 
> > > > #WORK\_DIR=/tmp/elasticsearch
> > > > 
> > > > # Elasticsearch configuration directory
> > > > 
> > > > #CONF\_DIR=/etc/elasticsearch
> > > > 
> > > > # Elasticsearch configuration file (elasticsearch.yml)
> > > > 
> > > > #CONF\_FILE=/etc/elasticsearch/elasticsearch.yml
> > > > 
> > > > # Additional Java OPTS
> > > > 
> > > > #ES\_JAVA\_OPTS=
> > > > 
> > > > # Configure restart on package upgrade (true, every other setting will
> > > > 
> > > > lead to not restarting)  
> > > > #RESTART\_ON\_UPGRADE=true
> > > > 
> > > > What about the master and searcher settings? I guess I do not have to  
> > > > tune them?
> > > > 
> > > > Thank you for any help!
> > > > 
> > > > Regards,  
> > > > Flo
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/7ab42442-3680-4364-851a-c4f3b590f00e%  
> > > [40googlegroups.com](http://40googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/a7e97314-f495-4243-a53c-c38e9889ab8c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a7e97314-f495-4243-a53c-c38e9889ab8c%40googlegroups.com)  
> > .  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAEM624abHycKuQkFPe9PczANS%3DoUCj88c%3DzA17SvnE89NN%3D4zg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624abHycKuQkFPe9PczANS%3DoUCj88c%3DzA17SvnE89NN%3D4zg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 1:52am UTC](https://discuss.elastic.co/t/elasticsearch-lxc-on-ubuntu-14-04-and-recomended-settings/15597/6 "2017-07-06T01:52:28Z")

</div>


