question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance hit in NEST 6.x

See original GitHub issue

NEST/Elasticsearch.Net version: 5.6.2 6.1.0

Elasticsearch version: 5.5.1 6.2.3

Description of the problem including expected versus actual behavior: In the process of upgrading our Elasticsearch setup from version 5.x to 6.x we have noticed a performance impact that translates into slower response time in our service that uses Elasticsearch as data storage. The slower response is mostly visible when dealing with large documents with complex structures e.g. geojson.

The two Elasticsearch clusters performs equally when we are testing them directly via Apache ab so I guess the performance hit is related to the NEST library.

I have done some performance testing using BenchmarkDotNet (on a simplified implementation described further down) where NEST v. 6 has a noticeable higher response compared to v. 5. I hope you can shed some light on why we are seeing this behaviour. Thanks

Method Mean StdDev
NEST 5 73.11 ms 2.558 ms
NEST 6 92.15 ms 3.054 ms

Steps to reproduce:

  1. Add an index to Elasticsearch with this mapping
{
  "properties": {
    "boundaries": {
      "properties": {
        "boundary": {
          "type": "geo_shape"
        },
        "type": {
          "type": "text",
          "index": false
        }
      }
    }
  }
}
  1. Insert document https://gist.github.com/kaaresylow/ece0d2dd88175653fb4fa44710297d14

var connectionPool = new SingleNodeConnectionPool(new Uri("url"));
var settings = new ConnectionSettings(connectionPool).EnableHttpCompression();
var client = new ElasticClient(settings);
var response = client.Get<Document>(1, idx => idx
    .Index("documents")
    .Type("documentmodel"));
public class Document
    {
        public IEnumerable<PlaceBoundary> Boundaries { get; set; }
    }

    public class PlaceBoundary
    {
        public string Type { get; set; }

        public GeoJsonBoundary Boundary { get; set; }
    }

    public class GeoJsonBoundary
    {
        public string Type { get; set; }

        public object Coordinates { get; set; }

        public object Bbox { get; set; }

        public object Crs { get; set; }
    }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
Mpdreamzcommented, Feb 5, 2019

Just a quick heads up that we expect to switch to Utf8Json as the default internal serializer with 7.0.

One nice thing that @russcam found is that the hand off of the stream to the user defined serializer is now much much faster.

0reactions
codebraincommented, Mar 11, 2020

7.0 now uses Utf8Json as the serialiser, as detailed on the GA release blog post: https://www.elastic.co/blog/nest-and-elasticsearch-net-7-0-now-ga

Read more comments on GitHub >

github_iconTop Results From Across the Web

Elasticsearch/Nest performance issue
I'm using NEST 6.6.0 and Elasticsearch 6.6.2. The DELETE action: [HttpDelete("errors/{index}/{logeventId}")] public async Task< ...
Read more >
Nest Wifi Performance - iperf stats @ 5/6ghz : r/NestWiFi
Wi-Fi 6 (5ghz) performance is terrible per the screenshots. Wi-Fi 5 (5ghz) performance is also terrible. I found a lowly old 802.11ac device ......
Read more >
Min Score Usage | Elasticsearch.Net and NEST
Min Score Usageedit. Fluent DSL exampleedit. s => s .MinScore(0.5) .Query(q => q .Term(p => p.Name, "elasticsearch") ). Object Initializer syntax example ...
Read more >
NEST Breaking Changes | Elasticsearch .NET Clients [7.17]
This lists all the binary breaking public API changes between NEST 6.8.0, the last 6.x version released when 7.0 went GA release, and...
Read more >
Nest Wifi Pro vs. Eero Pro 6E: Which Wi-Fi 6E Mesh Router ...
Each system promises top-of-the-line mesh performance thanks to the addition of Wi-Fi 6E, a new designation for current-gen, Wi-Fi 6 devices ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found