Net SDK 3 performance

Hi @Brian_Davis -

It looks like there are some QE delays, so it looks likely a release will happen tomorrow. There is no exact time it will be released.

-Jeff

Thanks for the update.

Hi Jeff,

Any updates on the 3.1.1 Release?

Thanks,

Brian Davis

Hi @Brian_Davis -

It’s passed QE and should be up on NuGet soon. I’ll post a update when it is.

-Jeff

@Brian_Davis -

Couchbase SDK 3.1.1 now available on NuGet!

1 Like

Hi @jmorris

Thanks for your help and updating me on latest status of this release, testing it out now, will let you know if I find or have any issues.

:slight_smile:

1 Like

@jzissop

Had you tried version 3.1.1 out yet?

Are you having same issues with it?

I am still noticing Get operations are still slower than they were in 2.x SDK.

Any updates on this?

@btburnett3 @jmorris

Thanks,

Brian Davis

@Brian_Davis

Can you provide the code you’re using to benchmark? On my machine, in certain test cases, I’ve been able to get as high as 15k gets per second, which is much higher than I was getting on 2.x. I’m wondering if there may be a benchmark design issue? Having the source will help me sort that out and replicate the problem.

Also, what version of the .NET runtime are you using? A lot of the performance optimizations are most effective on Core 3.1 and later.

Hi
@btburnett3

Currently using a remote server that has 2.x vs another server that is using 3.1.1 for the client, and then comparing loading speeds of same page for both server and the 2.x is loading faster than one using 3.1.1.

Had not done any specific Unit benchmark testing of just the Get Method by itself yet.

Currently we are using Core 3.1

But, to make it backwards compatible with our previous code that was using 2.x I am calling it with Sync method that has a wrapper using the Async method for 3.1.1

So currently testing now with a different method that is ASYNC through out entire stack, going to see if that speeds things up or not.

If you’re using the AsyncHelper.RunSync trick, that could be the culprit. It tends to cause thread pool depletion, which can negatively impact performance. Especially early in the lifecycle of the application, or during load spikes, because there are throttles on how fast the thread pool in .NET is allowed to grow. Let me know how it goes.

Main issue is with trying to simulate 2.x “MultiGet” in 3.1.1

This is the code currently using:

@Brian_Davis

Yeah, doing the multi get well using Tasks is a bit tricky. I’ve been playing with making an extension library to implement a best practice pattern, but it’s not done yet.

See this post on info on how to optimize the process: Bulk Insert In Every Two Minutes - #4 by btburnett3

Also, you can address the exception thrown on await Task.WhenAll(...) like this:

try
{
    await Task.WhenAll(tasks);
}
catch
{
    // Exception will be of any type, just ignore
}

foreach (var task in tasks)
{
    if (task.IsCompletedSuccessfully)
    {
        // Do something with task.Result
    }
    else
    {
        // Do something with task.Exception
    }
}
1 Like

@Brian_Davis

Did removing the use of a sync method calling an async method resolve your problem?