# Regarding production configuration of elasticsearch

**URL:** <https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867>\
**Category:** Elasticsearch\
**Created:** [June 17, 2015, 7:02pm UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867 "2015-06-17T19:02:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sohilelasticsearch](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@sohilelasticsearch](https://discuss.elastic.co/u/sohilelasticsearch)\
**Post date:** [June 17, 2015, 7:02pm UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/1 "2015-06-17T19:02:08Z")

</div>

Hi ,

I am planning to import 1billion records from mysql to ElasticSearch on production machine having 32GB RAM and 500GB of hard disk space.  
I am using **elasticsearch-1.4.2** and **elasticsearch-river-jdbc-1.4.0.9**.  
I am running only one ElasticSearch node with default setting.  
Can ane one suggest me whether do I need to add any extra configuration in ElasticSearch or it will work fine with default settings?

Thanks,  
Sohil

---

<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:** [June 18, 2015, 2:52am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/2 "2015-06-18T02:52:20Z")

</div>

It will work fine out of the box.

---

<div class="post-metadata">

**Author:** ![sohilelasticsearch](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@sohilelasticsearch](https://discuss.elastic.co/u/sohilelasticsearch)\
**Post date:** [June 18, 2015, 4:32am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/3 "2015-06-18T04:32:50Z")

</div>

Thanks @warkolm.

I have imported 1billion data from mysql to ElasticSearch and it took ~2 hours.  
Is there any way we can make this faster or it's already giving good performance?

Thanks,  
Sohil

---

<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:** [June 18, 2015, 4:42am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/4 "2015-06-18T04:42:49Z")

</div>

That's not too bad!

How are you extracting the data from MySQL and getting it into ES? What heap have you assigned ES?

---

<div class="post-metadata">

**Author:** ![sohilelasticsearch](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@sohilelasticsearch](https://discuss.elastic.co/u/sohilelasticsearch)\
**Post date:** [June 18, 2015, 5:06am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/5 "2015-06-18T05:06:05Z")

</div>

Hi @warkolm,

curl -XPUT '10.XXX.XXX.XX:9200/\_river/url\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"strategy": "simple",  
"autocommit": true,  
"driver" : "com.mysql.jdbc.Driver",  
"url" : "jdbc:mysql://10.XXX.XXX.XX:3306/DomainDB",  
"user" : "sohil",  
"password" : "XXX",  
"sql" : [  
{  
"statement" : "select id as "\_id", p\_id as "pid" ,s\_id as "sid" ,domain\_name as "domain" from domaintable"  
}  
],  
"maxbulkactions":5000,  
"maxconcurrrentbulkactions":1,  
"index" : "urls",  
"type" : "url",  
"type\_mapping": {"urls" : {"properties" : {"\_id":{"type":"long","store":"yes"},"domain":{"type":"string","store":"yes","index":"not\_analyzed"},"pid":{"type":"long","store":"yes"},"sid":{"type":"long","store":"yes"}}}}  
}

}'

This is how I am extracting data from mysql to ElasticSearch.

I have set ES\_MIN\_MEM=4g and ES\_MAX\_MEM=24g

---

<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:** [June 18, 2015, 5:07am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/6 "2015-06-18T05:07:30Z")

</div>

You should set max and min heap to be the same, see [here](https://www.elastic.co/guide/en/elasticsearch/guide/current/heap-sizing.html) for more.

---

<div class="post-metadata">

**Author:** ![sohilelasticsearch](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@sohilelasticsearch](https://discuss.elastic.co/u/sohilelasticsearch)\
**Post date:** [June 18, 2015, 5:24am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/7 "2015-06-18T05:24:09Z")

</div>

Thanks @warkolm.  
I hope by keeping max and min heap to be same will increase the performance of exporting data from mysql to ES.

---

<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:** [June 18, 2015, 5:34am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/8 "2015-06-18T05:34:38Z")

</div>

Also please be aware that [rivers are being deprecated](https://www.elastic.co/blog/deprecating_rivers).

---

<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, 12:06am UTC](https://discuss.elastic.co/t/regarding-production-configuration-of-elasticsearch/23867/9 "2017-07-06T00:06:50Z")

</div>


