# Performances with large array

**URL:** <https://discuss.elastic.co/t/performances-with-large-array/58241>\
**Category:** Elasticsearch\
**Created:** [August 17, 2016, 10:48am UTC](https://discuss.elastic.co/t/performances-with-large-array/58241 "2016-08-17T10:48:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorisbc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lorisbc/32/11311_2.png) [@lorisbc](https://discuss.elastic.co/u/lorisbc)\
**Post date:** [August 17, 2016, 10:48am UTC](https://discuss.elastic.co/t/performances-with-large-array/58241/1 "2016-08-17T10:48:38Z")

</div>

Hi all,

I store an array of arrays of Json objects in elastic. The first array has 100 sub-arrays of 20 Json objects.

> **Example of this field**
>
> "matrix": [  
> [  
> {  
> "field1" : value,  
> "field2" : value,  
> "field3" : value  
> },  
> {  
> "field1" : value,  
> "field2" : value,  
> "field3" : value  
> },  
> ......... 20 x ...........  
> ],  
> [  
> {  
> "field1" : value,  
> "field2" : value,  
> "field3" : value  
> },  
> {  
> "field1" : value,  
> "field2" : value,  
> "field3" : value  
> },  
> ......... 20 x ...........  
> ],  
> .........100 x .........  
> ]

I made a performance test to index this document (25 "normal" fields + this array field) . I used JMeter with 100 threads.  
I used one node with an m3.2xlarge Amazon instance ( 30 GiB of memory, 8vCPU )

Results with the array :

- Index Speed: 26 doc/second
- Average response time : 3.5s
- CPU usage : 99%
- Memory usage : 65%

The document without the array :

- Index Speed: 500 doc/second
- Average response time : 0.15s
- CPU usage : 14%
- Memory usage : 3%

With the array, CPU usage is overloaded and index speed and response time are very bad...  
Without the array field, I have normal results (my documents has 25 fields) .

Has anyone ever works with a big array ?  
I can increase performances of the instance and use a bigger cluster with more instances, but maybe I need to improve the way I store this large object.

Thank you 🙂

---

<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 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/performances-with-large-array/58241/2 "2017-07-05T22:27:16Z")

</div>


